---
title: "Konektor Notion"
description: "Panduan integrasi Notion lengkap untuk menyinkronkan database, halaman, dan konten workspace dengan Brevo melalui Tajo."
url: https://tajo.io/in/docs/connectors/custom/notion/
markdown: https://tajo.io/in/docs/connectors/custom/notion.md
lang: id-ID
robots: noindex
---

Ajukan akses awal

Masukkan nama depan dan alamat email kerja Anda. Kami akan mengirim tautan untuk mengonfirmasi permintaan akses Tajo.

# Konektor Notion

Status konektor: Direncanakan Belum dibangun. Tajo belum menjalankan konektor ini.

| Field sumber | Field tujuan | Nilai contoh |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

Hubungkan workspace Notion Anda ke Brevo untuk alur kerja pemasaran berbasis konten, sinkronisasi database CRM, dan notifikasi otomatis melalui Tajo.

## Ikhtisar

| Properti | Nilai |
| --- | --- |
| **Platform** | Notion |
| **Kategori** | Custom |
| **Kompleksitas setup** | Mudah |
| **Integrasi resmi** | Tidak |
| **Data yang disinkronkan** | Database, halaman, pengguna |
| **Tipe API** | REST API |
| **Autentikasi** | Internal Integration Token / OAuth 2.0 |
| **Base URL** | `https://api.notion.com` |
| **Versi API** | `2022-06-28` (via header `Notion-Version`) |

## Fitur

- **Sinkronisasi database** - Sinkronkan entri database Notion ke kontak dan list Brevo
- **Jembatan CRM** - Gunakan database Notion sebagai CRM ringan yang tersinkron ke Brevo
- **Notifikasi konten** - Picu kampanye Brevo saat halaman Notion diterbitkan
- **Pemetaan properti** - Petakan properti database Notion ke atribut kontak Brevo
- **Pemantauan halaman** - Lacak pembaruan halaman dan teruskan sebagai event Brevo
- **Sinkronisasi direktori pengguna** - Sinkronkan anggota workspace Notion ke kontak Brevo

## Prasyarat

Sebelum memulai, pastikan Anda memiliki:

1. Workspace Notion dengan akses admin
2. Integrasi internal Notion atau aplikasi OAuth
3. Halaman database yang dibagikan dengan integrasi tersebut
4. Akun Brevo dengan akses API
5. Akun Tajo dengan langganan aktif

## Autentikasi

Notion mendukung dua metode autentikasi.

### Opsi 1: Integrasi internal (direkomendasikan untuk satu workspace)

