con un clic
ig-saved-sync
Sync Instagram saved posts to Notion Inspiration Library with AI analysis
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Sync Instagram saved posts to Notion Inspiration Library with AI analysis
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
The 1-Prompt Meta Ads Engine. End-to-end Meta ad generation + paused campaign creation workflow. Asks 4 discovery questions, then runs the full pipeline: competitor intel (claude-ads /ads competitor), brand-site scraping for context, bulk image generation (kie.ai gpt-image-2), ad copy (claude-ads /ads creative), and paused Meta campaign creation (Meta Ads MCP). Dynamic Product Ad principles (brand compliance + variant matrix) are applied inline. Saves brand profiles for one-command re-runs. Trigger phrases (auto-fire on any of these in user prompt): - "/ad-engine" or "/ad engine" - "run the ad engine" - "launch ads for [brand]" / "build ads for [brand]" / "generate ads for [brand]" - "build a Meta campaign for [brand]" / "build the campaign for [brand]" - "20 ads for [brand]" / "20 Meta ads for [brand]" - "automate Meta ads" / "automate my Meta ads" - "one prompt ads" / "one-prompt ads" - "fresh ad batch" / "generate a fresh ad batch"
Use when creating Instagram carousels from a reel script, handout, PDF, article, or rough idea. Triggers on "carousel", "Instagram carousel", "IG carousel", "turn this script into slides", "build a carousel", "make slides for IG", "anchor slide", "visual brief". Runs the reference-first workflow (copy → brief → 3 anchor variants → locked anchor → matched slides one at a time → consistency check) and generates real images via the kie.ai gpt-image-2 MCP. Skip for plain captions or non-designed multi-slide posts.
Generate a hand raiser PDF lead magnet (1-5 pages) for any script or standalone topic. Renders a professional guide/cheatsheet/checklist, uploads to Google Drive, and links in Notion.
One-prompt digital footprint removal. Finds where a person's personal data (home address, phone, email, relatives) is exposed across data brokers and people-search sites, checks for breaches, ranks everything by risk, and auto-writes every CCPA/GDPR opt-out and deletion request filled and ready to send, then saves it all as a personal removal kit. Removes the manual searching and letter-writing. Triggers on: "/wipe-footprint", "wipe my footprint", "wipe my digital footprint", "erase me from the internet", "delete my data", "remove my data from data brokers", "stop the spam calls", "opt me out of data brokers".
Use when running inside Claude Design specifically. Produces a valid, brand-accurate HyperFrames video draft using pre-valid skeletons. For Claude Code / Cursor / Codex, use the `hyperframes` skill instead.
Hourly Instagram analytics pipeline that pulls per-post and account-level insights from the Meta Graph API into Supabase, mirrors live values into a Notion dashboard, and runs a daily Claude routine that classifies each post into Outlier/Average/Underperformer tiers with a 2-3 sentence "why" note. Built for content creators who want feedback that compounds, not a vanity follower counter. Triggers on "ig analytics", "instagram analytics", "performance dashboard", "content analytics pipeline", "instagram graph api", "outlier post detection", "tier classification", "creator analytics".
| name | ig-saved-sync |
| version | 1.0.0 |
| description | Sync Instagram saved posts to Notion Inspiration Library with AI analysis |
| type | standalone-script |
| env_vars | ["IG_USERNAME","IG_PASSWORD","COLLECTION_NAME","NOTION_TOKEN","NOTION_DB_ID"] |
| dependencies | ["instagrapi","yt-dlp","openai-whisper","claude (CLI)"] |
Automatically syncs posts from an Instagram saved collection into a Notion Inspiration Library database. Each post gets transcribed (if it's a reel), analyzed by Claude Haiku for hook frameworks and structural patterns, and saved with full metadata.
This runs as a background daemon. You save content on Instagram. It shows up in your Inspiration Library, analyzed and tagged, without you doing anything.
What it accesses:
What it does NOT do:
.env filenpm install -g @anthropic-ai/claude-code)cd ~/ai-content-system/skills/ig-saved-sync
pip install -r requirements.txt
cp .env.example .env
Edit .env with your credentials:
IG_USERNAME=your_username
IG_PASSWORD=your_password
COLLECTION_NAME=AI to emulate
NOTION_TOKEN=ntn_your_token
NOTION_DB_ID=your_database_id
Finding your Notion database ID: Open your Inspiration Library in the browser. The URL looks like notion.so/your-workspace/abc123def456?v=.... The abc123def456 part (32 hex characters) is your database ID.
Run status check first to verify everything connects:
python3 ig-saved-sync.py status
Expected output:
Instagram Saved Sync — Status
========================================
IG Username: your_username
Collection: AI to emulate
Notion DB: abc123de...
Processed posts: 0
Testing Instagram login...
IG login: OK
Collection 'AI to emulate': FOUND
Posts in collection: 47
Unprocessed: 47
Testing Notion API...
Notion DB: OK (Inspiration Library)
If your account has 2FA enabled, the first login will prompt for a code. Run status interactively to establish the session, then automated runs will reuse it.
python3 ig-saved-sync.py backfill --limit 1
Check your Notion database. You should see one new entry with:
run — Incremental Syncpython3 ig-saved-sync.py run
Processes only new posts added since the last run. Skips anything already in the processed state file. This is what the daily automation runs.
backfill — Import Existing Postspython3 ig-saved-sync.py backfill
python3 ig-saved-sync.py backfill --limit 10
python3 ig-saved-sync.py backfill --no-analyze
Options:
--limit N — Only process N posts (useful for testing or rate limit concerns)--no-analyze — Skip Claude analysis, use basic metadata only (faster, cheaper)status — Check Connectionspython3 ig-saved-sync.py status
Verifies Instagram login, collection access, and Notion API connectivity. Shows how many posts are processed vs unprocessed.
Instagram Saved Collection
│
▼
┌─────────────┐ ┌──────────────┐ ┌────────────┐
│ Fetch Posts │────▶│ Transcribe │────▶│ Analyze │
│ instagrapi │ │ yt-dlp + │ │ Claude │
│ │ │ whisper │ │ Haiku │
└─────────────┘ └──────────────┘ └─────┬──────┘
│
▼
┌────────────┐
│ Notion │
│ Inspiration│
│ Library │
└────────────┘
Flow per post:
If transcription fails, analysis still runs using caption + metadata only. If analysis fails, a basic fallback entry is created from the raw metadata.
Each post gets classified into:
| Field | Example |
|---|---|
title | "Contrarian ChatGPT Usage Pattern" |
type | Hook Example, Creator Pattern, Script Format, Carousel Example |
hook_text | "Stop using ChatGPT like this..." |
hook_framework | Curiosity Gap, Proof-First, Pain Point, Contrarian, etc. |
performance_tier | Outlier (100K+ views), Strong (10K+), Reference, Untested |
tags | ["AI Tools", "Tutorial", "Productivity"] |
notes | "Opens with contrarian statement. Rapid demo of wrong vs right." |
Copy the template and customize:
cp launchd-template.plist ~/Library/LaunchAgents/com.user.ig-saved-sync.plist
Edit the path in the plist to match your install location, then load it:
launchctl load ~/Library/LaunchAgents/com.user.ig-saved-sync.plist
This runs the sync daily at 11pm. Check logs at /tmp/ig-saved-sync-stderr.log.
To stop:
launchctl unload ~/Library/LaunchAgents/com.user.ig-saved-sync.plist
crontab -e
Add:
0 23 * * * cd ~/ai-content-system/skills/ig-saved-sync && python3 ig-saved-sync.py run
The script tracks which posts have been processed in state/processed.json. Each entry maps an Instagram media PK to its Notion page ID and sync timestamp.
This means:
run multiple times is safe. It skips already-processed posts.state/processed.json.state/processed.json entirely.Session data (Instagram login cookies) is stored in state/session.json. This avoids re-authentication on each run. Sessions typically last 2-4 weeks before needing a refresh.
.env (never committed to git)state/session.json (local only)--max-budget-usd 0.05 per call (cost cap)--permission-mode bypassPermissions for Claude since it only needs text analysis (no file access, no tools).env, state/, and logs/ should all be in your .gitignore"2FA required but running non-interactively"
Run python3 ig-saved-sync.py status in a terminal to refresh the session with 2FA.
"Collection not found"
The collection name in .env must match exactly (case-sensitive). Run status to see available collection names.
"Notion API error 400" Usually means a property name in the script doesn't match your database. Check that your Inspiration Library has these properties: Title, Type, Source, Platform, Date Added, Source URL, Creator Handle, Performance Tier, Engagement Metric, Topic Tags, Hook Framework, Hook Text, Notes.
Transcription fails silently
Make sure yt-dlp and whisper are installed. Test with: python3 -m yt_dlp --version and python3 -m whisper --help.
Rate limiting from Instagram
Increase RATE_LIMIT_SECONDS in .env. Default is 5 seconds between posts. For backfills, it uses 10 seconds. If you're getting blocked, try 15-20.