Setup guide
Openclaw Reels Setup
Guide This is the docs-first version of the guide. If you want followers to actually reproduce the reel script, this is the setup they need. What this system actually is If you give followers only OpenClaw install steps, they will not get the reel workflow you
OpenClaw Reel Intelligence: Complete Setup
Guide This is the docs-first version of the guide.
The goal is simple
- You forward a reel to a dedicated Instagram intake account.
- The system detects the new reel.
- It downloads the reel and analyzes it with Gemini.
- It turns the result into useful actions.
- It sends those options back to you in Discord.
If you want followers to actually reproduce the reel script, this is the setup they need. What this system actually is
This workflow is not just "install OpenClaw."
It is five layers working together
- OpenClaw for the agent, Gateway, and chat-channel routing.
- Instagram intake runtime for detecting new reel shares.
- yt-dlp + ffprobe + ffmpeg for downloading and validating the reel.
- Gemini for multimodal video analysis.
- Discord delivery for the final "what do you want me to do with this?" message.
Important
OpenClaw alone does not watch Instagram.
If you give followers only OpenClaw install steps, they will not get the reel workflow you described.
To make this reproducible, you need to distribute both
the guide the Instagram reel intake runtime package
The two trigger paths There are two valid ways to detect a new reel.
Path A: Recommended creator setup
This is the practical path for most followers.
A dedicated logged-in Instagram browser profile
One dedicated DM thread
Local polling No public server required
No Meta App Review required to get started
Use this first.
Path B: Official Meta API setup
This is the advanced path.
Instagram Professional account
Facebook Page connection
Meta developer app Webhook endpoint Access token management
Usually App Review before broader production use
Use this only if you want a server-side deployment or multi-account production workflow.
End-to-end architecture
flowchart LR
A["Main Instagram Account"] –> B["Dedicated Intake Account / DM Thread"]
B –> C["Trigger Layer"]
C –>|Path A| D["Browser Profile + Polling"]
C –>|Path B| E["Meta App + Webhook"]
D –> F["Resolve Reel URL"]
E –> F
F –> G["Download with yt-dlp"]
G –> H["Validate with ffprobe / ffmpeg"]
H –> I["Upload to Gemini"]
I –> J["Structured JSON Analysis"]
J –> K["OpenClaw Action Layer"]
K –> L["Discord Reply with Options"]
What followers must have before they start Accounts
A dedicated Instagram intake account
Their normal/main Instagram account
A Google account with Gemini access
A Discord account
A Meta developer account only if they want the official API path Software
macOS or Linux, or Windows with WSL2
Node 22+; Node 24 is recommended by current OpenClaw docs
OpenClaw
yt-dlp ffmpeg and ffprobe Files you need to give them If this is a public setup guide, the follower needs a runtime package such as:
openclaw-instagram-intake/
tools/ openclaw_instagram_reel_intake.mjs openclaw_reel_queue_consumer.sh watch_reel_gemini.mjs openclaw_instagram_telegram_notifier.mjs automation/ instagram-reel-intake/ SYSTEM.md Without that runtime package, the guide is incomplete.
Part 1: Install OpenClaw
Official install docs
OpenClaw Getting Started
OpenClaw Install
OpenClaw Windows / WSL2
macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw doctor
openclaw status
openclaw dashboard
Windows
OpenClaw recommends WSL2 on Windows.
wsl –install
After Ubuntu opens, run
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw doctor
openclaw status
openclaw dashboard
Part 2: Connect Discord
Official docs
OpenClaw Discord
OpenClaw Channels CLI
Discord Developer Portal setup
- Go to the Discord Developer Portal.
- Create a new application.
- Add a bot.
- Enable Message Content Intent.
- Server Members Intent is recommended.
- Invite the bot to a private server or prepare to use DMs.
- Copy:
Bot token
Server ID
Channel ID or your user ID
OpenClaw Discord configuration
export DISCORD_BOT_TOKEN="YOUR_BOT_TOKEN"
openclaw config set channels.discord.token --ref-provider default --ref-source
env –ref-id DISCORD_BOT_TOKEN
openclaw config set channels.discord.enabled true --strict-json
openclaw gateway restart
openclaw pairing list discord
openclaw pairing approve discord YOUR_CODE
Part 3: Install the Instagram reel intake runtime
This is the piece your followers will not get from OpenClaw alone.
Place the runtime package in a stable path, for example
export RUNTIME_ROOT="$HOME/openclaw-instagram-intake"
The runtime should contain
ls "$RUNTIME_ROOT/tools"
Expected tools
openclaw_instagram_reel_intake.mjs openclaw_reel_queue_consumer.sh watch_reel_gemini.mjs a notifier layer Recommended environment
export RUNTIME_ROOT="$HOME/openclaw-instagram-intake"
export OPENCLAW_IG_INTAKE_ROOT_DIR="$RUNTIME_ROOT"
export OPENCLAW_IG_INTAKE_PROFILE_ROOT="$RUNTIME_ROOT/automation/instagram-
reel-intake/browser-profile"
export OPENCLAW_IG_INTAKE_SENDER="YOUR_MAIN_INSTAGRAM_USERNAME"
export OPENCLAW_IG_INTAKE_DEBUG_PORT="9333"
export OPENCLAW_GATEWAY_URL="http://127.0.0.1:18789"
Install media tools
Use your platform package manager to install
yt-dlp ffmpeg ffprobe
On macOS, a common setup is
brew install yt-dlp ffmpeg
Part 4: Set up the Instagram intake account
This part matters more than people think. Use one dedicated intake account Do not use your main creator account as the automation account.
Use
one main account that you scroll with
one dedicated intake account that OpenClaw controls
Use one dedicated DM thread
Create one DM thread between
your main account your intake account Use this thread only for forwarded reels. Do not mix regular chat into it.
Part 5: Recommended path that works today
This is the creator quick-start path.
Step 1: Launch the intake browser profile
node "$RUNTIME_ROOT/tools/openclaw_instagram_reel_intake.mjs" launch-profile
Then
- Log into Instagram in that browser profile.
- Open the dedicated DM thread.
- Keep this profile separate from your normal browsing profile.
Step 2: Bind the DM thread
node "$RUNTIME_ROOT/tools/openclaw_instagram_reel_intake.mjs" bind-thread —
thread-url "https://www.instagram.com/direct/t/YOUR_THREAD_ID/"
Step 3: Check status
node "$RUNTIME_ROOT/tools/openclaw_instagram_reel_intake.mjs" status
Step 4: Make sure Gemini login is ready
The runtime uploads video to Gemini in a dedicated analysis browser profile.
Before you automate anything, make sure
you can open Gemini in the analysis profile you are already logged in you can upload a video manually once If you skip this, the queue consumer will fail later.
Step 5: Test the detector
Forward a reel from your main Instagram account into the dedicated DM thread, then run:
node "$RUNTIME_ROOT/tools/openclaw_instagram_reel_intake.mjs" poll
If detection works, the runtime should
- read the newest visible share
- resolve the reel URL
- fingerprint it
- download it locally
- write a pending job into the queue
Step 6: Run the Gemini consumer
bash "$RUNTIME_ROOT/tools/openclaw_reel_queue_consumer.sh" once
This stage should
- claim the next pending job
- confirm the downloaded file exists
- upload the video to Gemini
- wait for upload settlement
- submit the analysis prompt
- recover strict JSON
- mark the queue item as completed
Step 7: Run everything in a loop
The reference runtime uses a local daemon loop.
bash "$RUNTIME_ROOT/tools/openclaw_instagram_reel_daemon.sh"
That loop does three things
- poll Instagram
- process one queue job
- send one completion notification
Part 6: What Gemini actually returns
The local runtime uses a strict JSON schema with fields like
summary main_message spoken_or_onscreen_text style_cues one_line transcript telegram_reply telegram_question
The prompt shape is effectively
Watch this reel carefully. Return valid JSON only. Extract the summary, main message, spoken or on-screen text, style cues, one-line takeaway, transcript, and a short follow-up reply. This is the moment where the system turns a reel into structured data instead of just saving it. Part 7: Make it match the reel script exactly
Your reel script says
"A few minutes later, OpenClaw messages me on Discord." That means your follower-facing setup cannot stop at Telegram. The local reference runtime today The local runtime you built today ends in a Telegram notifier script. That is fine for internal testing, but it does not match the public script exactly. To match the reel script, the final delivery layer must be Discord
There are two good ways to do that
- Replace the Telegram notifier with a Discord notifier.
- Keep the queue and Gemini stages exactly the same and only swap the last send step.
This is the cleanest design.
The minimum Discord delivery logic
When a queue job becomes completed, do this
- Read the Gemini fields from the completed job.
- Build a useful prompt for OpenClaw.
- Ask OpenClaw to render the final reply in your style.
- Send the result into Discord.
- Mark the job as delivered.
Recommended reply shape The output should not be a passive summary.
It should ask for action, for example
I analyzed the reel and pulled out the strongest idea. Do you want me to recreate this, write about it, or set it up for you?
Simplest Discord delivery target
Use a private Discord server channel first.
It is easier than a DM-only workflow for most followers because
the channel ID is stable
the bot can send there directly you do not need to solve user-DM edge cases first
Minimal Discord API delivery example
Discord message docs
Discord Create Message
The final send step can be as simple as
curl -X POST "https://discord.com/api/v10/channels/YOUR_CHANNEL_ID/messages" \
-H "Authorization: Bot $DISCORD_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "content": "I analyzed the reel. Do you want me to recreate this, write about it, or set it up for you?" }' If you want a direct-message experience later, add that after the channel version works. What to tell followers honestly
Tell them this
OpenClaw handles the agent and chat layer.
The Instagram watcher is a separate runtime. Gemini handles the video analysis. Discord is just the final delivery surface. That is technically true and much stronger than pretending OpenClaw alone does all of it. Part 8: Advanced path using the official Meta / Facebook API Use this only after the local creator path works.
Official docs
Meta Instagram Messaging API
Meta Instagram Webhooks
Meta Business Login for Instagram
Meta App Review
Meta prerequisites
You need
an Instagram Professional account
a connected Facebook Page
a Meta developer account a Meta app
a public HTTPS callback URL
a page access token Meta developer dashboard steps
- Create a Meta app.
- Use the Business app type or the current Instagram messaging use case if Meta shows a
newer flow.
- Add Messenger or Instagram messaging support.
- Add Webhooks.
- Connect the Facebook Page and Instagram Professional account.
- Set your callback URL and verify token.
- Subscribe to the message events you need.
- Start with:
instagram_basic instagram_manage_messages pages_manage_metadata
- Keep the app in development mode while you test with your own accounts.
- Expect App Review before wider production use.
Recommended environment for the official path
export META_APP_ID="YOUR_META_APP_ID"
export META_APP_SECRET="YOUR_META_APP_SECRET"
export META_VERIFY_TOKEN="YOUR_RANDOM_VERIFY_TOKEN"
export META_PAGE_ACCESS_TOKEN="YOUR_PAGE_ACCESS_TOKEN"
export META_PAGE_ID="YOUR_FACEBOOK_PAGE_ID"
export META_INSTAGRAM_ACCOUNT_ID="YOUR_INSTAGRAM_PRO_ACCOUNT_ID"
export PUBLIC_WEBHOOK_URL="https://your-domain.com/webhooks/meta/instagram"
What the webhook service must do
- Handle the initial GET verification request.
- Check that hub.verify_token matches your secret.
- Return hub.challenge.
- Verify X-Hub-Signature-256 on POST requests.
- Normalize the webhook into one internal reel-intake job shape.
- Pass the share link or attachment reference into the same downloader and Gemini pipeline.
Important
Do not build two completely different analysis systems. Use the official Meta API only as the trigger layer. Everything after that should be the same: download validate
analyze ask what to do next send to Discord
Part 9: The cleanest complete starter package
If you want this to be genuinely reproducible for followers, ship this as the package:
- This guide
- The Instagram intake runtime
- A simple .env.example
- A Discord delivery script or documented Discord send step
- A short troubleshooting checklist
Without that package, people will get stuck halfway and your reel promise will feel bigger than the actual implementation.
Part 10: First-run checklist
[ ] OpenClaw installed and onboarded
[ ] Discord bot created and connected [ ] Runtime package copied locally
[ ] Dedicated Instagram intake account created
[ ] Dedicated DM thread created
[ ] Instagram intake browser profile logged in [ ] Thread bound successfully [ ] Gemini logged in in the analysis profile [ ] yt-dlp, ffmpeg, and ffprobe installed [ ] poll finds a reel and writes a queue job [ ] queue consumer completes a Gemini analysis [ ] final action message appears in Discord
Part 11: Troubleshooting
Reel never appears Confirm you forwarded to the dedicated DM thread, not the wrong account. Confirm the intake profile is still logged into Instagram. Confirm the thread was bound correctly.
Reel downloads but Gemini fails
Confirm Gemini is logged in. Confirm the analysis profile can upload a file manually. Confirm ffprobe validates the file and the video has real media streams. Discord stays silent Confirm the bot token is valid. Confirm the bot is in the server. Confirm the channel ID is correct. Confirm the bot has View Channels, Send Messages, and Read Message History. Meta webhook never fires Confirm the app is connected to the correct Page and Instagram account. Confirm the callback URL is public and reachable. Confirm the verify token matches exactly. Confirm the app is not blocked by mode, role, or permission issues.
Final recommendation
If you publish this to followers, structure it like this
- Recommended setup: browser profile + queue + Gemini + Discord delivery
- Advanced upgrade: official Meta API and webhooks
That is the honest and reproducible version of your reel. If you skip that distinction, the guide will feel incomplete because your script describes the full system, not just the OpenClaw install.
Final checklist
- The required app, command, or service opens correctly.
- Credentials are stored outside public files and screenshots.
- A small test run completes before you use the setup for real work.
- You know where logs, output files, and error messages are stored.