1. Buka [notion.so/my-integrations](https://www.notion.so/my-integrations)
2. Klik **New integration**
3. Beri nama “Tajo Integration”
4. Pilih workspace Anda
5. Tetapkan capabilities:

```
Content Capabilities:
  Read content: ✓
  Update content: ✓
  Insert content: ✓

User Capabilities:
  Read user information: ✓
```

6. Salin **Internal Integration Secret** (diawali dengan `ntn_`)

Halaman wajib dibagikan

Integrasi internal hanya bisa mengakses halaman dan database yang secara eksplisit dibagikan kepadanya. Bagikan setiap database tujuan ke integrasi Anda melalui menu ”…” > “Connections” > pilih integrasi Anda.

### Opsi 2: OAuth 2.0 (integrasi publik)

Untuk integrasi yang melayani banyak workspace, gunakan alur OAuth 2.0:

1. Daftarkan integrasi Anda sebagai integrasi publik
2. Arahkan pengguna ke: `https://api.notion.com/v1/oauth/authorize?client_id=...`
3. Tukarkan code dengan access token di `/v1/oauth/token`

### Menghubungkan ke Tajo

```bash
tajo connectors install notion \
  --token $NOTION_TOKEN
```

## Konfigurasi

### Setup dasar

```yaml
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
```

### Pemetaan field

Petakan properti database Notion ke atribut kontak Brevo:

```yaml
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
```

## Endpoint API

Tajo terintegrasi dengan endpoint Notion API berikut:

| Endpoint | Metode | Tujuan |
| --- | --- | --- |
| `/v1/databases/{id}/query` | POST | Mengkueri entri database |
| `/v1/databases/{id}` | GET | Mengambil skema database |
| `/v1/pages` | POST | Membuat halaman baru |
| `/v1/pages/{id}` | GET | Mengambil properti halaman |
| `/v1/pages/{id}` | PATCH | Memperbarui properti halaman |
| `/v1/blocks/{id}/children` | GET | Mengambil block turunan |
| `/v1/users` | GET | Menampilkan semua pengguna workspace |
| `/v1/users/{id}` | GET | Mengambil satu pengguna |
| `/v1/search` | POST | Mencari di seluruh workspace |

## Contoh kode

### Inisialisasi konektor

```javascript
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
});
```

### Menyinkronkan database ke Brevo

```javascript
// Sync a Notion database to a Brevo list
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
// }
```

### Mengkueri dan memfilter

```javascript
// Query Notion database with filters
const results = await tajo.connectors.query('notion', {
  databaseId: 'abc123def456',
  filter: {
    property: 'Status',
    select: { equals: 'Active' }
  },
  sorts: [
    { property: 'Last Contact', direction: 'descending' }
  ]
});
```

### Membuat halaman dari event Brevo

```javascript
// Create a Notion page when a Brevo contact reaches a milestone
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() } }
      }
    });
  }
});
```

## Batas rate

Notion menerapkan batas rate per integrasi:

| Tipe batas | Nilai |
| --- | --- |
| **Batas rate** | 3 permintaan per detik per integrasi |
| **Batas burst** | Burst singkat diizinkan, setelah itu dibatasi |
| **Ukuran halaman** | Maksimum 100 item per permintaan berpaginasi |

Paginasi berbasis cursor

Notion menggunakan paginasi berbasis cursor. Tajo menanganinya secara otomatis, menelusuri seluruh halaman memakai parameter `next_cursor` sampai `has_more` mengembalikan `false`.

Notion mengembalikan `429 Too Many Requests` saat batas rate terlampaui, disertai header `Retry-After`.

## Pemecahan masalah

### Masalah umum

| Masalah | Penyebab | Solusi |
| --- | --- | --- |
| 401 Unauthorized | Token tidak valid atau kedaluwarsa | Buat ulang token integrasi |
| 403 Forbidden | Halaman tidak dibagikan ke integrasi | Bagikan halaman/database ke integrasi melalui Connections |
| 404 Object not found | ID database salah atau tidak dibagikan | Periksa ID database dan pengaturan berbagi |
| Properti hilang | Skema tidak cocok | Sinkronkan ulang skema database dan perbarui pemetaan field |
| Batas rate terlampaui | Terlalu banyak permintaan beruntun | Kurangi frekuensi sinkronisasi atau ukuran batch |

### Mode debug

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

### Menguji koneksi

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

## Praktik terbaik

1. **Bagikan database secara eksplisit** - Integrasi internal hanya melihat konten yang dibagikan
2. **Gunakan kueri database dibanding search** - Kueri lebih cepat dan lebih andal untuk database yang sudah diketahui
3. **Petakan tipe properti dengan cermat** - Notion memiliki banyak tipe properti; cocokkan dengan tipe atribut Brevo
4. **Tangani paginasi** - Selalu telusuri seluruh halaman cursor untuk data yang lengkap
5. **Sinkronkan secara inkremental** - Gunakan filter `last_edited_time` agar hanya entri yang berubah tersinkron
6. **Siapkan jadwal polling** - Notion tidak mendukung webhook secara native; lakukan polling pada interval tetap

## Keamanan

- **Autentikasi Bearer Token** - Integration secret dan token OAuth
- **Hanya HTTPS** - Seluruh komunikasi API dienkripsi via TLS 1.2+
- **Akses tersegmentasi** - Integrasi hanya mengakses konten yang dibagikan secara eksplisit
- **OAuth 2.0** - Alur otorisasi aman untuk integrasi publik
- **Penyimpanan terenkripsi** - Token dienkripsi saat disimpan di Tajo
- **Isolasi workspace** - Setiap integrasi dibatasi pada satu workspace

## Sumber daya terkait

- [Konektor Airtable](https://tajo.io/in/docs/connectors/custom/airtable)
- [Konektor GitHub](https://tajo.io/in/docs/connectors/custom/github)
- [Konektor Linear](https://tajo.io/in/docs/connectors/custom/linear)
- [Brevo Contacts API](https://tajo.io/in/docs/contact-management)
