Campaign Event

trigger.emelia_event
TriggerEmailconnection requiredruns in-engine

Registers a webhook on one Emelia campaign at publish and starts one run per delivered activity.

Start a run when an Emelia campaign records activity (a reply, an open, a click, a bounce, an unsubscribe).

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Emelia
Secret shape
the Emelia account API key
Resolved by
config.connection_id, else node.connection_id
Note
Publishing needs MANTLE_APP_PUBLIC_BASE_URL set to a URL Emelia can reach; the webhook is registered against that address and Emelia addresses it by URL for the rest of its life.

Configuration

2 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
campaign_id
The Emelia campaign to watch, as its 24-character id (the _id in emelia.list_campaigns, and the id in the campaign's Emelia URL). One webhook watches one campaign.
stringYes—matches ^[0-9a-fA-F]{24}$65f0a1b2c3d4e5f6a7b8c9d0
events
Which campaign activities start a run. Leave it at REPLIED unless the workflow really handles the rest — a busy campaign emits one SENT per recipient, and every one of them would start its own run.
arrayNo["REPLIED"]1–6 characters; array of string—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "campaign_id": "65f0a1b2c3d4e5f6a7b8c9d0",
  "events": [
    "REPLIED"
  ]
}

Output

One shape.

emelia event

The activity, with Emelia's body kept whole under payload. Emelia publishes no delivery schema, so the shape is open below the declared fields.

Extra keys beyond the ones listed can appear.

FieldTypeExample
event
The campaign activity, uppercased: SENT, OPENED, CLICKED, REPLIED, BOUNCED or UNSUBSCRIBED. Branch on this when the trigger watches more than one.
stringREPLIED
campaign_id
The Emelia campaign the activity happened on — the same campaign this trigger registered against, so it is constant unless the config changes.
string65f0a1b2c3d4e5f6a7b8c9d0
payload
Emelia's delivery exactly as it arrived. Emelia publishes no schema for it, so read the fields you need from here after looking at one real delivery in the run history.
object—
{
  "campaign_id": "65f0a1b2c3d4e5f6a7b8c9d0",
  "event": "REPLIED",
  "payload": {
    "campaignId": "65f0a1b2c3d4e5f6a7b8c9d0",
    "contact": {
      "email": "buyer@example.com"
    },
    "event": "REPLIED"
  }
}

Notes

  • Publishing registers the webhook in Emelia; unpublishing, disabling or archiving deletes it. A workflow that is off is off at Emelia too.
  • One webhook watches one campaign. Watching several means several published workflows, or one workflow per campaign.
  • Emelia does not sign its deliveries and offers nothing to verify them with, so the unguessable callback URL is the only secret involved — treat the payload as untrusted input.
  • Emelia sends no delivery id, so a redelivery is recognised by the delivery being byte-identical. Two activities that differ in nothing Emelia sends would collapse into one run.
  • Emelia publishes no schema for the delivery body: read one real event out of the run history before writing expressions against `payload`.

See Campaign Event run in a workflow.

In a technical demo we add the Emelia connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.