Notion कनेक्टर

content-driven marketing workflows, CRM database synchronization, और स्वचालित notifications के लिए अपने Notion workspace को Tajo के माध्यम से Brevo से कनेक्ट करें।

अवलोकन

PropertyValue
PlatformNotion
CategoryCustom
Setup ComplexityEasy
Official IntegrationNo
Data SyncedDatabases, Pages, Users
API TypeREST API
AuthenticationInternal Integration Token / OAuth 2.0
Base URLhttps://api.notion.com
API Version2022-06-28 (via Notion-Version header)

विशेषताएं

  • Database sync - Notion database entries को Brevo contacts और lists से sync करें
  • CRM bridge - Notion databases को एक lightweight CRM के रूप में उपयोग करें, Brevo से synced
  • Content notifications - जब Notion pages publish हों तो Brevo campaigns trigger करें
  • Property mapping - Notion database properties को Brevo contact attributes से map करें
  • Page monitoring - page updates ट्रैक करें और Brevo events के रूप में forward करें
  • User directory sync - Notion workspace members को Brevo contacts से sync करें

पूर्वावश्यकताएं

शुरू करने से पहले, सुनिश्चित करें कि आपके पास हैं:

  1. admin access वाला एक Notion workspace
  2. एक Notion internal integration या OAuth app
  3. integration के साथ shared database pages
  4. API access वाला एक Brevo account
  5. सक्रिय subscription वाला एक Tajo account

प्रमाणीकरण

Notion दो authentication methods को support करता है।

विकल्प 1: Internal Integration (single workspace के लिए अनुशंसित)

  1. notion.so/my-integrations पर जाएं
  2. New integration पर क्लिक करें
  3. इसे “Tajo Integration” नाम दें
  4. अपना workspace चुनें
  5. capabilities सेट करें:
Content Capabilities:
Read content: ✓
Update content: ✓
Insert content: ✓
User Capabilities:
Read user information: ✓
  1. Internal Integration Secret कॉपी करें (ntn_ से शुरू होता है)

Page Sharing आवश्यक

Internal integrations केवल उन्हीं pages और databases तक पहुंच सकते हैं जो स्पष्ट रूप से उनके साथ share किए गए हैं। ”…” menu > “Connections” > अपना integration चुनें के माध्यम से प्रत्येक target database को अपने integration के साथ share करें।

विकल्प 2: OAuth 2.0 (Public integrations)

कई workspaces की सेवा करने वाले integrations के लिए, OAuth 2.0 flow का उपयोग करें:

  1. अपने integration को public integration के रूप में register करें
  2. users को redirect करें: https://api.notion.com/v1/oauth/authorize?client_id=...
  3. /v1/oauth/token पर access token के लिए code exchange करें

Tajo से कनेक्ट करना

Terminal window
tajo connectors install notion \
--token $NOTION_TOKEN

कॉन्फ़िगरेशन

बेसिक सेटअप

connectors:
notion:
enabled: true
api_version: "2022-06-28"
sync:
databases: true
pages: false
users: true
databases:
- id: "abc123def456"
name: "Customers"
sync_to_list: 25
- id: "ghi789jkl012"
name: "Leads"
sync_to_list: 26

Field Mapping

Notion database properties को Brevo contact attributes से map करें:

field_mapping:
# Notion property -> Brevo attribute
Name:
type: title
target: FIRSTNAME
Email:
type: email
target: email
Phone:
type: phone_number
target: SMS
Company:
type: rich_text
target: COMPANY
Status:
type: select
target: LEAD_STATUS
Deal Value:
type: number
target: DEAL_VALUE
Last Contact:
type: date
target: LAST_CONTACT_DATE
Tags:
type: multi_select
target: TAGS

API Endpoints

Tajo निम्नलिखित Notion API endpoints के साथ integrate करता है:

EndpointMethodउद्देश्य
/v1/databases/{id}/queryPOSTdatabase entries क्वेरी करें
/v1/databases/{id}GETdatabase schema पुनः प्राप्त करें
/v1/pagesPOSTएक नया page बनाएं
/v1/pages/{id}GETpage properties पुनः प्राप्त करें
/v1/pages/{id}PATCHpage properties अपडेट करें
/v1/blocks/{id}/childrenGETblock children पुनः प्राप्त करें
/v1/usersGETसभी workspace users list करें
/v1/users/{id}GETएक user पुनः प्राप्त करें
/v1/searchPOSTपूरे workspace में खोजें

