Notion AI Database Extractor & Sync Tool avatar
Notion AI Database Extractor & Sync Tool

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Notion AI Database Extractor & Sync Tool

Notion AI Database Extractor & Sync Tool

Extract, summarize, and sync your Notion databases automatically. Supports AI summaries (GPT-4o), incremental updates, and secure HMAC webhooks. Ideal for analytics, CRM sync, or automation workflows.

Pricing

from $0.50 / 1,000 results

Rating

5.0

(1)

Developer

Țugui Dragoș

Țugui Dragoș

Maintained by Community

Actor stats

1

Bookmarked

1

Total users

0

Monthly active users

4 days ago

Last modified

Share

Extract and sync Notion databases automatically with AI summaries, incremental updates, and webhook notifications.


Features

  • Incremental Sync - Only process changed items
  • AI Summaries - GPT-4o powered summaries in 6 languages
  • Webhooks - Real-time notifications with HMAC security
  • Enterprise Ready - Auto-retry, rate limiting, change detection

Quick Start

1. Get Notion Integration Token

  1. Go to https://www.notion.so/my-integrations
  2. Click "+ New integration"
  3. Copy the Internal Integration Token (starts with ntn_)

2. Connect to Database

  1. Open your Notion database
  2. Click "⋯" menu → "Add connections" → Add your integration
  3. Copy Database ID from URL:
    https://www.notion.so/{workspace}/{DATABASE_ID}?v=...

3. Configure Actor

{
"NOTION_TOKEN": "secret_your_token_here",
"DATABASE_ID": "your_database_id_here"
}

Configuration

Required

ParameterDescription
NOTION_TOKENNotion integration token
DATABASE_ID32-character database ID

Core Settings

ParameterDefaultDescription
PAGE_SIZE100Items per API request (1-100)
enableIncrementaltrueOnly fetch changed items
maxItemsUnlimitedStop after N items
dryRunfalseTest mode (no state/webhook)

AI Settings

ParameterDefaultDescription
enableAifalseEnable AI summaries
OPENAI_API_KEY-OpenAI API key
aiModelgpt-4o-miniModel: gpt-4o-mini or gpt-4o
aiLanguageenLanguage: en, ro, fr, de, es, it
aiMaxTokens256Max tokens (50-1000)
summarizeFields["title", "properties"]Fields to summarize
aiPromptTemplateDefaultCustom prompt with {{CONTENT}} and {{LANGUAGE}}

Webhook Settings

ParameterDescription
webhookUrlHTTP endpoint for notifications
webhookSecretHMAC secret for verification

Usage Examples

Basic Extraction

{
"NOTION_TOKEN": "secret_abc123...",
"DATABASE_ID": "xyz789..."
}

With AI Summaries

{
"NOTION_TOKEN": "secret_abc123...",
"DATABASE_ID": "xyz789...",
"enableAi": true,
"OPENAI_API_KEY": "sk-...",
"aiModel": "gpt-4o-mini",
"summarizeFields": ["title", "properties"]
}

With Webhooks

{
"NOTION_TOKEN": "secret_abc123...",
"DATABASE_ID": "xyz789...",
"webhookUrl": "https://example.com/webhook",
"webhookSecret": "your-secret"
}

Output Format

{
"id": "page-id",
"title": "Project Alpha",
"url": "https://notion.so/...",
"lastEditedTime": "2024-11-07T15:30:45.000Z",
"createdTime": "2024-01-15T09:00:00.000Z",
"properties": {
"Status": "In Progress",
"Priority": "High",
"Tags": ["urgent"]
},
"summary": "AI-generated summary...",
"hash": "8f7a3b2c...",
"_meta": {
"databaseId": "xyz789...",
"runId": "abc123...",
"isNew": false,
"isUpdated": true,
"language": "en",
"aiModel": "gpt-4o-mini"
}
}

Webhook Payload

{
"runId": "abc123",
"databaseId": "xyz789",
"timestamp": "2024-11-07T15:30:00.000Z",
"newItems": [
{
"id": "page-id",
"title": "New Task",
"url": "https://notion.so/..."
}
],
"updatedItems": [],
"totalProcessed": 42
}

Verify Webhook Signature

const crypto = require('crypto');
function verifyWebhook(secret, timestamp, body, signature) {
const payload = `${timestamp}.${JSON.stringify(body)}`;
const expected = `sha256=${crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex')}`;
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}

Troubleshooting

No Data in Dataset

  • Verify integration permissions
  • Check database connection
  • Confirm correct DATABASE_ID

Rate Limit Errors

  • Actor auto-retries with backoff
  • Reduce PAGE_SIZE if persistent

AI Summaries Empty

  • Set enableAi: true
  • Verify valid OPENAI_API_KEY
  • Check OpenAI API credits

Incremental Not Working

  • Remove dryRun: true
  • Verify enableIncremental: true
  • Check for "State persisted" in logs

Webhook Not Received

  • Ensure URL is publicly accessible
  • Test with curl/Postman
  • Check endpoint accepts POST + JSON

Resources


Made for the Notion and Apify communities