Skip to main content

n8n Instagram Automation 2026: Posts, Comments, DMs and Insights

Automate Instagram with n8n and Meta's official API: schedule posts, moderate comments, answer DMs inside the 24-hour window and track insights by the rules.

AI Automation Architect

Published
Jan 15, 2026
Updated
Sep 30, 2026
Reading time
12 min read
Quick answer

n8n can automate four Instagram jobs through Meta's official API for Business and Creator accounts: publishing from a content calendar (up to 100 API-published posts per 24 hours), moderating and replying to comments, answering DMs within 24 hours of the user's last message, and logging insights such as views, reach, saves and shares. n8n has no dedicated Instagram node, so you use the HTTP Request node for API calls and the Facebook Trigger node's Instagram object for events. Automated likes, follows, comments on other accounts and cold DMs break Instagram's rules, so this guide covers only compliant workflows.

Checked against Meta's Instagram Platform documentation (Graph API v26.0), Instagram's Terms of Use and Help Center, and n8n's docs on October 1, 2026. This update replaces the January 2026 version, whose agency case study and results figures were not verified and whose API limits are out of date.

What you can and can't automate

Allowed through the official APINot allowed
Publishing images, videos, Reels, carousels and Stories to your own professional accountAutomated likes, follows or unfollows
Reading, replying to, hiding and deleting comments on your own media, and turning comments on or offAutomated comments on other accounts' posts
Replying to DMs within 24 hours of the user's last messageStarting conversations with people who haven't messaged you
One private reply to someone who commented, within 7 daysScraping profiles or collecting data without permission
Reading insights for your own account and mediaBuying, selling or exchanging engagement

The right-hand column isn't a gray area. Instagram's Terms of Use say "You can't attempt to create accounts or access or collect information in unauthorized ways," including doing so "in an automated way" without permission. Its Help Center adds that non-Instagram apps that "create automated likes, comments and follows to make an account appear more popular than it is" go against its Community Guidelines, and Meta's spam policy bans exchanging engagement. Growth still comes from content and real conversations; automation just removes the busywork around them.

Before you build: accounts, app and access

  1. A professional account. The API serves Business and Creator accounts only (Instagram Platform overview). Personal accounts lost API access when Meta shut down the Basic Display API on December 4, 2024.
  2. Choose a setup. Instagram API with Instagram Login works without a Facebook Page and uses the host graph.instagram.com. Instagram API with Facebook Login for Business needs the account linked to a Facebook Page and uses graph.facebook.com; it is the one to pick if you need product tagging, the Paid partnership label at publish time, hashtag search or story insight webhooks.
  3. A Meta app in the App Dashboard with the permissions for your jobs. For Instagram Login these are instagram_business_basic plus instagram_business_content_publish, instagram_business_manage_comments or instagram_business_manage_messages.
  4. Access level. If the app serves only accounts you own or manage, Meta says Standard Access is all you need and App Review isn't required (App Review). One exception matters for n8n: "Advanced Access is required to receive comments and live_comments webhook notifications," the app must be Live, and the account must be public (webhooks).
  5. A long-lived token. Instagram Login tokens last 60 days. You can refresh one once it is at least 24 hours old and still valid, so add a small scheduled workflow that calls refresh_access_token every few weeks.

Which n8n nodes to use

n8n has no dedicated Instagram node. Use the HTTP Request node for API calls, with the token stored in a Query Auth credential named access_token so it never sits in the node itself. The Facebook Graph API node also works, but only targets graph.facebook.com, so it suits the Facebook Login setup. For events, the Facebook Trigger node's Instagram object listens for Comments, Mentions, Messages, Story Insights and more. n8n's docs warn that this object "fails without" the Include Values option turned on, and adding your App Secret to the credential lets n8n verify that payloads really come from Meta.

Workflow 1: Publish from a content calendar

Keep captions, media links and publish times in Google Sheets or Airtable, and let n8n post what is due.

  1. Schedule Trigger every 15 or 30 minutes.
  2. Read due rows: status is Scheduled and publish time is now or earlier. Mark each row Publishing straight away so a slow run can't post it twice.
  3. Create a media container with the media URL and caption.
  4. Check the container status until it is FINISHED. Meta recommends checking once per minute for no more than five minutes; use a Wait node and a small loop.
  5. Publish the container, then write the media ID and permalink back to the row and notify your team.
  6. On ERROR or EXPIRED, mark the row Failed and alert someone. Containers expire if they aren't published within 24 hours.
