Appearance
Workflow actions and triggers for apps
An OAuth app can add its own steps to Automations: actions the workflow runs in your app, and triggers your app fires to start workflows. They appear in the builder of every sub-account that installs the app, under the app's name.
You'll need
- An app in the Developer portal (agency owner or admin).
- An https endpoint on the public internet for each action.
Declare them
- Open the app in the Developer portal and select Workflow actions and triggers.
- Edit the manifest and select Save manifest. The first save shows the signing secret once; copy it.
json
{
"actions": [
{
"key": "create_invoice",
"name": "Create invoice",
"description": "Creates an invoice in your app",
"fields": [
{ "key": "amount", "label": "Amount", "type": "number", "required": true },
{ "key": "plan", "label": "Plan", "type": "select", "options": [{ "value": "gold", "label": "Gold" }] }
],
"url": "https://example.com/actions/create-invoice"
}
],
"triggers": [{ "key": "payment_received", "name": "Payment received", "sample": { "amount": 49 } }]
}Keys are lower-case letters, digits and underscores. Field types are text, textarea, number and select. Up to 20 actions and 20 triggers. Keys keep their names in workflows (app.<ref>.<key>), so changing a label, fields or the URL does not break steps already built.
What an action receives
When a workflow reaches your action, we POST JSON to its URL:
json
{
"id": "run_123:step_4",
"action": "create_invoice",
"subaccountId": "tenant-1",
"inputs": { "amount": "49", "plan": "gold" },
"contact": { "id": "c_1", "firstName": "Ada", "lastName": null, "email": "ada@example.com", "phone": null },
"workflow": { "id": "wf_1", "runId": "run_123", "stepId": "step_4" },
"idempotencyKey": "run_123:step_4:1",
"sentAt": "2026-11-15T10:00:00.000Z"
}Merge fields in inputs ({{contact.firstName}}) are filled first. Check the X-App-Signature header: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>"> with your signing secret, the same scheme as webhooks. The Idempotency-Key header stays the same across retries of one step.
- Answer
2xxwithin 10 seconds. A JSON object in your answer becomes the step's output (text, numbers and true/false values). - A
4xx(except 408 and 429) fails the step for good. - A timeout,
408,429or5xxis retried by the workflow engine. - If the app is uninstalled from the sub-account, the step does nothing and fails with a plain message.
Every attempt is in the sub-account's Integrations > App activity.
Fire a trigger
With an access token from the sub-account that has workflows:enroll:
http
POST /api/v1/rest/apps/triggers/payment_received
Authorization: Bearer oat_...
Content-Type: application/json
{ "email": "ada@example.com", "data": { "amount": 49 } }Pass contactId, or email (the contact is created when new). The answer is 202 with the event id. Workflows whose trigger is App trigger fired with a condition on payload.trigger equal to the trigger's name start for that contact, and the data fills {{app.<field>}} merge fields. Only your app can fire its triggers, and only where it is installed.