Skip to main content

n8n Instagram Automation: Posts, Comments, DMs, Insights

Automate Instagram with n8n inside Meta's official API: publish from a calendar, moderate comments, reply to DMs in the 24-hour window and log insights.

AI Automation Architect

Published
Jan 15, 2026
Updated
Oct 13, 2026
Reading time
12 min read
Quick answer

n8n can automate four Instagram jobs through Meta's official API for professional accounts: publishing from a content calendar, moderating and answering comments on your own posts, replying to DMs within 24 hours of the user's message, and logging insights such as views and reach. There is no dedicated Instagram node, so calls go through the HTTP Request node and events through the Facebook Trigger node's Instagram object. Follow and unfollow bots, scraping and automated engagement break Instagram's rules, so this guide covers only what the API allows.

n8n Instagram automation works when every step goes through Meta's official Instagram API: you can publish, moderate comments, answer DMs and pull insights for professional accounts you own or manage. You cannot automate likes, follows, comments on other people's posts or cold DMs. The API has no endpoint for them, and Instagram treats the tools that fake them as rule-breaking.

Checked on October 13, 2026 against Meta's Instagram Platform docs (overview, content publishing, webhooks, messaging, private replies, media insights), Meta's Platform Terms (last updated February 3, 2026), Instagram's Help Center and n8n's Facebook Trigger docs. Meta's examples on the day used Graph API v25.0. An earlier version of this page carried an agency case study and results figures with no source; they are gone.

What you can and cannot automate

The line is simple: automate work on your own account, never engagement with other people's. Everything in the allowed rows has a documented endpoint. Nothing in the other rows does.

JobStatusWhy
Publish images, videos, reels, carousels and stories to your own accountAllowedContent publishing API
Read, reply to, hide and delete comments on your own mediaAllowedComment moderation API
Reply to a DM within 24 hours of the user's messageAllowedMessaging API
One private reply to someone who commented, within 7 daysAllowedPrivate replies
Read insights for your own account and mediaAllowedInsights API
Automated likes, follows or unfollowsNot allowedNo API exists. Instagram calls it inauthentic activity
Automated comments on other accounts' postsNot allowedNo API exists
Starting DMs with people who have not messaged youNot allowedThe messaging API only answers
Scraping profiles, followers or postsNot allowedInstagram restricts accounts for it

The forbidden rows are not a grey area, and here is why. Instagram's Help Center says some non-Instagram apps create automated likes, comments and follows to make an account look more popular, that this is against its Community Guidelines, and that it removes the activity. It warns that accounts using such apps can be limited or disabled, and it restricts accounts for collecting information in an automated way without permission. Meta's Platform Terms also bar selling, licensing or buying Platform Data and using it for surveillance, and the Spam policy bans exchanging engagement.

Before you build: accounts, app and access

You need a professional account, a Meta app, the right access level and a token that does not quietly expire. Get these right once and the four workflows below are mostly HTTP Request nodes.

Setup, in order
  1. 1
    Switch to a professional account

    Business or creator. The API does not serve personal accounts.

  2. 2
    Pick a login type

    Instagram Login needs no Facebook Page. Facebook Login for Business needs one, and adds hashtag search and product tagging.

  3. 3
    Create a Meta app

    In the App Dashboard, with the permissions for your jobs, for example instagram_business_basic and instagram_business_content_publish.

  4. 4
    Confirm the access level

    Standard Access covers accounts you own or manage. Comment webhooks need Advanced Access, App Review and Business Verification.

  5. 5
    Store the token in a credential

    Use a Query Auth credential named access_token in n8n, never a token pasted into a node.

  6. 6
    Add a token refresh workflow

    A small scheduled workflow that refreshes the long-lived token before it lapses, with an alert if it fails.

Instagram API with Instagram LoginInstagram API with Facebook Login for Business
Facebook PageNot requiredRequired
API hostgraph.instagram.comgraph.facebook.com
MessagingSupported directlyThrough the Messenger Platform
Hashtag search, product tagging, partnership adsNot supportedSupported
Story insights webhookNot availableAvailable
n8n node for callsHTTP RequestHTTP Request or the Facebook Graph API node

