Skip to main content
PUT
Start a workflow on an app event
Send the app (its id, such as gmail), the trigger (the event’s id, such as GMAIL_NEW_GMAIL_MESSAGE), and the event’s config. A workflow has one app event, and setting a new one replaces the old one. Each event starts one run. What the app sent arrives as the input event, so a step reads {{inputs.event.subject}}. event_source says which app and event it was, and when it came. The same event is never run twice. Each run uses your credits like any run. When a run cannot start, for example because the account is out of credits, last_error on Get a workflow’s app event says why. In the app, open the workflow in the builder, press ⌘K (or Ctrl+K), choose the Triggers tab, then App events. It lists each app’s events and their settings. Only the workflow’s owner can set it, because the events come from the owner’s account. Needs workflows:write and workflows:invoke. MCP tool: update_workflow with app_trigger.

Authorizations

Authorization
string
header
required

API key with the vd_sk_ prefix, as Authorization: Bearer vd_sk_.... Create keys in Settings → API Keys.

Headers

Idempotency-Key
string

Any unique string (such as your order id). Resending the same request with the same key within 24 hours returns the first answer (with Idempotent-Replayed: true) and does nothing twice; the same key with a different request is a 422 idempotency_key_reused.

Required string length: 1 - 255

Path Parameters

slug
string
required

Body

application/json
app
string
required

The app's id, e.g. gmail.

Required string length: 1 - 100
trigger
string
required

The event's id, e.g. GMAIL_NEW_GMAIL_MESSAGE.

Required string length: 1 - 200
config
Config · object

The event's settings.

Response

Successful Response

id
string
required
workflow_id
string
required
app
string
required

The app's id, e.g. gmail.

trigger
string
required

The event's id, e.g. GMAIL_NEW_GMAIL_MESSAGE.

enabled
boolean
required
trigger_name
string | null
config
Config · object

The event's settings.

last_event_at
string | null
last_error
string | null
created_at
string | null
updated_at
string | null