Documentation navigation

Integration guide · Updated October 2026

Give a Zapier Zap Its Own Email Inbox

Give your Zap an address such as leads@yourdomain.com. Every email sent to it triggers the Zap through Webhooks by Zapier with the parsed message (sender, subject, text, HTML and attachments), signed so you can trust it, and the Zap can reply from the same address. The mailbox runs in MarkRelay in your own Cloudflare account, so the mail stays yours and your team can read it in webmail.

What you need

  • MarkRelay deployed to your Cloudflare account, with your domain added.
  • A Zapier plan that includes Webhooks by Zapier.

1. Create the mailbox in MarkRelay

  1. In MarkRelay, create a mailbox for the workflow, such as orders@yourdomain.com.
  2. Make sure its Cloudflare Email Routing rule sends mail to the MarkRelay Worker (or that a catch-all does).
  3. Send it a test email and check it appears in webmail. Your team can keep using this mailbox in the browser while Zapier works on the same mail.

2. Start the Zap with Catch Raw Hook

  1. Create a Zap and choose Webhooks by Zapier as the trigger.
  2. Pick the Catch Raw Hook event, so the body and headers arrive exactly as sent.
  3. Copy the webhook URL Zapier gives you.

3. Point a MarkRelay webhook at Zapier

  1. Open Developer → Webhooks, select Add webhook and choose Custom endpoint.
  2. Paste the Catch Raw Hook URL as the endpoint URL.
  3. Under Mailboxes, choose Specific mailboxes and pick only the workflow's mailbox.
  4. Add the webhook and copy the whsec_... signing secret; it is shown once.
  5. Select the pencil icon, then Send test. Zapier should receive a signed webhook.test event.

From now on every message to that mailbox reaches Zapier as an email.received event within seconds. Failed deliveries are retried up to 3 times. See inbound webhooks for the full payload.

4. Check the signature in a Code step

Add Code by Zapier → Run Javascript. Map the raw body, the X-MarkRelay-Timestamp and X-MarkRelay-Signature headers from the trigger, and your signing secret into Input Data:

// Code by Zapier, Run Javascript.
// Input Data: body = Raw Body, timestamp = the X-MarkRelay-Timestamp header,
// signature = the X-MarkRelay-Signature header, secret = your whsec_ secret.
const crypto = require('crypto');

const expected = 'sha256=' + crypto
  .createHmac('sha256', inputData.secret)
  .update(inputData.timestamp + '.' + inputData.body)
  .digest('hex');

if (expected !== inputData.signature) {
  throw new Error('Invalid MarkRelay signature');
}

const { data } = JSON.parse(inputData.body);
output = {
  id: data.id,
  mailbox: data.mailbox,
  from: data.from.address,
  fromName: data.from.name,
  subject: data.subject,
  text: data.text,
  attachments: data.attachments.length,
};

The step fails, and the Zap stops, if the signature does not match. Otherwise it outputs the fields the next steps need.

5. Use the email in the Zap

The full event has the message under data:

FieldWhat it holds
data.idThe email id; use it to dedupe and to reply
data.mailboxThe MarkRelay mailbox it arrived in
data.from.address, data.from.nameThe sender
data.subjectSubject line
data.text, data.htmlPlain-text and HTML bodies
data.attachments[]Each file's id, fileName, contentType and size
data.threadIdThe conversation it belongs to

Add a Filter on the subject or sender, send the text to a Formatter or AI step, and create a row, a CRM lead or a Slack message. Delivery is at least once, so use data.id to avoid handling a message twice.

6. Reply from the same address

Add Webhooks by Zapier → Custom Request:

POST https://mail.yourdomain.com/openapi/v1/emails/{data.id}/reply
Authorization: Bearer sk-...
Content-Type: application/json

{ "text": "Thanks, we received your order." }

Create the API key in Developer → API keys with Specific mailboxes scope and only the workflow's mailbox, so the workflow cannot read or send from any other address. Send exactly one of text, html or markdown; add "replyAll": true to answer everyone. The reply goes out from the same address, in the same thread, and shows up in webmail with an API badge. Download attachments with GET /attachments/{id} and the same key.

Common questions

How do I trigger a Zap from an incoming email on my own domain?

Create a mailbox in MarkRelay, start the Zap with Webhooks by Zapier's Catch Raw Hook, and point a MarkRelay webhook scoped to that mailbox at the hook URL. Each new message triggers the Zap with the parsed email.

Why Catch Raw Hook instead of Catch Hook?

The signature covers the exact raw body. Catch Raw Hook keeps the body and headers as they arrived, so a Code step can check the signature before the Zap trusts the event.

Do I need a paid Zapier plan?

Webhooks by Zapier is a premium app, so it needs one of Zapier's paid plans.

Can the Zap reply from the same address?

Yes. Add a Webhooks by Zapier POST or Custom Request action to /emails/{id}/reply on your MarkRelay API with a key scoped to the Zap's mailbox.

Related: email to webhook, n8n and Make guides, and the Email API reference.