# SendBeam Trigger

Start an n8n workflow when a contact is created or unsubscribes, an email is opened or clicked, a form is submitted, a campaign is sent or a sending domain is verified.

The **SendBeam Trigger** node starts a workflow when something happens in your SendBeam
workspace. It uses SendBeam's [webhooks](https://sendbeam.io/docs/api/webhooks), and sets them up for you.

## How it works

1. Add the SendBeam Trigger to a workflow, choose its credential and the events that should start it.
2. **Publish** the workflow. The node registers an endpoint in SendBeam, which you will see
  under [Settings → Webhooks](https://sendbeam.io/settings/webhooks) named after the workflow.
3. From then on each chosen event starts the workflow, usually within a minute of it happening.
  Unpublishing the workflow removes the endpoint again.

The credential's key needs `webhooks:read` and `webhooks:write`. To change which events
start the workflow, edit the node and publish again.

## Events

In n8n the events have readable names, such as *Contact Created* for `contact.created`.

| Event | Sent when |
| --- | --- |
| `contact.created` | A new contact was added, by any route (form, import, API, dashboard). |
| `contact.updated` | A contact’s fields, tags membership aside, changed. |
| `contact.unsubscribed` | A contact unsubscribed, or was set to unsubscribed. |
| `contact.resubscribed` | A previously unsubscribed contact subscribed again with fresh consent. |
| `contact.bounced` | A contact’s address hard-bounced and is now suppressed. |
| `contact.complained` | A contact marked a message as spam and is now suppressed. |
| `contact.deleted` | A contact was deleted (an erasure or manual delete). |
| `contact.tag_added` | A tag was added to a contact. |
| `contact.tag_removed` | A tag was removed from a contact. |
| `contact.list_joined` | A contact joined a list (immediately, or on double opt-in confirmation). |
| `contact.list_left` | A contact left or was removed from a list. |
| `email.sent` | An email was accepted by SendBeam’s managed delivery for sending. |
| `email.delivered` | An email was delivered to the recipient’s mail server. |
| `email.opened` | A recipient opened an email (first open only). |
| `email.clicked` | A recipient clicked a link in an email (first click only). |
| `email.bounced` | An email bounced. |
| `email.complained` | A recipient marked an email as spam. |
| `campaign.sent` | A campaign finished sending to its whole audience. |
| `form.submitted` | A public form (signup or contact) was submitted and accepted. |
| `domain.verified` | A sending domain finished DNS verification successfully. |
| `domain.failed` | A sending domain’s verification failed or lapsed. |

## What a workflow receives

Each event is passed on whole, so a workflow can branch on `event` and read the rest from
`data`. Contact events carry the person under `data.contact`; events about a tag or a
list add `data.tag` or `data.list`. Email events carry the address, subject and send
at the top of `data`.

```
{
  "id": "b1a4c0de-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
  "event": "contact.created",
  "created_at": "2026-09-11T08:12:16.602Z",
  "data": {
    "contact": {
      "id": "0f8c6d2e-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
      "email": "jane@example.com",
      "status": "subscribed",
      "first_name": "Jane",
      "last_name": "Doe",
      "source": "form",
      "custom_fields": {},
      "created_at": "2026-09-11T08:12:16.410Z",
      "subscribed_at": "2026-09-11T08:12:16.410Z",
      "unsubscribed_at": null,
      "tags": []
    }
  }
}
```

Expressions for the fields workflows use most:

```
Contact events   {{ $json.data.contact.email }}
                 {{ $json.data.contact.first_name }}
Tag events       {{ $json.data.tag.name }}
List events      {{ $json.data.list.name }}
Email events     {{ $json.data.email }}   {{ $json.data.subject }}
Any event        {{ $json.event }}        {{ $json.created_at }}
```

Every field of every event is described under [The payload](https://sendbeam.io/docs/api/webhooks#the-payload) in the
webhooks reference.

## n8n on your own computer

SendBeam sends events to n8n's webhook address over https, and n8n on a laptop defaults to
`http://localhost:5678`, which SendBeam cannot reach. The node says so when you publish.

1. Start a tunnel to n8n, for example with `cloudflared tunnel --url http://localhost:5678` or
  ngrok.
2. Set n8n's `WEBHOOK_URL` to the tunnel's https address and restart n8n.
3. Publish the workflow again.

A quick tunnel's address changes each time it starts, so publish again after restarting it.

## Testing a workflow

Once the workflow is published, **Send test event** on its endpoint under
[Settings → Webhooks](https://sendbeam.io/settings/webhooks) sends one of the events it listens for straight away.
A test event has the same shape as a real one, with `test: true` and obviously fake values, so
mappings built from it keep working when real events arrive.

---
Source: https://sendbeam.io/docs/n8n/trigger
