---
title: "Email to Notion | WebhookRelay"
meta:
  "og:description": "Capture any inbound email into a Notion database — Webhook Relay parses the email to JSON and a transform turns it into a new Notion page, automatically."
  "og:title": "Email to Notion"
  description: "Capture any inbound email into a Notion database — Webhook Relay parses the email to JSON and a transform turns it into a new Notion page, automatically."
---

![Stripes](https://webhookrelay.com/docs/tutorials/email/notion/images/stripes.svg)

Documentation

**Fundamentals**

# **Email to Notion**

Capture any inbound email into a Notion database — Webhook Relay parses the email to JSON and a transform turns it into a new Notion page, automatically.

Plenty of things worth tracking still arrive as **email**: inbound leads, support requests, newsletters and articles you mean to read later, vendor notifications. Notion is where many teams keep that kind of structured record — but copy-pasting each message into a database by hand doesn't scale. You want every email to become a **Notion page** automatically, with the subject, sender and body already filled in.

[Webhook Relay](https://webhookrelay.com) can [receive emails as webhooks](https://webhookrelay.com/docs/tutorials/email/notion/docs/email/). You give an inbox a unique address, every message sent to it is parsed into JSON, and a small **transform** reshapes it into the format the Notion API expects before delivery — no mail server, no glue code, no polling.

## [How it works](#how-it-works)

The whole path is a single hop with a transform in the middle:

```
inbound email  ──▶  Webhook Relay (parse + transform)  ──▶  Notion API  ──▶  new page
```

When an email hits your Webhook Relay address, it's parsed into a structured JSON document and POSTed to the bucket's outputs. Notion's [create-a-page endpoint](https://developers.notion.com/reference/post-page) doesn't understand that shape — it expects a `parent`, a `properties` object and optional `children` blocks — so the transform converts one into the other in flight.

The parsed email looks like this:

```
{
  "from": "jon@example.com",
  "from_name": "Jon Snow",
  "recipient": "<uuid>@in.webhookrelay-mail.com",
  "subject": "Partnership inquiry",
  "date": "Fri, 26 Jun 2026 11:27:41 +0400",
  "text": "plain body",
  "html": "<p>html body</p>",
  "spf": "pass",
  "dkim": "pass",
  "dmarc": "pass",
  "attachments": []
}
```

See the full [payload reference](https://webhookrelay.com/docs/tutorials/email/notion/docs/email/payload/) for every field, including `to`, `cc`, `message_id` and the raw `headers` map.

## [Setup](#setup)

**1. Create a bucket.** This is the container that ties an input to its outputs.

**2. Add an email input.** Webhook Relay gives you back a unique address of the form `<uuid>@in.webhookrelay-mail.com`. Anything sent there is parsed and forwarded to the bucket's outputs.

**3. Create a Notion integration and share the database.** In Notion, create an internal integration to get a secret token, then open your target database, click _Connections_, and share it with that integration. Copy the database ID from its URL.

**4. Add the Notion API as an output.** Set the bucket's output destination to `https://api.notion.com/v1/pages`.

**5. Attach the transform.** Add the [transform function](https://webhookrelay.com/docs/tutorials/email/notion/docs/webhooks/functions/) below so the parsed email is reshaped into Notion's format — and the required headers are set — before it's delivered.

**6. Send a test email.** Email your `<uuid>@in.webhookrelay-mail.com` address from any client. Within a second or two a new page appears in your database. If it doesn't, open the request log in your dashboard to see exactly what was received and what Notion returned.

## [The transform](#the-transform)

Webhook Relay [functions](https://webhookrelay.com/docs/tutorials/email/notion/docs/webhooks/functions/) hand you the incoming request body as a string in `r.body`. Parse it, build the Notion page payload, and write it back with `r.setBody` — then set the three headers Notion requires:

```
const e = JSON.parse(r.body);
r.setBody(JSON.stringify({
  parent: { database_id: "YOUR_DB_ID" },
  properties: { Name: { title: [{ text: { content: e.subject } }] }, From: { email: e.from } },
  children: [{ object: "block", type: "paragraph", paragraph: { rich_text: [{ text: { content: e.text || "" } }] } }]
}));
r.setHeader("Authorization", "Bearer " + "YOUR_NOTION_SECRET");
r.setHeader("Notion-Version", "2022-06-28");
r.setHeader("Content-Type", "application/json");
```

That's the complete bridge: the subject fills the `Name` title property, the sender lands in a `From` email property, and the plain-text body becomes a paragraph block in the page. Notion creates the page and returns it.

From here the function is where the real power is. Map more email fields to columns — `e.date` to a date property, `e.from_name` to a text property — split the body into multiple blocks, or inspect `e.spf` / `e.from` and `return` early to drop anything you don't want stored.

## [Get started](#get-started)

Turning inbound mail into Notion pages is one case of a broader pattern: [Email to Webhook](https://webhookrelay.com/docs/tutorials/email/notion/email-to-webhook/). Once an email is JSON, you can route it anywhere a webhook can go.

[Create a free Webhook Relay account](https://my.webhookrelay.com/register), add an email input, and have leads, support requests and reading-list items flowing into Notion in a few minutes.

Did this page help you?