The table comes from Meta's Instagram Platform overview and webhooks page. The webhooks page adds two conditions that trip people up: the app must be set to Live for Meta to send anything, and the account must be public to get notifications for comments or mentions.

Which n8n nodes to use

n8n has no dedicated Instagram action node. Use the HTTP Request node for API calls. For events, the Facebook Trigger node's Instagram object listens for Comments, Mentions, Messages, Messaging Seen, Story Insights and more. n8n's docs say this object "fails without" the Include Values option turned on. If webhooks are new to you, n8n webhooks covers how the trigger side works and how to secure it.

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. Publishing is a two-step call: create a media container, then publish it once Instagram has processed the file.

The publishing workflow
  1. 01
    Schedule Trigger

    Every 15 or 30 minutes.

  2. 02
    Read due rows

    Status Scheduled and publish time passed. Mark each row Publishing at once so a slow run cannot post it twice.

  3. 03
    Create a container

    POST to /{ig-user-id}/media with the media URL and caption.

  4. 04
    Wait for FINISHED

    Meta recommends checking once a minute for no more than five minutes. A Wait node and a small loop.

  5. 05
    Publish

    POST to /{ig-user-id}/media_publish with the container ID, then write the media ID back to the row.

  6. 06
    Handle ERROR or EXPIRED

    Mark the row Failed and alert someone. Containers expire if not published within 24 hours.

# 1. Create the container (Instagram Login host)
POST https://graph.instagram.com/v25.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/v25.0/{container-id}?fields=status_code

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

# Posts left in the current 24-hour window
GET https://graph.instagram.com/v25.0/{ig-user-id}/content_publishing_limit

Rules from Meta's content publishing guide, read on the day:

  • 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 a carousel holds up to 10 images or videos.
  • Not supported. Shopping tags and filters. Alt text works on image posts but not on reels and stories.
  • AI disclosure. Set is_ai_generated to true on AI-generated media. On a carousel, set it on the carousel container only: Meta says setting it on the children returns an error. Instagram's AI label rules explain when the label is required.
  • Trial reels. A trial_params field publishes a reel to non-followers only, with manual graduation or automatic graduation if it performs well.

If you only need to schedule a handful of reels, Instagram's own scheduler may be enough: how to schedule Instagram reels compares the native option with apps.

Workflow 2: Moderate and answer comments

Comment automation is triage: answer the routine questions, hide the obvious spam, and pass everything else to a person. It runs on comments on your own media only.

  1. Trigger. The Facebook Trigger node with the Comments field, if your app has Advanced Access. Without it, a Schedule Trigger that reads comments on recent posts with GET /{media-id}/comments.
  2. Sort each comment. Keyword rules first for spam and common questions (price, shipping, link), then an optional AI classifier for the rest. The n8n OpenAI guide shows a classifier setup and its costs.
  3. Act. Reply to the questions you have answers for, hide clear spam, and send the rest to Slack or a sheet for a person.
  4. Log. Record 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 or 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 one line hundreds of times. A wall of identical replies is exactly the repetitive pattern the Spam policy is written against.

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

The Instagram Messaging API answers people. It does not start conversations. That one rule shapes the whole workflow.

Messaging rules from Meta's docs
  • Conversations only begin when an Instagram user messages your account
  • Your app has 24 hours to respond to any message
  • A human agent tag lets a person reply outside the 24-hour window
  • Automated chats must disclose that they are automated where the law requires it, and Meta recommends it everywhere
  • Message text must be UTF-8 and 1,000 bytes or less
  • Group messaging is not supported: one customer per conversation
  • A private reply is one message to a commenter, within 7 days of the comment
  • After a private reply, follow-ups only if they respond, within 24 hours of that response

Source: Meta Instagram Platform messaging and private replies docs, read 13 October 2026.

  1. Messages webhook into n8n, ignoring echoes of your own messages.
  2. Check the window. Reply automatically only if the user's 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 will send you the link") use private replies: a POST to /{ig-user-id}/messages with the comment ID as the recipient. For the wider picture, read Instagram DM automation, and for where accounts get into trouble, is DM automation banned.

Workflow 4: Log insights to a sheet

