C Concierge Documentation
Docs / Channels / Instagram
Channel · 2 of 4

Instagram auto‑reply.

Instagram is one of four channels in the unified messaging pipeline. Incoming DMs are normalized into InboundMessage structs and processed through the common pipeline, which handles credit deduction, reply generation, and metadata logging.

Connecting Instagram

  1. Go to Admin > Instagram Accounts > Connect Account
  2. Sign in with Facebook (the account that manages your Instagram business page)
  3. Concierge discovers your Facebook Pages and finds the linked Instagram business account
  4. The page token is encrypted and stored for sending DM replies

Configuring Auto-Reply

Each Instagram account has its own ReplyConfig with the same shape as WhatsApp:

  • Enabled: master switch for the account.
  • Auto-Reply Enabled: master switch for replies on inbound DMs.
  • Default reply: edited inline; canned text or AI prompt for the no-rule-matched fallback.
  • Reply rules: ordered list managed at /admin/rules/instagram/{account_id}. Same matchers (Keywords, Prompt) and responses (Canned, AI prompt) as WhatsApp.

The persona prompt at /admin/persona is the system prompt for every AI reply on this account, concatenated with the matched rule's prompt. AI replies require the persona to be safety-Approved.

How It Works

  1. Meta delivers incoming DMs to POST /webhook/instagram
  2. Concierge verifies the webhook signature
  3. Looks up the Instagram account by the recipient page ID
  4. One reply credit is deducted from the tenant's balance
  5. Generates a reply (static or AI)
  6. Sends via the Instagram Pages Messaging API
  7. If the send fails, the credit is restored
  8. Message metadata (no content) is logged to the unified messages table

Credit Deduction

Each auto-reply deducts one reply credit. Credits are deducted before the reply is sent and restored on failure. When credits reach zero, auto-replies stop silently.

See Billing for details on managing credits.

Requirements

Your Meta app needs these permissions (requires App Review):

  • instagram_basic
  • instagram_manage_messages
  • pages_manage_metadata
  • pages_messaging

Token Refresh

Page tokens are long-lived but can expire. A daily cron job (6 AM UTC) checks all tokens and refreshes those within 7 days of expiry.