npm install @notion/client csv-parser- Go to https://www.notion.so/my-integrations
- Click "New integration"
- Name it "SEED Foundry Migration"
- Select your workspace
- Copy the Internal Integration Token
For each database you want to migrate:
- Open the database in Notion
- Click "..." → "Add connections"
- Select your "SEED Foundry Migration" integration
- Open each database in Notion
- Copy the URL - the database ID is the long string after the last
/and before?- Example:
https://notion.so/workspace/DATABASE_ID?v=...
- Example:
Add to your .env.local:
# Existing Supabase config
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Notion API Configuration
NOTION_TOKEN=your_notion_integration_token
# Notion Database IDs (get these from your Notion URLs)
NOTION_GOALS_DATABASE_ID=your_goals_database_id
NOTION_ENTITY_TYPES_DATABASE_ID=your_entity_types_database_id
NOTION_BUSINESS_MODELS_DATABASE_ID=your_business_models_database_id
NOTION_FUNDING_OPTIONS_DATABASE_ID=your_funding_options_database_idRun this SQL in your Supabase dashboard → SQL Editor:
-- Copy and paste the content from supabase/migrations/fix_rls_security.sql- Name (Title): Goal name
- Status (Select): Draft/Done
- Name (Title): Entity type name
- Description (Text): Description
- Advantages (Multi-select): List of advantages
- Disadvantages (Multi-select): List of disadvantages
- Examples (Text): Example companies
- Resources (Text or URL): Resource links
- Status (Select): Draft/Done
- Goal Rating Columns (Number): One column per goal with ratings 0-1
- Same structure as Entity Types
- Same structure as Entity Types
# Test connection first
node scripts/migrate-from-notion.js
# If successful, your data will be imported!The app will automatically use real data once migration is complete!
-
"Notion connection failed"
- Check your
NOTION_TOKENin.env.local - Ensure integration has access to databases
- Check your
-
"Database not found"
- Verify database IDs in
.env.local - Make sure databases are shared with integration
- Verify database IDs in
-
"Property not found"
- Check that your Notion database columns match expected names
- Adjust property names in the migration script if needed
If your Notion columns have different names, update these in migrate-from-notion.js:
// Current expected names:
props.Name?.title // → name
props.Description?.rich_text // → description
props.Advantages?.multi_select // → advantages
props.Status?.select // → statusAfter successful migration:
- Your app will display real data from Supabase
- You can continue adding data through Notion
- Re-run migration script to sync new data
- Consider setting up automated sync if needed
If you encounter issues:
- Check the console output for specific error messages
- Verify all environment variables are set correctly
- Ensure Notion databases have the expected column structure