Skip to content

How to send an email when a webhook arrives

Turn any incoming webhook into an email to you or your team, written with the webhook's data. No email server, no code. Filter and route emails by content.

Updated

Many apps can send a webhook when something happens: a payment, a new signup, a failed job, an alert. Fewer can send a useful email about it. This guide turns any webhook into an email to you or your team, written with the webhook's own data, without setting up an email server or writing code.

  1. Trigger

    When a webhook is received

    Foliot gives you a URL. Anything POSTed to it starts a run.
  2. Step 1

    Send email

    Subject: New order from Trigger → customer
The workflow you'll build: two tiles, no code.

Before you start

  • A Foliot account. The free plan is enough to build and test this.
  • The app that sends the webhook, or curl to send a test yourself.
  • The addresses that should get the email: up to 10 per email.

Set it up

1. Create the workflow and pick the webhook trigger

Create a new workflow and choose When a webhook is received. Copy the webhook URL (it looks like https://usefoliot.com/api/hooks/…) into the app that sends the webhook. Keep it private: anyone with the URL can start the workflow.

2. Send one sample request

While the workflow is off, requests are saved as sample data instead of running anything. Click Get sample data, then trigger a test from your app, or send one yourself:

curl -X POST https://usefoliot.com/api/hooks/YOUR-TOKEN \
  -H "Content-Type: application/json" \
  -d '{"customer": "Ada Lovelace", "email": "ada@example.com", "total": 49, "plan": "pro"}'

In the data picker, the body's fields show up directly under Trigger, like Trigger → email, next to the query string, headers and the time it arrived. Foliot accepts JSON, form-encoded and plain-text bodies up to 256 KB.

3. Add the Send email step

Click + after the trigger and choose Send email. Fill in:

  • To: one or more addresses, separated by commas (up to 10). This can be data too, such as Trigger → email.
  • Subject: for example “New order from Trigger → customer”.
  • Message: plain text with data where you need it:
New order on the Pro plan.

Customer: [Trigger → customer]
Email: [Trigger → email]
Total: $[Trigger → total]

In the editor, the bracketed parts are data chips you pick with the data button, not text you type. Under More options you can set a Reply-to (optional) address, so replies go to a real inbox, and a Sender name (optional), like “Orders”, which recipients see as “Orders via Foliot”.

4. Test the step, then turn the workflow on

Test this step sends the email for real using the sample, so check your inbox. When it looks right, switch the workflow on. Every request to the URL now sends an email, usually within a few seconds. The sender of the webhook gets a 202 reply straight away.

Useful variations

Only email for some events

Put a Filter step before the email: “Only continue if Trigger → total is greater than 100”, or “Trigger → event is payment.failed”. Other webhooks end as “Filtered out”, with no email and no alert.

Email different people for different cases

Use a Branch step. For example: if Trigger → plan is enterprise, the Yes path emails sales; the No path emails support. Each path has its own Send email step.

Confirm to the customer, too

If the webhook includes the customer's address, a second Send email step can thank them, with To set to Trigger → email and Reply-to set to your own address.

Wait before following up

A Delay step can hold the run for minutes, hours or days (up to 30), then send a follow-up email.

Good to know

  • Emails are sent from a Foliot address. The sender shows as your name followed by “via Foliot”, and replies go to the reply-to address if you set one. Names that look like other companies (PayPal, Apple, Google, Microsoft, Amazon, Stripe) aren't allowed.
  • Emails are plain text, shown as simple HTML with your line breaks kept. They end with a small “Sent with Foliot” line.
  • Each account can send to 25 recipients a day on the free plan and 100 on Pro (it resets at midnight UTC). This suits notifications to you and your team, not newsletters or bulk mail.
  • Each webhook is one run. The free plan includes 500 runs a month; Pro includes 10,000 for $12 a month.

Other ways to do it

  • Your own code. A small endpoint that receives the webhook and calls an email API such as Resend, Postmark or SendGrid. Full control over the email's design and sending domain, but you host and maintain it.
  • The sending app's own notifications. Many apps can email you directly for some events. If yours does and the email says what you need, use that.
  • A general automation tool. Zapier, Make and n8n can all do this. Note that on Zapier, webhooks aren't included on the free plan (zapier.com/pricing, checked October 15, 2026). See Foliot vs Zapier.

Questions

How do I get an email when a webhook is received?

Point the webhook at a URL that turns requests into emails. In Foliot, create a workflow with the When a webhook is received trigger and a Send email step, then pick the webhook's fields for the subject and message.

Can I send the email from my own domain?

No. Foliot sends from its own address, and the sender shows as your chosen name "via Foliot". You can set a reply-to address, so replies reach your inbox.

How many emails can I send?

Up to 10 recipients per email, and 25 recipients a day on the free plan or 100 on Pro. It's meant for notifications, not bulk email.

Can I only send emails for certain webhooks?

Yes. Add a Filter step before the email, such as only continue if the event is payment.failed. Webhooks that don't match end quietly without an email.