> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sprintbrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync Your Snippet Library with a Notion Database

> Connect a Notion database and SprintBrain mirrors it into your snippet library every 5 minutes — bidirectional, incremental, and offline-resilient.

If your team already writes in Notion, keep writing there. SprintBrain connects to your Notion database and keeps both sides in sync automatically, so every teammate's extension stays up to date without anyone manually exporting or importing anything.

## How the sync works

SprintBrain reads your Notion database and mirrors every row into your snippet library. The sync runs in the background every 5 minutes via the Chrome extension — no manual refresh needed. When you edit a snippet inside SprintBrain, that change is pushed back to Notion as a clean row, with a separate body property per language so multi-language variants stay organized and never create duplicate pages.

<Note>
  Triggering a Notion sync directly from the dashboard requires the Chrome extension to be installed and active. The 5-minute background sync runs from the extension's alarm scheduler.
</Note>

## Connecting Notion

<Steps>
  <Step title="Open Settings > Integrations">
    In the SprintBrain dashboard, navigate to **Settings**, then click the **Integrations** tab.
  </Step>

  <Step title="Enter your Notion Integration API key">
    Paste your **Notion Internal Integration Token** (it starts with `secret_`). Generate one at [notion.so/my-integrations](https://www.notion.so/my-integrations) and make sure your integration has access to the database you want to sync.
  </Step>

  <Step title="Enter the Notion Database ID">
    Paste the **32-character Database ID** from your Notion database URL. The ID is the string of characters in the URL between the last `/` and the `?` — for example:

    ```
    https://www.notion.so/myworkspace/abc123...def456?v=...
    ```

    The database ID here is `abc123...def456`.
  </Step>

  <Step title="Click Connect">
    Click **Save credentials**. SprintBrain immediately performs an initial sync, pulling all rows from your Notion database into your library.
  </Step>

  <Step title="Credentials are shared automatically">
    Your Notion credentials are stored in your SprintBrain account and synced to the Chrome extension automatically. You don't need to enter them a second time in the extension.
  </Step>
</Steps>

## Sync behavior details

| Behavior               | Details                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Direction**          | Fully bidirectional — changes flow from Notion into SprintBrain and from SprintBrain back to Notion.                       |
| **Frequency**          | Automatically every **5 minutes** while the Chrome extension is active.                                                    |
| **Incremental sync**   | Only snippets edited since the last sync are processed, based on the last-edited timestamp — so large libraries stay fast. |
| **Offline resilience** | Changes are cached locally when the network is unavailable and synced the next time connectivity returns.                  |

<AccordionGroup>
  <Accordion title="Retry behavior">
    The sync retries up to **3 times** on transient errors — including `5xx` server errors and `429` rate-limit responses from the Notion API — with back-off between attempts.
  </Accordion>

  <Accordion title="Multi-language variants">
    Each snippet language (EN, IT, ES, FR, MULTI) is stored in a separate body property on the Notion row. This keeps multi-language templates neatly organized in a single row rather than scattered across duplicate pages.
  </Accordion>
</AccordionGroup>

## Force sync

If you need your latest changes to appear immediately without waiting for the next 5-minute cycle, click **Force Sync** in **Settings > Integrations**. This triggers an out-of-cycle full sync right away.

## Notion approval workflow

SprintBrain fits naturally into a Notion-based review process. Team members can comment on snippet wording directly inside Notion and use Notion's built-in approval mechanisms. Once the wording is approved and saved, it reaches every teammate's extension within the next sync cycle — no separate deployment step required.

<Warning>
  Your Notion API key and Database ID are stored securely in your SprintBrain account and are used exclusively to communicate with the Notion API. They are never shared with third parties or used for any other purpose.
</Warning>
