Skip to main content

🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o

Workflow preview

Workflow preview
100%
🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Instagram AI Agent with MCP Server – Built for Smart Engagement and Automation Hi! I’m Amanda I build intelligent automations with n8n and Make. This powerful workflow was designed to help te...

Best for

  • Social Media automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.mcptrigger, @n8n/n8n-nodes-langchain.mcpclienttool, @n8n/n8n-nodes-langchain.toolhttprequest, n8n-nodes-base.set, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Amanda Benks.

Original n8n.io source

1.1 Workflow description

Title
🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o
Workflow name
🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o

🤖 Instagram AI Agent with MCP Server – Built for Smart Engagement and Automation

Hi! I’m Amanda 🥰

I build intelligent automations with n8n and Make.
This powerful workflow was designed to help teams automatically handle Instagram interactions with AI. Using Meta Graph API, LangChain, MCP Server, and GPT-4o, it allows your AI agent to search for posts, read captions, fetch comments, and even reply or message followers, all through structured tools.


🔧 What the workflow does

  • Searches for recent media using Instagram ID and access token
  • Reads and extracts captions or media URLs
  • Fetches comments and specific replies from each post
  • Replies to comments automatically with GPT-generated responses
  • Sends direct messages to followers who commented
  • Maps user input and session to keep memory context via LangChain
  • Communicates via Server-Sent Events (SSE) using your MCP Server URL

🧰 Nodes & Tech Used

  • LangChain Agent + Chat Model with GPT-4o
  • Memory Buffer for session memory
  • toolHttpRequest to search media, comments, and send replies
  • MCP Trigger and MCP Tool (custom SSE connection)
  • Set node for input and variable assignment
  • Webhook and JSON for Instagram API structure

⚙️ Setup Instructions

  1. Create your Instagram App in Meta Developer Portal
  2. Add your Instagram ID and Access Token in the Set node
  3. Update the MCP Server Tool URL in the MCP Instagram node
    • Use your n8n server URL (e.g. https://yourdomain.com/mcp/server/instagram/sse)
  4. Trigger the workflow using the included LangChain Chat Trigger
  5. Interact via text to ask the agent to:
    • “Get latest posts”
    • “Reply to comment X with this message”
    • “Send DM to this user about...”

👥 Who this is for

  • Social media teams managing multiple comments
  • Brands automating engagement with followers
  • Agencies creating smart, autonomous digital assistants
  • Developers building conversational Instagram bots

✅ Requirements

  • Meta Graph API access
  • Instagram Business account
  • n8n instance (Cloud or Self-hosted)
  • MCP Server configured (SSE Endpoint enabled)
  • OpenAI API Key (for GPT-4o + LangChain)

🌐 Want to use this workflow?

❤️ Buy workflows: https://iloveflows.com
☁️ Try n8n Cloud: https://n8n.partnerlinks.io/amanda

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 3 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 4 - 🗂️ MCP Instagram

Type / Role
@n8n/n8n-nodes-langchain.mcpTrigger - mcpTrigger
Config choices
Version 1

Block 5 - MCP Instagram

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1

Block 6 - Search Media

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 7 - Instagram Mapping

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Media Details

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 9 - Search Comment

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 10 - Reply Comment

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 11 - Send Direct Message

Type / Role
@n8n/n8n-nodes-langchain.toolHttpRequest - toolHttpRequest
Config choices
Version 1.1

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow 🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o
Complexity advanced
Nodes 17
Categories Social Media, AI Chatbot
Author Amanda Benks
Published 06 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3896/3896.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does 🤖 Instagram MCP AI agent – read, reply & manage comments with GPT-4o do?

Instagram AI Agent with MCP Server – Built for Smart Engagement and Automation Hi! I’m Amanda I build intelligent automations with n8n and Make. This powerful workflow was designed to help te...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, AI Chatbot use case.