Prerequisites
- A Notion workspace where you can create internal integrations (workspace owner or membership with integration rights).
- A BeforeQuery workspace
ownerrole — only owners can add sources.
Data ingested
When you connect Notion, BeforeQuery indexes, for each page:- Page URL
- Page title, from the title property
- Page body as markdown — headings, bulleted and numbered lists, quotes, callouts, to-dos with their checkbox state, tables, and code blocks with their language
- Database properties, rendered as
**Field:** valueabove the body
Set up the connector
1
Create a Notion internal integration
In Notion, go to Settings → Connections → Develop or manage integrations and create a new internal integration. Copy the integration token (starts with
ntn_).2
Share content with the integration
Notion integrations can only see pages that are explicitly shared with them. Open the top-level page (or database) you want indexed, click ••• → Connections, and add your integration. Sub-pages are included automatically.
3
Add the source in BeforeQuery
In the dashboard at app.beforequery.com, open your Knowledge Base → Sources, click Add source, and choose Notion. Paste the integration token.Optionally narrow what gets indexed — a root page or a database, not both:
- Root page — index only that page’s subtree.
- Database — index the pages of a single database.
4
Start the first sync
Click Add. The first sync starts automatically — watch progress on the source card. When it finishes, indexed pages appear under Documents and are immediately answerable in the Playground.
Connection settings
What gets indexed
Page content, plus two things a Notion workspace keeps outside the page body:- Database properties. For a page inside a database the properties often are the content — a row is its fields, and its body is empty. Each row is indexed with its fields rendered, rather than as an empty page.
- Tables. Rendered as markdown tables instead of being dropped.
Keeping content in sync
Notion re-syncs every 5 minutes — there is no schedule to configure, and Sync on the source’s page runs one now if you cannot wait. Only changed content is re-embedded. See Sources Overview.Troubleshooting
- Pages missing from the index? The integration probably isn’t connected to them — re-check ••• → Connections on the missing page’s top-level parent.
- Sync fails with an authorization error? The token was revoked or the integration was removed from the workspace. Generate a new token and update the source.
- Internal-only content? Mark the indexed documents
restricted(see Roles & Permissions) or place the source in an internal-only source group so it never reaches public widget traffic.