SmartLead Trigger
AI-generatedSummary
Receives SmartLead webhook POST, conditionally normalizes payload fields, and returns data with scope and receipt timestamp
Inputs
- scope — Scope for webhook registration: 'campaign' registers for a specific campaign; 'global' registers user/client/campaign scoped global webhook. Default: 'campaign'.
- campaignId (required) — Campaign ID to attach the webhook to. Shown only when scope is 'campaign'.
- associationType — Association type for global webhooks. 1 = User Level (all campaigns owned by user), 2 = Client Level (specific client), 3 = Campaign Level (specific campaign). Default: 1. Shown only when scope is 'global'.
- associationId (required) — Client ID or campaign ID, based on the selected associationType. Shown only when scope is 'global' and associationType is 2 or 3.
- events (required) — One or more event types that trigger the webhook. Default: ['EMAIL_REPLIED']. Available: EMAIL_BOUNCED, EMAIL_CLICKED, EMAIL_OPENED, EMAIL_REPLIED, EMAIL_SENT, EMAIL_UNSUBSCRIBED.
- webhookName — Name used when creating the webhook in SmartLead. Default: 'n8n SmartLead Trigger'.
- isActive — Whether the created webhook should be active. Default: true.
- normalizePayload — Whether to include normalized event and lead fields in the output. Default: true.
Output shape
array
Returns a single-element array containing the processed webhook data. When normalizePayload is true, the data includes normalized fields (event, timestamp, campaign_id, campaign_name, lead_id, email_account_id, sequence_number, reply, lead with email/first_name/last_name, raw payload, and optionally subject/message/category_id). When false, the raw webhook body is passed through. The output always includes 'scope' and 'received_at' (ISO timestamp) fields.