Instagram Autoposting¶
Setup and workflow for automating Instagram posts from the agent: store Instagram Graph API credentials securely, and the agent uploads generated images and captions directly to client business accounts.
Required credentials¶
Obtain per client account from the Facebook Developers Console:
- Instagram Business Account ID — unique numeric ID for the business account.
- Long-lived access token — 60-day (or permanent) token with these permissions:
instagram_basicinstagram_content_publishpages_show_listpages_read_engagement
Credential storage (recommended)¶
Store tokens in a secure Supabase table so the agent can fetch them whenever a post is ready:
- Table:
social_credentials - Columns:
client_name,platform,account_id,access_token,updated_at
⚠️ Tokens go into the database via the administrator — never commit them to a repo or paste them into docs.
Trigger¶
Once credentials are stored, posting is a plain agent command, e.g. "Prepare today's teaser and post it automatically using the stored credentials."