Safeguard Docs
Integrations

Notion

Create Notion database pages from Safeguard. The capabilities the Notion connection needs, which tokens work, and step-by-step setup.

Availability

This integration is switched on per workspace. If you do not see the card under Integrations, ask your Safeguard contact.

What it does

The Notion card connects Safeguard to one Notion database. Safeguard creates a page in that database for each finding or work item you send to Notion and adds comments to it as it changes. Find the card under Integrations on the Notification tab.

Public vs private

This does not apply to Notion: you always connect your own Notion workspace, and Safeguard sees only the pages and databases you share with the connection.

Supported auth methods

MethodUse it whenNotes
Internal connection API token (dialog label Integration Token)All connectionsCreated in Notion's developer portal for one workspace. Notion previously called these internal integrations
Personal access tokenNot testedNotion also offers user-scoped tokens; the dialog has not been checked with one
Public connection (OAuth)Not available yet

Permissions required

Notion controls access with the connection's capabilities and with the pages you share with it.

Capabilities of the connection

CapabilityRequired?What Safeguard uses it for
Read contentRequiredListing databases for Database (POST /search) and reading the chosen database
Insert contentRequiredCreating a page in the database for each item (POST /pages)
Insert commentsRequiredAdding comments to the pages it created (POST /comments)
Update contentNot neededSafeguard does not edit existing pages
Read commentsNot needed
User informationNot neededSafeguard reads only the token's own bot user (/users/me)

Sharing

AccessRequired?What Safeguard uses it for
The database is shared with the connection (••• > Add connections)RequiredWithout it, Notion hides the database from the connection

Least privilege: a connection with Read content, Insert content and Insert comments, shared with the one database only.

Token types

Token typeWorks?Notes
Internal connection API tokenYesSent as a Bearer token with Notion-Version: 2022-06-28
Personal access tokenNot tested
OAuth access token of a public connectionNot available yetThe dialog takes a token you paste

Expiry: internal connection tokens do not expire on a schedule. Replace the token from the developer portal if it leaks or people leave.

What we never need: workspace owner rights after setup, Update content, or access to pages other than the database.

Step-by-step setup

Create the credential in Notion

  1. Open Notion's developer portal (https://app.notion.com/developers/connections). You need to be a workspace owner.
  2. Create an internal connection for your workspace, and give it the capabilities Read content, Insert content and Insert comments.
  3. Copy its API token. Keep it secret.
  4. Open the database in Notion, click the ••• menu at the top right, choose Add connections, and select your connection.

Or check it with curl

curl -s https://api.notion.com/v1/users/me \
  -H "Authorization: Bearer $NOTION_TOKEN" -H "Notion-Version: 2022-06-28"

Connect it in Safeguard

  1. Open Integrations and choose the Notification tab.
  2. Click Connect on the Notion card.
  3. On Credentials, enter an Integration Name, an optional Description, and paste the Integration Token.
  4. Click Next. On Destination, choose the Database.
  5. Click Connect.

Webhooks and triggers

The dialog does not set up Notion webhooks yet, so changes made in Notion are not sent back to Safeguard. Safeguard creates pages and adds comments when the events you route to Notion happen.

What we read and store

  • Read: the connection's bot user and the databases shared with it.
  • Stored: the connection's name and database, links between Safeguard items and Notion pages, and the token. Safeguard never shows the token again in the dialog.
  • Sent to Notion: page titles, content and comments about your Safeguard findings.
  • No customer data from this integration is sent to third-party LLMs.

Troubleshooting

Message you seeCauseFix
Notion validation failed: ...Notion refused the token, or the database is not shared with the connectionPaste the current token, and add the connection to the database
No databases found for these credentialsNo database is shared with the connection, or it lacks Read contentShare the database (••• > Add connections) and check the capabilities
Notion database listing failed: ...Notion refused the database searchCheck the token and the Read content capability
Pages are not createdThe connection lacks Insert contentAdd the capability in the developer portal

Rotation and disconnect

  • Rotate: get a new token for the connection in the developer portal, open the Notion connection on the Notification tab, choose Update, paste the new token and choose Save Changes.
  • Disconnect: choose Delete on the connection, then remove the connection from the database (••• > connections) or delete it in the developer portal. Pages already created stay in Notion.

Vendor references

On this page