Instagram Business Action Block
What it does: Publish content, manage comments, reply to DMs, and control your Instagram Business account directly from your workflows.
In simple terms: Connect your Instagram Business account to automate posting photos and reels, reply to comments, send DMs, get your media list, and more — all driven by your workflow logic.
When to Use This
Use the Instagram Business action when you need to:
- ✅ Auto-publish photos or reels when triggered by a schedule or event
- ✅ Reply to comments automatically using your workflow logic
- ✅ Send direct messages to users who DM you
- ✅ Fetch your media list with pagination, post comments, or profile info for analytics
- ✅ Hide or show comments based on sentiment or keywords
- ✅ Send typing indicators and read receipts for a more human-like DM experience
- ✅ React to messages with emoji reactions
Example: When someone comments "price?" on your post, automatically reply with your pricing link and DM them a detailed product brochure.
Features
- Content Publishing: Upload photos and reels to your Instagram Business account
- Profile & Media: Retrieve your profile info, media list, and post comments
- Comment Actions: Reply to, hide, or show comments on your posts
- Direct Messages: Send text/attachment messages, reactions, typing indicators, and read receipts
- OAuth-based Auth: Uses Instagram Login for Business — no manual token hunting
- Variable Support: Use
{{variables}}from trigger or previous blocks in any field
Getting Your Instagram Credentials
Instagram Business uses Instagram Login for Business (OAuth). This is different from the old Facebook Graph API flow — you do not need a Facebook Page or manually-generated tokens.
Requirements
Before you start, make sure you have:
- An Instagram Business or Creator account (personal accounts are not supported)
- A Meta Developer App with Instagram product added
- Your app must have the following permissions approved:
instagram_business_basicinstagram_business_content_publishinginstagram_business_manage_messagesinstagram_business_manage_comments
Development Mode Restriction: In Development mode, the API can only access content and interact with users who have authorized your app via OAuth. To reach other accounts, add them as Test Users in your Meta App Dashboard, or submit your app for Meta App Review to go Live.
Step 1 — Create a Meta Developer App
- Go to developers.facebook.com (opens in a new tab) and log in
- Click My Apps → Create App
- Select Other as the use case → Business as the app type
- Give your app a name and click Create App
- In the app dashboard, click Add Product → add Instagram
Step 2 — Configure OAuth Redirect URI
- In your Meta App Dashboard, go to Instagram → API Setup with Instagram Login
- Under Valid OAuth Redirect URIs, add:
https://yourdomain.com/api/instagram/oauth/callback - Save your App ID and App Secret — you will need them in the next step
Step 3 — Connect in InditeAI
- Add the Instagram Business action block to your workflow
- Click Select Credentials → Create New
- Enter your App ID and App Secret from your Meta App
- Click Connect with Instagram — a popup opens asking you to authorize the app
- Log in with your Instagram Business account and grant the requested permissions
- The popup closes automatically and your credentials are saved
Account ID Auto-Discovery: After OAuth, your Instagram Account ID is fetched automatically from /me. You do not need to enter it manually — but you can override it in the block settings if needed.
Setup in InditeAI
1. Connect Your Account
Follow the credential steps above. Once connected, select your credentials from the dropdown in the block settings.
2. Select an Action
Choose what you want to do:
| Category | Actions |
|---|---|
| Content Publishing | Upload Photo, Upload Reel |
| Profile & Media | Get Profile, Get Media List, Get Comments |
| Comment Actions | Reply to Comment, Hide Comment, Show Comment |
| Direct Messages | Send Message, Send Reaction, Mark as Seen, Typing Indicator |
3. Configure Action Fields
Each action requires different fields. See the detailed sections below.
Content Publishing
Upload Photo
Publishes a photo to your Instagram Business account feed.
Instagram Account ID (optional): Auto-filled from credentials. Override only if needed.
Caption (optional): Post caption — supports {{variables}}
New product alert! Check out our latest drop — link in bio.
{{trigger.postCaption}}Photo URL (required): A publicly accessible JPG URL
https://example.com/product-photo.jpg
{{mediaUpload.url}}The photo URL must be publicly accessible (not behind auth). Instagram fetches it server-side. JPG format is required for standard feed posts.
How it works: Instagram uses a two-step process — first creating a media container, then publishing it. This block handles both steps automatically.
Upload Reel
Publishes a video reel to your Instagram Business account.
Instagram Account ID (optional): Auto-filled from credentials.
Caption (optional): Reel caption — supports {{variables}}
Behind the scenes — {{trigger.caption}}Video URL (required): A publicly accessible video URL
https://example.com/reel.mp4
{{videoProcessor.outputUrl}}Limits: Max 1 GB file size, max 15 minutes. The video must be publicly accessible. Reel processing can take 30–90 seconds — this block polls automatically until ready (up to ~2 minutes).
Profile & Media
Get Profile
Retrieves your Instagram Business account profile information.
Instagram Account ID (optional): Auto-filled from credentials.
Returns:
id— your account IDusername— your Instagram usernamename— display namebiography— bio textfollowers_count— follower countmedia_count— total number of postsprofile_picture_url— profile picture URLwebsite— website URL
Get Media List
Retrieves a list of your recent posts and media, with pagination support.
Instagram Account ID (optional): Auto-filled from credentials.
Items per page (optional): How many posts to return per page. Default 10, max 100.
Fetch all pages (optional): When enabled, automatically follows pagination until all posts are fetched. Use with caution on accounts with many posts.
After cursor (optional): Pagination cursor for the next page. Use {{output.paging.cursors.after}} from a previous run to fetch the next page manually.
{{previousStep.paging.cursors.after}}Returns:
data— Array of media objects, each containing:id,caption,media_type(IMAGE,VIDEO,CAROUSEL_ALBUM)media_url,thumbnail_url,permalinktimestamp,like_count,comments_count
count— Total number of media items returnedpaging.cursors.after— Cursor to pass into the next request for the next pagehasMore—trueif more posts exist beyond this page
Paginating through all posts: Leave "After cursor" blank to start from the most recent post. To load the next page in a subsequent workflow run, pass {{previousStep.paging.cursors.after}} into the "After cursor" field. Or enable Fetch all pages to collect everything in one run.
Get Comments
Retrieves comments on a specific post or media item.
Post / Media ID (required): The ID of the post to get comments from
{{trigger.mediaId}}
17855600000000001Use {{trigger.mediaId}} when this action follows an Instagram Business Trigger subscribed to comments events — the trigger automatically provides the media ID.
Returns:
comments— Array of comment objects:id— comment IDtext— comment textusername— commenter's usernametimestamp— when the comment was postedlike_count— number of likes (only if app hasinstagram_manage_comments)from— commenter's account ID and username (only if app hasinstagram_manage_comments)replies— array of replies (only if app hasinstagram_manage_comments)
count— total comment countmediaId— the media ID queried
Permission tiers: Basic comment data (id, text, username, timestamp) is returned with instagram_business_basic. Extended fields (like_count, from, replies) are automatically included if your app also has instagram_manage_comments. No extra setup needed — the block tries both automatically.
Development Mode: In Development mode, only comments from users who have authorized your Meta app are returned. All other users' comments are hidden by the API. To see comments from anyone, your app must be Live (approved by Meta App Review).
Comment Actions
Reply to Comment
Posts a public reply to a specific comment on one of your posts.
Comment ID (required): The ID of the comment to reply to
{{trigger.commentId}}
17858600000000001Reply Text (required): Your reply — supports {{variables}}
Thanks for your comment! DM us for more info.
Hey {{trigger.fromUsername}}, check your DMs!Use {{trigger.commentId}} when this action follows a comments trigger — the trigger automatically provides the comment ID.
Hide Comment
Hides a comment from public view on one of your posts. The commenter cannot tell their comment was hidden.
Comment ID (required): The comment to hide
{{trigger.commentId}}Requires instagram_business_manage_comments permission. Use this to silently remove spam or inappropriate comments without deleting them.
Show Comment
Unhides a previously hidden comment, making it visible to everyone again.
Comment ID (required): The comment to show
{{trigger.commentId}}Note: Instagram's API does not support liking individual comments programmatically. The /{comment-id}/likes endpoint only exists for media posts, not comments. Hide/Show is the supported moderation alternative.
Direct Messages
All DM actions require a Recipient ID — the Instagram-scoped user ID of the person you are messaging. Use {{trigger.from}} to reply to whoever sent you a message.
Send Message
Sends a direct message to a user.
Recipient ID (required):
{{trigger.from}}Message Text (required for text messages):
Hi! Thanks for reaching out. Here's what you asked for: {{productLink}}
{{trigger.replyText}}Attachment URL (optional): Include an image, video, or audio file
https://example.com/product-catalog.jpg
{{mediaStorage.url}}Attachment Type: Select image, video, or audio when using an attachment URL.
Messaging Tag (optional): Use HUMAN_AGENT to bypass the 24-hour messaging window
24-Hour Window: Instagram only allows sending messages to users within 24 hours of their last message to you. The HUMAN_AGENT tag extends this window but requires explicit Meta approval. Outside the window, use comment replies instead.
Send Reaction
Sends an emoji reaction to a message.
Recipient ID (required):
{{trigger.from}}Message ID to react to (required):
{{trigger.messageId}}Reaction: Enter love — currently the only supported Instagram reaction emoji.
Mark as Seen
Marks a conversation as read (shows a read receipt to the sender).
Recipient ID (required):
{{trigger.from}}Use this at the start of a DM workflow to immediately acknowledge the message was received.
Typing Indicator
Shows a "typing..." indicator in the recipient's DM thread.
Recipient ID (required):
{{trigger.from}}Use this before Send Message to make the interaction feel more natural and human-like.
Response Mapping
Map Instagram API response data to workflow variables:
Content Publishing:
id— Published media ID
Get Profile:
username,name,biographyfollowers_count,media_countprofile_picture_url,website
Get Media List:
data— Array of media objects withid,caption,media_type,media_url,timestampcount— number of items returnedpaging.cursors.after— cursor for next pagehasMore— whether more pages exist
Get Comments:
comments— Array of comment objects withid,text,username,timestampcount— total comment count- Extended fields (
like_count,from,replies) included if app hasinstagram_manage_comments
Reply to Comment:
id— ID of the new reply comment
DM Actions (Send Message):
message_id— ID of the sent messagerecipient_id— recipient confirmation
Common Use Cases
1. Auto-Reply to Comments with Keywords
Trigger: Instagram Business Trigger → comments event, keyword filter: "price"
Workflow:
- Instagram Business: Reply to Comment
Comment ID: {{trigger.commentId}} Reply: Hi {{trigger.fromUsername}}! DM us for pricing details. - Instagram Business: Send Message
Recipient: {{trigger.from}} Message: Here's our full pricing: [link]
2. Lead Capture from DMs
Trigger: Instagram Business Trigger → messages event, keyword: "collab"
Workflow:
- Instagram Business: Mark as Seen
- Instagram Business: Typing Indicator
- Instagram Business: Send Message
Message: Hi {{trigger.fromUsername}}! Thanks for reaching out about a collab. I'll reply within 24hrs. Meanwhile, here's my media kit: [link] - HubSpot: Create Contact
- Slack: Notify team
3. Scheduled Content Publishing
Trigger: Schedule Trigger (daily at 9 AM)
Workflow:
- Airtable: Get next scheduled post
- Instagram Business: Upload Photo
Photo URL: {{scheduledPost.imageUrl}} Caption: {{scheduledPost.caption}} - Airtable: Mark post as published
4. Comment Moderation
Trigger: Instagram Business Trigger → comments event
Workflow:
- AI Block: Analyze comment sentiment
- Condition: If sentiment = positive → Reply to Comment with a thank-you
- Condition: If sentiment = spam → Hide Comment + log for review
- Google Sheets: Log all comments for analytics
5. Story Mention Auto-Response
Trigger: Instagram Business Trigger → mentions event
Workflow:
- Instagram Business: Send Message
Recipient: {{trigger.from}} Message: Hey {{trigger.fromUsername}}! Thanks for the mention! - Google Sheets: Log mention for analytics
Best Practices
Content
- ✅ Always use publicly accessible URLs for photos and videos
- ✅ Test media URLs in an incognito browser before using in workflows
- ✅ Keep captions under 2,200 characters (Instagram's limit)
- ✅ Use
{{variables}}to personalize captions dynamically
Direct Messages
- ✅ Use Mark as Seen → Typing Indicator → Send Message sequence for a natural feel
- ✅ Always reply within the 24-hour window; keyword triggers help catch DMs fast
- ✅ Keep automated DMs friendly — avoid sending unsolicited bulk messages
- ✅ Use the
HUMAN_AGENTtag only when genuinely needed (requires Meta approval)
Security
- ✅ Use OAuth credentials — never expose access tokens in workflow fields
- ✅ Create a dedicated Meta App for InditeAI automations
- ✅ Keep your App Secret secure — it is used for webhook verification
- ✅ Reconnect credentials if you suspect a token has been compromised
API Limits
- ✅ Instagram limits publishing to 50 posts per 24 hours per account
- ✅ Avoid polling loops — use the Instagram Business Trigger for real-time events instead
- ✅ DM sending limits depend on your account's messaging tier
Troubleshooting
"Invalid OAuth access token" (Error 190)
Cause: The token was generated for a different Meta App, or the account has not authorized your app.
Fix:
- Delete the existing credentials and reconnect via the OAuth popup
- Make sure you are connecting with the Instagram Business account linked to your Meta App
"This account is not a Business/Creator account"
Fix: Switch your Instagram account to Business or Creator mode in the Instagram app settings before connecting.
"Media upload failed"
Fix:
- Verify the photo/video URL is publicly accessible (test in an incognito browser)
- Check that the photo is JPG format (PNG is not supported for feed posts)
- For reels, verify the file is under 1 GB and under 15 minutes
- Ensure the URL does not require authentication or a login
"Get Comments returns empty array"
Most likely cause: Your app is in Development Mode.
In Development mode, the Instagram API only returns comments from users who have authorized your Meta app. All other users' comments are invisible.
Fix:
- Add test users to your Meta App (they must complete the OAuth flow)
- Or submit your app for Meta App Review to go Live
- Verify your
mediaIdis a post ID (not your account ID) — account IDs always return[]
"User cannot receive messages" or "Outside 24-hour window"
Fix: The 24-hour messaging window has expired. Use comment replies instead, or ask the user to send you a new message to reopen the window.
"Comment ID not found" (404)
Fix: The comment may have been deleted. Add a Condition block before the reply action to handle this gracefully.
Limitations
- Publishing rate: 50 posts per 24 hours per account
- Reel processing: Can take up to 2 minutes; the block polls automatically but may timeout on very large files
- DM 24-hour window: Can only send messages to users within 24 hours of their last interaction
- Development Mode: Most content is only accessible to/from users who authorized your app
- Comment visibility: In Development Mode, only authorized users' comments are accessible via API
- Personal accounts: Not supported — Business or Creator account required
- Stories: Publishing stories via the API is not supported in the current version
- Liking comments: Instagram's API does not support liking individual comments — use Hide/Show for comment moderation instead
- Get Comments extended fields:
like_count,from, andrepliesrequire theinstagram_manage_commentspermission; basic fields (id,text,username,timestamp) are always returned
Tip: Pair this block with the Instagram Business Trigger to build end-to-end automation. The trigger provides {{trigger.commentId}}, {{trigger.mediaId}}, {{trigger.from}}, and {{trigger.messageId}} that map directly into this block's inputs.
Example Workflow
Flow:
- Instagram Business Trigger fires when a comment contains "price"
- The block publicly replies to acknowledge the comment
- A DM is sent with detailed pricing information
- The lead is logged to your CRM automatically
- Your team is notified in Slack
Related Blocks
- Instagram Business Trigger: Start workflows when DMs, comments, or mentions arrive
- Condition: Route logic based on message content or sentiment
- Send Email: Follow up via email after Instagram interactions
- HubSpot / Salesforce: Log Instagram leads to your CRM
- Slack / Discord: Notify your team about important Instagram events
- Schedule Trigger: Publish content on a time-based schedule
- AI Block: Analyze sentiment, generate replies, or moderate content
Need Help?
- Review Instagram Graph API documentation (opens in a new tab)
- Check Instagram Login for Business setup guide (opens in a new tab)
- Verify your app permissions in Meta App Dashboard → Instagram → Permissions
Pro Tip: Use the Instagram Business Trigger with keyword filters to only fire your workflow for relevant messages (e.g., "buy", "price", "collab"). This prevents unnecessary API calls and keeps automation focused on real leads.