कोड उदाहरण

कनेक्टर शुरू करें

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
await tajo.connectors.connect('notion', {
token: process.env.NOTION_TOKEN
});

Database को Brevo से Sync करें

// Notion database को Brevo list से sync करें
await tajo.connectors.sync('notion', {
type: 'full',
resources: ['databases'],
databaseId: 'abc123def456',
targetList: 25
});
const status = await tajo.connectors.status('notion');
console.log(status);
// {
// connected: true,
// lastSync: '2024-03-15T14:30:00Z',
// databasesSynced: 2,
// pagesTracked: 1450,
// usersCount: 32
// }

Query और Filter

// filters के साथ Notion database क्वेरी करें
const results = await tajo.connectors.query('notion', {
databaseId: 'abc123def456',
filter: {
property: 'Status',
select: { equals: 'Active' }
},
sorts: [
{ property: 'Last Contact', direction: 'descending' }
]
});

Brevo Event से Page बनाएं

// जब Brevo contact किसी milestone पर पहुंचे तो Notion page बनाएं
tajo.events.on('contact.attribute_updated', async (event) => {
if (event.attribute === 'LIFECYCLE_STAGE' && event.value === 'customer') {
await tajo.connectors.create('notion', {
databaseId: 'ghi789jkl012',
properties: {
Name: { title: [{ text: { content: event.contact.name } }] },
Email: { email: event.contact.email },
'Converted Date': { date: { start: new Date().toISOString() } }
}
});
}
});

Rate Limits

Notion प्रति integration rate limits लागू करता है:

Limit TypeValue
Rate limitप्रति integration 3 requests प्रति सेकंड
Burst limitछोटे bursts की अनुमति, फिर throttled
Page sizeप्रति paginated request अधिकतम 100 items

Cursor-आधारित Pagination

Notion cursor-आधारित pagination का उपयोग करता है। Tajo इसे स्वचालित रूप से संभालता है, has_more के false लौटने तक next_cursor parameter का उपयोग करके सभी pages के माध्यम से iterate करता है।

जब rate limits पार हो जाते हैं तो Notion 429 Too Many Requests लौटाता है, Retry-After header के साथ।

समस्या निवारण

सामान्य समस्याएं

समस्याकारणसमाधान
401 Unauthorizedअमान्य या expired tokenintegration token पुनः generate करें
403 ForbiddenPage integration के साथ share नहींConnections के माध्यम से page/database को integration के साथ share करें
404 Object not foundDatabase ID गलत या share नहींdatabase ID और sharing settings सत्यापित करें
Properties गायबSchema mismatchdatabase schema पुनः sync करें और field mapping अपडेट करें
Rate limit exceededबहुत अधिक rapid requestssync frequency या batch size कम करें

Debug Mode

connectors:
notion:
debug: true
log_level: verbose
log_api_calls: true

Connection Test करें

Terminal window
tajo connectors test notion
# ✓ API authentication successful
# ✓ Database access verified
# ✓ User list accessible
# ✓ Search operational
# ✓ Page creation available

सर्वोत्तम प्रथाएं

  1. Databases को स्पष्ट रूप से share करें - Internal integrations केवल shared content देखते हैं
  2. Search के बजाय database queries का उपयोग करें - ज्ञात databases के लिए Queries तेज और अधिक विश्वसनीय होती हैं
  3. Property types को सावधानी से map करें - Notion में कई property types हैं; उन्हें Brevo attribute types से match करें
  4. Pagination संभालें - पूर्ण data के लिए हमेशा सभी cursor pages के माध्यम से iterate करें
  5. Incrementally sync करें - केवल बदली गई entries sync करने के लिए last_edited_time filters का उपयोग करें
  6. Polling schedule सेट करें - Notion natively webhooks को support नहीं करता; नियमित अंतराल पर poll करें

सुरक्षा

  • Bearer Token Authentication - Integration secrets और OAuth tokens
  • HTTPS Only - सभी API communication TLS 1.2+ के माध्यम से encrypted
  • Scoped Access - Integrations केवल explicitly shared content तक पहुंचते हैं
  • OAuth 2.0 - public integrations के लिए सुरक्षित authorization flow
  • Encrypted Storage - Tokens Tajo में at rest encrypted
  • Workspace Isolation - प्रत्येक integration एक single workspace तक scoped है

संबंधित संसाधन

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

auto-detect
AI सहायक

नमस्ते! डॉक्यूमेंटेशन के बारे में कुछ भी पूछें।