Notion acts as a headless CMS for your plugin — powering in-app announcements and onboarding screens. Content is managed in Notion databases, fetched via the Notion API through a Cloudflare Worker, and displayed directly inside your plugin.


Quick Setup

To enable Notion CMS in your project, you need three things:

  1. Select notion as a service during unoff create figma-plugin
  2. Add these variables to your .env.local file:
VITE_NOTION_API_KEY=your-notion-api-key
VITE_NOTION_ANNOUNCEMENTS_ID=your-announcements-database-id
VITE_NOTION_ONBOARDING_ID=your-onboarding-database-id
  1. Add the announcement worker:
unoff add announcement-worker
npm install

Step 1 — Create a Notion integration

  1. Go to notion.so/my-integrations and click New integration
  2. Give it a name (e.g. "My Plugin CMS")
  3. Select the workspace where your content databases will live
  4. Under Capabilities, enable Read content (that's all you need)
  5. Click Submit and copy the Internal Integration Secret — this is your VITE_NOTION_API_KEY

<aside> ⚠️

In local development, the API key is read from your .env.local file. In production, store it as a Cloudflare Worker secret with wrangler secret put NOTION_API_KEY — never expose it in client-side code.

</aside>


Step 2 — Duplicate the template databases

Unoff provides two ready-to-use Notion database templates. Duplicate them into your workspace: