Back to Docs
Integration
Notion
Sync your Notion pages into your GroundTruth knowledge base so every verification check runs against your live team documentation.
How it works
- Connect — Go to Settings and click "Connect" next to Notion. You'll choose which pages the integration can access.
- Sync — Once connected, click "Sync" to pull pages into your knowledge base. Documents appear in your Library with source "notion".
- Verify — All future
POST /api/checkcalls automatically search synced pages for evidence.
Prerequisites
- A Notion internal integration or public OAuth app.
- During OAuth, you select which pages the integration can access.
What syncs
Up to 50 pages that the integration has access to. Block content (paragraphs, headings, lists, code blocks) is extracted as plain text.
Tip: Pages with fewer than 50 characters of text content are automatically skipped to avoid importing empty templates.
API alternative
Connect and sync programmatically instead of using the dashboard.
api
# Connect via API
POST /api/integrations
{ "provider": "notion" }
# Trigger a sync
POST /api/integrations/sync
{ "provider": "notion" }
# Response
{
"success": true,
"provider": "notion",
"documentsFound": 35,
"documentsIngested": 31
}Using results with Notion
Automatically annotate Notion pages when checks flag issues using webhooks.
node.js
// Webhook handler: append a callout block to a Notion page
// when verification detects high risk
app.post("/webhooks/groundtruth", async (req, res) => {
const event = req.body;
if (event.data.verdict === "low_risk") return res.sendStatus(200);
const pageId = "YOUR_PAGE_ID"; // map from your check context
await fetch(
`https://api.notion.com/v1/blocks/${pageId}/children`,
{
method: "PATCH",
headers: {
Authorization: `Bearer ${NOTION_TOKEN}`,
"Notion-Version": "2022-06-28",
"Content-Type": "application/json",
},
body: JSON.stringify({
children: [
{
object: "block",
type: "callout",
callout: {
icon: { emoji: "⚠️" },
rich_text: [
{
type: "text",
text: {
content: `GroundTruth: risk score ${event.data.risk_score} (${event.data.claims_count} claims). ${event.data.has_rewrite ? "Safe rewrite available." : "Review recommended."}`,
},
},
],
},
},
],
}),
}
);
res.sendStatus(200);
});