Skip to content
CodeBook

Receive verified email, webhook stories and production alerts

Set up Postmark or a trusted mail worker, send a first webhook from a script, and distinguish incident intake from a work order's production watch.

These plugins open work at a station. Choose a test workflow for your first delivery; the station's normal worker and approval rules apply. Start at Factory settings → Plugins.

Email in with Postmark

  1. Prepare a Postmark server that receives mail. Decide which addresses can create work. For outgoing progress replies you also need a Postmark server token and a From address confirmed in Postmark. You can use inbound mail without outbound replies.
  2. Switch on Email in, choose the workflow and station, then choose Postmark inbound under Mail arrives through. In Who may send, enter one address per line, or @example.com for a whole domain. Start with one address that you control.
  3. If you want replies, set Postmark server token and Reply from together. Save. Copy the displayed inbound webhook URL before closing: it includes the generated password. Keep this URL in the provider configuration.
  4. In Postmark → your server → Inbound → Settings, set the inbound webhook to the copied URL. Enable RawEmailEnabled on that server. If mail arrives at a company address, route that address into the configured Postmark inbound stream.
  5. Click Test in CodeBook. Then send an email with a unique subject from a listed address. Check that the story carries the subject and lands at the selected station. If outgoing replies are configured, wait for a progress email, reply without removing its CodeBook subject marker, and check that the reply becomes a comment on the same story.

An allowlisted From line by itself does not create work. CodeBook checks the original message for a valid DKIM signature from the exact From domain that covers the full body and required message headers. A forwarder that rewrites a signed message, missing raw mail, or an unlisted sender can prevent intake. Fix the mail route or signing configuration; widening the allowlist does not repair a failed identity check. If intake works but replies do not, check the token and confirmed outbound sender.

Email in with your own mail worker

Choose A signed JSON post (your own mail worker) instead of Postmark, select the destination and list the allowed senders. Save and copy the Address and one-time Inbound password. The worker must independently verify the sender's From address before setting sender_verified to the boolean true. An assertion copied from an incoming message is not verification.

After verifying the sender, POST JSON to the displayed URL. Include from, subject, text, a stable message_id and sender_verified; from_name is optional. Set the X-CodeBook-Signature header to sha256= followed by the hex HMAC-SHA256 of the exact request body bytes, using the inbound password as key. Serialize once, sign those bytes, and send those same bytes. Reuse the message ID for a delivery retry. Verify a listed test sender opens a story; an unverified sender must not.

Webhook for Zapier, n8n or a script

  1. Choose Webhook (Zapier, n8n, scripts) and select the name, workflow and station. Save and copy both the URL and Token. The token is shown once.

  2. Configure an HTTP POST in the sending system, with Content-Type: application/json and Authorization: Bearer <token>. Send a title, an optional description and a stable external_id. An HTTP action in a workflow builder can use the same fields as this shell example:

    curl --fail-with-body "$CODEBOOK_WEBHOOK_URL" \
      -H "Authorization: Bearer $CODEBOOK_WEBHOOK_TOKEN" \
      -H 'Content-Type: application/json' \
      --data '{"title":"Check the sample invoice","description":"Documentation test","external_id":"invoice-demo-001"}'
    

    Set the two environment variables from the saved connection. For a new story use a new ID; for a retry use the original ID.

  3. Check the destination station for Check the sample invoice. Send the identical request a second time: it should leave one story. Test in CodeBook checks the trigger state; it does not make this POST for you.

  4. To retire the integration, switch it off and remove its token from the sender. Switching it off revokes the token permanently. To reconnect, add a new webhook and replace the sender's credentials.

Production monitoring

Select Sentry, Datadog, PagerDuty and others, choose the triage workflow and station, and set Open a story from to the lowest severity you want to act on. Investigate first gathers production context before opening the story. To add a source from the dialog, you also need organization admin access. Each provider account gets its own address; use the stated authentication method for that source.

Follow Connect production monitoring for provider authentication and repository mapping. To stop follow-up work on an individual order after a matching deployment, also enable Production watch on that work order. Enabling incident intake alone does not select which orders should pause.