Skip to main content

Build a workflow

Workflows let Campbooks do something automatically when an email arrives or an external service calls in — notify a channel, forward details, file something, or call your own API. They live under Workflows, and every run is recorded so you can see exactly what happened.

Create one​

  1. Go to Workflows → New workflow.
  2. Pick a trigger:
    • Email received — runs when a new email is processed.
    • Webhook — runs when an external service POSTs to your workflow's unique URL.
  3. Add steps with the + button. Each step is an action — for example Send email, HTTP request, Slack message, Discord message, or a Custom action that calls one of your saved connections.
  4. Optionally add a condition so the workflow only continues when it matches — for instance, only when the document type is Invoice, or when a webhook field equals a value.
  5. Save, and make sure the workflow is enabled.

Use data from the trigger​

Every step field supports templating, so you can drop in details from the email or the incoming payload. For an email trigger you have the email and its documents; for a webhook you have the payload, headers, and query. Missing values resolve to empty rather than breaking the run.

Check what ran​

Open a workflow's Executions tab to see each run, step by step, with the input and output captured. It's the first place to look if something didn't fire the way you expected.

:::info Outbound calls are guarded HTTP-backed actions are checked before they run — Campbooks blocks requests to private, loopback, and internal addresses (allowed only in local development), so a workflow can't be pointed at internal infrastructure. :::