Pull your numbers into a table once a day so you keep history Instagram does not. Meta says account metrics are stored for up to 90 days, so anything older is gone unless you saved it.

  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 from GET /{media-id}/insights, for example views, reach, saved and shares. 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 chart it weekly.
Old insights requests and current ones
Copied from an old tutorial
  • Requests impressions
  • Requests plays on reels
  • Assumes every metric works on a small account
  • Relies on Instagram to keep the history
Current
  • Requests views, which Meta added in v22.0
  • Uses views for reels too
  • Expects gaps under 100 followers
  • Stores its own daily rows

Meta's v22.0 changelog deprecated impressions and plays on media insights for all versions from April 21, 2025. Some metrics are not returned for accounts with fewer than 100 followers. To read what the numbers mean once you have them, use the Instagram analytics guide.

Rate limits and reliability

Most Instagram calls share a budget that scales with how much your content is seen. Meta's overview gives it as "Calls within 24 hours = 4800 * Number of Impressions" for non-messaging calls, with separate limits for messaging.

  • Messaging limits. The overview lists 2 calls a second per account for the Conversations API and 750 private replies an hour for posts and reels.
  • Prefer webhooks to polling for comments and messages, and cache media IDs instead of re-listing everything each run.
  • Do not retry policy errors. Retry timeouts after a wait. Stop and alert on permission, token or validation errors.
  • Watch the token. An expired token breaks every workflow at once. n8n error handling 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 AI drafts captions or images, a person reviews every post before it is scheduled.

What to hand to n8n
On your own account
Hard cases on your account: complaints, refunds, brand deals. A person, with n8n only routing the message.
Routine work on your account: publishing, FAQ replies, spam hiding, reporting. Automate it.
On other accounts
Engaging with other creators and communities. Do it yourself, by hand.
Likes, follows and comments on other accounts at scale. Not allowed, so not an option.
Needs judgement
Routine

Next steps

Start with Workflow 1 on one account, run it for two weeks with a person reviewing each post, then add comment triage. If you are new to n8n, the n8n tutorial covers the HTTP Request basics.

The workflows only move the busywork. What grows an account is the content, and Instagram Ignited has lessons on hooks, scripting for retention, trial reels and analysing metrics for that side of it.

n8n Instagram automation FAQ

Is automating Instagram with n8n against the rules?

Not when 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 and collection: Instagram says apps that create automated likes, comments and follows are against its Community Guidelines, and it restricts accounts that collect information in an automated way without permission.

Do I need a Business or Creator account?

Yes. Meta's Instagram Platform serves professional accounts, which it describes as an account for a business or a creator. A personal account cannot publish, read comments or receive messages through the API. Switching to a professional account is free in the app settings and can be reversed later.

How many posts can I publish through the Instagram API?

Meta's content publishing guide says accounts are limited to 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 call the content_publishing_limit endpoint before a large batch and treat the lower figure as the safe one until Meta fixes the page.

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

No. Meta's messaging docs say conversations only begin when an Instagram user messages your account, and your app has 24 hours to respond. The one exception is a private reply: a single message to someone who commented on your post or reel, sent within 7 days of the comment. Cold outreach through the API is not possible, and doing it another way breaks the terms.

Does n8n have an Instagram node?

Not a dedicated action node. The Facebook Trigger node has an Instagram object that listens for comments, mentions, messages, story insights and more, and n8n's docs say it fails unless the Include Values option is on. API calls go through the HTTP Request node, with the access token stored in a credential rather than in the node.

Why did impressions stop working in my Instagram analytics workflow?

Meta's v22.0 changelog deprecated impressions and plays on media insights from v22.0, and for all versions from April 21, 2025, and introduced views. The current media insights reference says impressions is deprecated for media created after July 2, 2024. Change the metric names in your requests to views and reach.

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

For accounts you own or manage, Meta says Standard Access covers it, and Advanced Access, which needs App Review and Business Verification, is for apps serving other people's accounts. The catch for n8n is webhooks: Meta says Advanced Access is required to receive comments and live_comments notifications, and the app must be Live.

Free · no card needed

Start with the free Starter Kit.

32 fill-in-the-blank hooks from Instagram Ignited, plus four more working files.

Starter Kit5 files · free
See All Access: $99/mo →30-day money-back guarantee