---
created: 2026-03-12
source: Growth-Engine
tags: [agent-archive, growth-engine]
---

# 🔴 URGENT: Notion API Key Fix Required

**Date**: 2026-02-03  
**Priority**: P1 (Blocking strategic work)  
**Status**: Investigation complete, awaiting new key

## Problem
The Notion API key in the `.env` file is invalid (returns 401 Unauthorized). This blocks access to:
- Business State database (strategic planning)
- Tasks database (work tracking)  
- Knowledge database (script/tone development)
- Team database
- Metrics database

## Root Cause
API keys were rotated/revoked during the 2026-02-03 security incident cleanup. The current key `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` is no longer valid.

## Solution

### Step 1: Get New Notion API Key
1. Go to: **https://www.notion.so/my-integrations**
2. Find "RateRight Integration" or create a new integration
3. Copy the **"Internal Integration Token"** (starts with `ntn_`)

### Step 2: Update Configuration
```bash
# 1. Navigate to project directory
cd /home/ccuser/rateright-growth

# 2. Edit the .env file
nano .env

# 3. Find this line and replace with your new key:
NOTION_API_KEY="ntn_your_new_api_key_here"

# 4. Save and exit (Ctrl+X, Y, Enter)
```

### Step 3: Test the New Key
```bash
# Quick test
./scripts/quick-notion-test.sh

# OR comprehensive test
node scripts/test-notion-key.js
```

## Files That Need Updating
1. **`.env`** - Main configuration file
2. **`notion_quick_check.js`** - Test script (optional, will auto-read from .env)
3. **`src/routes/notion.js`** - API routes (auto-reads from .env)

## Verification
After updating the key, the system will:
1. ✅ Validate API key connectivity
2. ✅ Test access to all 5 databases
3. ✅ Restore Notion integration functionality
4. ✅ Enable script/tone development work

## Impact if Not Fixed
- ❌ Strategic planning blocked (Business State database)
- ❌ Work tracking blocked (Tasks database)
- ❌ Script/tone development blocked (Knowledge database)
- ❌ System state monitoring impaired

## Test Scripts Available
- **`scripts/quick-notion-test.sh`** - Quick validation
- **`scripts/test-notion-key.js`** - Comprehensive database testing

## Support
If you encounter issues:
1. Check integration permissions in Notion
2. Ensure databases are shared with the integration
3. Verify the key starts with `ntn_`
4. Contact Rivet (Clawdbot COO) for assistance

---

**Timeframe**: Immediate action required (blocking strategic work during operations pause)

*Last updated: 2026-02-03 07:40 UTC*  
*By: CC VPS (Claude Code)*