DroneDeploy
Search…
Triggers
Triggers allow your DroneDeploy App to respond to events happening on the DroneDeploy Platform. For example, you may want to kick off a pre-defined export once your map completes processing.
Triggers are associated with an App's Function. In order for a Trigger event to fire, the user who triggered the event needs to have the App installed, and the Function should have a Trigger defined. You can define Triggers using the DroneDeploy CLI and the serverless.yml file. For example:
1
service: IFTTT
2
3
provider:
4
name: dronedeploy
5
6
app: # APP ID GOES HERE
7
8
plugins:
9
- "@dronedeploy/dronedeploy-cli"
10
11
functions:
12
ifttt-webhook:
13
handlerPath: functions/webhook
14
handler: dronedeploy
15
memory: 128
16
events:
17
-trigger
18
object-type: Export
19
type: complete
20
resources:
21
tables:
22
webhook-table:
23
description: "stores endpoint for IFTTT webhook"
24
columns:
25
- name: endpoint
26
type: Text
27
encrypted: false
28
length: 255
29
description: "webhook endpoint for IFTTT"
Copied!

Listening to Triggers

Currently there is a reserved path under /__ddtriggerfunction on each DroneDeploy Function for listening to Trigger events.
Your code might look something like this:
1
exports.routeHandler = function (req, res, ctx) {
2
const path = req.path;
3
switch(path) {
4
case '/__ddtriggerfunction':
5
triggerHandler(req, res, ctx);
6
break;
7
}
8
};
Copied!
You can check out our sample app to see how Triggers are handled.

Supported Triggers

We currently support the following Triggers:
    Export:complete
    MapPlan:complete
Last modified 2yr ago