# 1. Create the container (Instagram Login host)
POST https://graph.instagram.com/v26.0/{ig-user-id}/media
  image_url={{ $json.image_url }}        # public JPEG URL
  caption={{ $json.caption }}
  is_ai_generated=true                   # only for AI-generated media

# Reels: media_type=REELS and video_url=...  Stories: media_type=STORIES

# 2. Poll until status_code is FINISHED
GET https://graph.instagram.com/v26.0/{container-id}?fields=status_code

# 3. Publish
POST https://graph.instagram.com/v26.0/{ig-user-id}/media_publish
  creation_id={container-id}

# Check how many API posts are left in the last 24 hours
GET https://graph.instagram.com/v26.0/{ig-user-id}/content_publishing_limit

Rules from Meta's content publishing guide and media reference:

  • Limit: "100 API-published posts within a 24-hour moving period," and a carousel counts as one post. The carousel section of the same page still says 50, so check content_publishing_limit before a big batch.
  • Media: JPEG is the only image format supported, media must be on a publicly accessible server when the request is made, and carousels hold up to 10 images or videos.
  • Captions: a maximum of 2,200 characters, 30 hashtags and 20 @ tags.
  • Not supported: shopping tags and filters.
  • AI disclosure: set is_ai_generated to true on AI-generated media to apply the AI info label. It isn't available on carousel children.

Workflow 2: Moderate and answer comments

  1. Trigger: the Facebook Trigger node (Instagram object, Comments field), or if you don't have Advanced Access, a Schedule Trigger that reads comments on your recent posts with GET /{media-id}/comments. Meta recommends webhooks where possible to avoid rate limiting.
  2. Sort each comment: keyword rules first for obvious spam and common questions (price, shipping, link), then an optional AI classifier for the rest. Our n8n OpenAI guide shows the Text Classifier setup.
  3. Act: reply to FAQs, hide clear spam, and send everything else to a person in Slack or a sheet.
  4. Log every action with the comment ID so you can review what the workflow hid or answered.
Reply:   POST   /{comment-id}/replies    message=...
Hide:    POST   /{comment-id}?hide=true
Delete:  DELETE /{comment-id}
Comments on/off for a post: POST /{media-id} with comment_enabled=true|false

Keep it human. Hide spam and abuse, not criticism, and write several reply templates rather than posting the same line hundreds of times; Meta's spam policy targets content designed to "deceive, mislead, or overwhelm users" to boost reach. Deleting works only on comments made on your own media (comment moderation docs).

Workflow 3: Answer DMs and comment-to-DM requests

The Instagram Messaging API is built around replies, not outreach. Per Meta's messaging docs:

  • The user starts: "Conversations only begin when an Instagram user sends a message to your app user."
  • 24-hour window: "Your app has 24 hours to respond to any message." For later replies by a person, the Human Agent tag allows responses within 7 days; it needs App Review and business verification and is meant for manual replies.
  • A path to a human is required: Meta says apps using the messaging APIs "must have an escalation path to a human agent," and automated chats must disclose that they are automated where the law requires it. Meta recommends telling users anyway.
  • Limits worth knowing: messages up to 1,000 bytes of text, up to 4 ice breaker questions and 13 quick replies, and no group messaging.

A compliant DM workflow:

  1. Messages webhook into n8n, ignoring echoes of your own messages.
  2. Check the window: only reply automatically if the user's last message is under 24 hours old.
  3. Answer common questions from a fixed FAQ, or draft an answer with AI from your own help content, and say the reply is automated.
  4. Hand off anything about orders, complaints or custom work to a person, with a notification in Slack or email.
  5. Save the lead (username, question, tags) to your CRM or a sheet.

Comment-to-DM flows ("comment GUIDE and I'll send you the link") use private replies: a POST to /{ig-user-id}/messages with the comment ID as the recipient. You can send "only one message" to the commenter, within 7 days of the comment; further messages are allowed only if they reply, within 24 hours of that reply.

Workflow 4: Log insights to a sheet

  1. Schedule Trigger once a day.
  2. List recent media: GET /{ig-user-id}/media?fields=id,caption,media_type,permalink,timestamp.
  3. Fetch metrics for each item: GET /{media-id}/insights?metric=views,reach,likes,comments,saved,shares,total_interactions. Metric support differs between feed posts, Reels and Stories, so check the media insights reference for each type.
  4. Append a row per post per day to Google Sheets or a database, then build weekly charts or an AI-written summary from the table.
  • Use views, not impressions. Meta deprecated impressions and plays from v22.0 and for all versions on April 21, 2025. Some older examples in Meta's own guides still request them, so don't copy them blindly.
  • Capture Stories fast: story metrics are only available for 24 hours.
  • Retention: media metrics are stored for up to 2 years and account metrics for up to 90 days, so store your own history.
  • Small accounts: follower demographics and some follower metrics aren't returned for accounts with fewer than 100 followers.

