Adding leads to Notion with workflows
Do you keep your leads or requests in a Notion database? A workflow can add a new row to it, for example each time your AI agent finds a lead.
tawk.to has no Notion step, so you connect the two yourself. In Notion, you create a connection and share your database with it. In tawk.to, an HTTP request step sends each new row. You copy a token, an ID and a short template, and you do not write code.
Time: about 30 minutes.
tawk.to has no Notion step, so you connect the two yourself. In Notion, you create a connection and share your database with it. In tawk.to, an HTTP request step sends each new row. You copy a token, an ID and a short template, and you do not write code.
Time: about 30 minutes.
What you can and cannot do
| You can | Add a new page (row) to a Notion database and fill in its properties, for example name, email address, company and need. |
| You cannot | Find or update a row that already exists. Each run adds a new row, so the same person can appear twice. You also cannot put the visitor's name, email address or chat messages straight into the row: they must come from your AI agent or an AI step (see What you can put in the row below). |
| You need | The property admin role in tawk.to, a Notion Workspace Owner to create the connection, and a Notion database for your leads. On Notion Business and Enterprise plans, the owner may first have to allow connections in the workspace settings. |
This guide uses a database with these properties. Yours can have other names, but then change them in the template in step 4.
| Property | Type in Notion |
|---|---|
| Name | Title |
| Company | Text |
| Need | Text |
Step 1: Create a Notion connection
- Follow Notion's guide Create an internal Notion connection. Name the connection, for example tawk.to, and select your workspace.
- Copy the connection's API token.
Step 2: Share your database with the connection
- In Notion, open your database.
- Click … in the top-right corner.
- Click Connections.
- Add the connection from step 1.
Step 3: Copy the data source ID
- In your database, open the settings menu.
- Click Manage data sources.
- Click the menu next to the data source.
- Click Copy data source ID.
Step 4: Add an HTTP request step in tawk.to
- Open your workflow in Automations > Workflows.
- Click Add step.
- Click Action.
- In Category, select Developer tools.
- In Action, select HTTP request.
- In URL, type https://api.notion.com/v1/pages.
- In Method, select POST.
- Under Headers, click Add header two times and fill in the two headers from the table below.
- In JSON body, paste the template below.
- Replace YOUR-DATA-SOURCE-ID with the ID from step 3.
- Click Save.
| Header name | Header value | Secret |
|---|---|---|
| Authorization | The word Bearer, a space and your API token | On |
| Notion-Version | 2026-03-11 | Off |
Turning on Secret hides the token after you save. tawk.to sends secret headers only to https:// addresses.
The template must match your database exactly:
- Names: each property name, for example "Name" or "Email", must be the same as in your database, capital letters included.
- Types: each property needs its type: title for the Title property, email for an Email property and rich_text for a Text property.
- Length: a Text property holds up to 2,000 characters.
What you can put in the row
| Workflow starts from | What you can use | Example |
|---|---|---|
| Your AI agent (AI agent trigger) | The details that the agent collects | {{trigger.name}}, {{trigger.email}}, {{trigger.need}} |
| A chat (for example Chat transcript created) | The output of an AI step that summarizes the chat | {{nodes.<step ID>.output}} |
| A website form (Webhook trigger) | The fields that your form sends | {{trigger.email}} |
A webhook request must be signed, so a website form usually needs a developer to send it. See Choosing what triggers a workflow.
Why chats need an AI step: the visitor's name, email address and chat messages are private details. An HTTP request cannot send them, because only Slack steps and conditions can use them. An AI step can read them and write a summary, which you put in a Text property.
The template above uses the details that the Qualified lead hand-off template collects. To build on it, add the HTTP request step to that template. If you do not also want a deal in tawk.to, delete its Create card step. For more about deals, see Creating deals from chats with workflows.
For every detail you can use, see Using runtime data in workflows.
Why chats need an AI step: the visitor's name, email address and chat messages are private details. An HTTP request cannot send them, because only Slack steps and conditions can use them. An AI step can read them and write a summary, which you put in a Text property.
The template above uses the details that the Qualified lead hand-off template collects. To build on it, add the HTTP request step to that template. If you do not also want a deal in tawk.to, delete its Create card step. For more about deals, see Creating deals from chats with workflows.
For every detail you can use, see Using runtime data in workflows.
Step 5: Test it
- In the Settings tab, turn on Enabled and click Save.
- Click the Runs tab.
- Click Run now.
- In Trigger data (JSON), change the sample values to a test name and email address.
- Click Run now.
- Check your Notion database for the new row.
- Click the run to see the result.
Important: Run now starts a real run, so every step in the workflow runs.
If it does not work
| What you see | What to do |
|---|---|
| Status 400 | A property name or type does not match your database. Read Notion's message in the run, then fix the JSON body. |
| Status 401 | The API token is wrong or was refreshed. Copy the token again and enter it in the Authorization header. |
| Status 404 | The database is not shared with the connection, or the data source ID is wrong. Repeat step 2 and step 3. |
| Status 429 | Notion received too many requests. Try again later. |
By default, any status outside 200 to 299 fails the step and stops the run. If later steps should still run, turn on Continue even if the request fails in the step. Later steps can then check the HTTP status.
For more about runs and errors, see Testing, monitoring and troubleshooting workflow runs.
For more about runs and errors, see Testing, monitoring and troubleshooting workflow runs.
Good to know
- Copies lose the token. A copy made with Duplicate does not include secret headers, so the Authorization header is gone. Add it again, with Secret on, before you turn on the copy.
Related guides
Have a question we haven't covered or need support?
- Chat with us (live chat is available 24/7)
- Visit our Feedback page
- Schedule a call with us
