Get your API key
All integrations Productivity

Notion + MailKite

Notion is a workspace for docs, wikis, and databases. Use MailKite to turn inbound email into Notion pages — support requests, meeting notes, and reports land directly in your workspace.

What you need

  • A verified domain with SPF + DKIM published
  • Your API key (mk_live_…)
  • Notion integration (internal integration) with API key

How it works

MailKite POSTs inbound email to a webhook handler that creates a Notion page via the REST API. The email subject becomes the page title, the sender address is stored as a property, and the body is added as a paragraph block.

Set up the webhook

Deploy this handler as a serverless function or worker. It creates a new page in your target Notion database for each inbound email. Set NOTION_API_KEY and NOTION_DATABASE_ID as environment variables.

notion-webhook.js
// Notion inbound email → page handler

const NOTION_API = 'https://api.notion.com/v1/pages';

async function handleInbound(email) {
const res = await fetch(NOTION_API, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.NOTION_API_KEY}`,
'Notion-Version': '2022-06-28',
},
body: JSON.stringify({
parent: { database_id: process.env.NOTION_DATABASE_ID },
properties: {
Name: { title: [{ text: { content: email.subject || `Email from ${email.from}` } }] },
From: { rich_text: [{ text: { content: email.from } }] },
},
children: [
{ object: 'block', type: 'paragraph', paragraph: { rich_text: [{ text: { content: email.text } }] } },
],
}),
});
return res.json();
}

Receive inbound email

Configure your MailKite domain's webhook URL to point at your handler. Every inbound email delivers this payload:

  • from — sender address
  • to — recipient address
  • subject — email subject
  • text — plain text body
  • html — HTML body
  • attachments — array of file objects

Test it

test
curl -X POST https://your-worker.example.com/mailkite-inbound \
-H "Content-Type: application/json" \
-d '{"from":"reporter@example.com","to":"notes@yourdomain.com","subject":"Meeting notes","text":"Discussed Q2 roadmap..."}'

Troubleshooting

  • Create a Notion integration at notion.so/my-integrations.
  • Share the target database with the integration — click ••• on the database page and select "Connections".
  • Ensure the database has a "Name" (title) property and a "From" (rich text) property.

See the SMTP relay docs for connection details, or Inbound webhooks for the full payload.