To act on the numbers, compare formats and posting times in your own data rather than generic benchmarks; our Instagram algorithm guide explains which signals matter.

Rate limits and reliability

  • Call budget: Meta's rate limiting guide gives Instagram apps "4800 * Number of Impressions" calls per 24 hours for each app and account pair, where impressions are the times the account's content entered someone's screen. Messaging calls don't count toward it and have their own per-second limits; private replies are capped at 750 calls per hour.
  • Prefer webhooks to polling for comments and messages, and cache media IDs instead of re-listing everything each run.
  • Don't retry policy errors. Retry timeouts with a wait; stop and alert on permission, token or validation errors.
  • Watch the token. An expired token breaks every workflow at once, so alert on authentication errors. Our n8n error handling guide shows how to route failures to Slack or email.

What should stay manual

Automation handles scheduling, triage and reporting well. Keep people on the parts that build an audience: engaging with other creators, replying to thoughtful comments, handling complaints and deciding what to post. If you use AI for captions or images, review every post before it is scheduled, set is_ai_generated where it applies, and follow Meta's AI labeling rules for photorealistic video and realistic audio. For the strategy side, see our guides to Instagram growth tactics that work, hashtag strategy and making money on Instagram.

Next steps

Start with Workflow 1 on a single account, run it for two weeks with human review, then add comment triage. If you are new to n8n, our beginner's guide and API integration guide cover the HTTP Request basics. Instagram Ignited covers the content, positioning and growth strategy these workflows support.

Operator program · recommended for this article

Want the full Instagram Ignited playbook?

A 90-day Instagram curriculum with 6 modules and 24 lessons covering niche and profile setup, hooks and retention, production, Instagram SEO, Trial Reels, Threads, analytics, and monetization options.

6 modules · one-time purchase · 30-day money-back guaranteeiimagined.ai by Anyro

n8n Instagram automation FAQ

Is automating Instagram with n8n against the rules?

Not if you use Meta's official Instagram API for professional accounts you own or manage, within Meta's Platform Terms and Developer Policies. What breaks the rules is automated engagement: Instagram says non-Instagram apps that create automated likes, comments and follows go against its Community Guidelines, and its Terms of Use forbid collecting information in an automated way without permission.

Do I need a Business or Creator account?

Yes. The Instagram API works only with professional accounts, meaning Business or Creator accounts. It cannot get data for media owned by personal accounts, and the old Basic Display API for personal accounts was shut down on December 4, 2024.

How many posts can I publish through the Instagram API?

Meta's content publishing guide limits accounts to 100 API-published posts in a moving 24-hour period, with a carousel counting as one post. One section of the same page still says 50, so check the content_publishing_limit endpoint before a bulk run.

Can n8n send Instagram DMs to people who have not messaged me?

No. Conversations only begin when an Instagram user messages your account, and you then have 24 hours to respond. The exception is a private reply: you can send one message to someone who commented on your post or reel, within 7 days of the comment.

Does n8n have an Instagram node?

Not a dedicated one. The Facebook Trigger node has an Instagram object for comment, mention, message and story insight events, and you make API calls with the HTTP Request node, or with the Facebook Graph API node if your account uses the Facebook Login setup.

Why did impressions stop working in my Instagram analytics workflow?

Meta deprecated the impressions and plays metrics from API version 22.0 and for all versions on April 21, 2025, and replaced them with views. Update the metric names in your insights requests.

Do I need Meta App Review to automate my own account?

For accounts you own or manage, Standard Access is enough for most features and App Review is not required. The exception is webhooks: Meta says Advanced Access, which needs App Review and Business Verification, is required to receive comments and live_comments notifications.

Keep reading

Continue the thread

All essays →
All-Access subscription

Every program. Member benefits.
One subscription.

Use all four premium programs with weekly live coaching, a private community, and the resource vault.

Confirm current lessons, downloadable resources and member-benefit arrangements before purchasing.

  • All 4 premium programs plus free Futures Trading
  • Weekly live coaching calls
  • Private community access
  • Resource vault and templates
  • 30-day money-back guarantee, cancel anytime
$99/ month
$99 for the first month · $702 to buy all four standalone
Start All-AccessOr browse standalone programs
30-day money-back guarantee · $99/month · cancel anytime