Notion AI Database Extractor & Sync Tool

Notion AI Database Extractor & Sync Tool

by tuguidragos

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

17 runs
2 users
Try This Actor

Opens on Apify.com

About 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.

What does this actor do?

Notion AI Database Extractor & Sync Tool is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Apify Actor Node.js TypeScript Notion API OpenAI API Zod License: Proprietary

Seamlessly sync, summarize, and monitor Notion data. Built for scale. Enriched by AI.

--- ## Features - Incremental Sync - Only process changed items - AI Summaries - GPT-4o powered summaries with automatic language detection - Webhooks - Real-time notifications with HMAC security - Enterprise Ready - Memory protection, type safety, auto-retry, and 100k+ item capacity --- ## 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 json { "NOTION_TOKEN": "secret_your_token_here", "DATABASE_ID": "your_database_id_here" } --- ## Configuration ### Required | Parameter | Description | |-----------|-------------| | NOTION_TOKEN | Notion integration token | | DATABASE_ID | 32-character database ID | ### Core Settings | Parameter | Default | Description | |-----------|---------|-------------| | PAGE_SIZE | 100 | Items per API request (1-100) | | enableIncremental | true | Only fetch changed items | | maxItems | Unlimited | Stop after N items | | dryRun | false | Test mode (no state/webhook) | | strictMode | false | Fail on AI errors | ### AI Settings | Parameter | Default | Description | |-----------|---------|-------------| | enableAi | false | Enable AI summaries | | OPENAI_API_KEY | - | OpenAI API key | | aiModel | gpt-4o-mini | Model: gpt-4o-mini or gpt-4o | | aiMaxTokens | 256 | Max tokens (50-1000) | | aiConcurrency | 5 | Max parallel AI requests (1-50) | | summarizeFields | ["title", "properties"] | Fields to summarize | | aiPromptTemplate | Default | Custom prompt with {{CONTENT}} | ### Webhook Settings | Parameter | Description | |-----------|-------------| | webhookUrl | HTTP endpoint for notifications | | webhookSecret | HMAC secret for verification | --- ## Usage Examples ### Basic Extraction json { "NOTION_TOKEN": "secret_abc123...", "DATABASE_ID": "xyz789..." } ### With AI Summaries json { "NOTION_TOKEN": "secret_abc123...", "DATABASE_ID": "xyz789...", "enableAi": true, "OPENAI_API_KEY": "sk-...", "aiModel": "gpt-4o-mini", "summarizeFields": ["title", "properties"] } ### With Webhooks json { "NOTION_TOKEN": "secret_abc123...", "DATABASE_ID": "xyz789...", "webhookUrl": "https://example.com/webhook", "webhookSecret": "your-secret" } --- ## Output Format json { "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, "aiModel": "gpt-4o-mini" } } --- ## Webhook Payload json { "runId": "abc123", "databaseId": "xyz789", "timestamp": "2024-11-07T15:30:00.000Z", "newItems": [ { "id": "page-id", "title": "New Task", "url": "https://notion.so/..." } ], "updatedItems": [], "newItemsCount": 42, "updatedItemsCount": 0, "totalProcessed": 42 } > Note: For performance stability, newItems and updatedItems arrays in the webhook are limited to the latest 1000 entries. Use newItemsCount / updatedItemsCount for total metrics, and access the Apify Dataset for the full list of items. ### Verify Webhook Signature javascript 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 ---

Built with 🩶 for the Apify community 🫡

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Notion AI Database Extractor & Sync Tool now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
tuguidragos
Pricing
Paid
Total Runs
17
Active Users
2
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support