AutomationFlowsAI & RAG › Instagram AI Agent: Read, Reply & Manage Comments with GPT-4o

Instagram AI Agent: Read, Reply & Manage Comments with GPT-4o

Original n8n title: 🤖 Instagram Mcp AI Agent – Read, Reply & Manage Comments with Gpt-4o

ByAmanda Benks @amanda on n8n.io

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…

Chat trigger trigger★★★★☆ complexityAI-powered17 nodesChat TriggerAgentMemory Buffer WindowMcp TriggerMcp Client ToolTool Http RequestOpenAI Chat
AI & RAG Trigger: Chat trigger Nodes: 17 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #3896 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "q0efJd3N6ztzB8JA",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "MCP Server Instagram",
  "tags": [],
  "nodes": [
    {
      "id": "cb5e4706-3067-4e22-bceb-978a79758aa0",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -380,
        80
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1cfe6ac2-8a2c-4f62-a60f-2aa028888091",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        120,
        -20
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "17818b50-9b73-4d76-aa8b-aec9aa0af79e",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        180,
        140
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "3eb7ec47-9423-481a-b4c3-810d9d73a74a",
      "name": "\ud83d\uddc2\ufe0f MCP Instagram",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        900,
        -140
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "051a712a-f56f-45c5-be7f-71f34fe49c4a",
      "name": "MCP Instagram",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        520,
        140
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8f1014ee-2190-490f-8ceb-c97ecc155e71",
      "name": "Search Media",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        740,
        100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "470e639b-b967-4b97-b503-d42fa5dddefd",
      "name": "Instagram Mapping",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        80
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "907e2456-0695-4baa-bbca-2d58e336d19a",
      "name": "Media Details",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        880,
        100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "7c725835-8a5b-402d-87b6-82d11581c764",
      "name": "Search Comment",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1020,
        100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "8b22ce96-46e3-47a8-853d-4c4e242a913f",
      "name": "Reply Comment",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1160,
        100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "6d55e836-b087-461b-8501-4c2b5dc91e90",
      "name": "Send Direct Message",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1300,
        100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2c1bd6ac-a7f9-41a2-9312-d02a8cd3a440",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d1542156-a304-45d0-b70c-0757fff0ae1b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "01c354a8-cbfb-4e39-91d1-11dbe15b1c65",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "41c83391-415e-4360-ad19-8e1ce68c9a82",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        60,
        140
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c381f9bc-9053-4f93-8c5b-9ceb769857af",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -280
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2042f1f6-8ab2-458e-a7ec-91426c649381",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -280
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "551d4f14-9845-4fc1-a81b-63e1b97be3b5",
  "connections": {
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search Media": {
      "ai_tool": [
        [
          {
            "node": "\ud83d\uddc2\ufe0f MCP Instagram",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "MCP Instagram": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Media Details": {
      "ai_tool": [
        [
          {
            "node": "\ud83d\uddc2\ufe0f MCP Instagram",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Reply Comment": {
      "ai_tool": [
        [
          {
            "node": "\ud83d\uddc2\ufe0f MCP Instagram",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Search Comment": {
      "ai_tool": [
        [
          {
            "node": "\ud83d\uddc2\ufe0f MCP Instagram",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Instagram Mapping": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Direct Message": {
      "ai_tool": [
        [
          {
            "node": "\ud83d\uddc2\ufe0f MCP Instagram",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Instagram Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

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…

Source: https://n8n.io/workflows/3896/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n workflow is designed for Shopify store owners and e-commerce managers who want to automate their store operations through an intelligent AI assistant. The workflow creates a conversational in

Shopify Tool, Discord, Telegram +10
AI & RAG

Description: Turn your WooCommerce store into a conversational AI assistant — create products, place orders, run reports and manage coupons using natural language via n8n + an MCP Server.

Agent, OpenAI Chat, Mcp Client Tool +4
AI & RAG

This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.

Chat Trigger, Agent, N8N Nodes Mcp +4
AI & RAG

This n8n workflow showcases a full-featured AI-powered assistant connected to a Shopify store through a custom MCP (Multi-Channel Commerce Platform) Server toolkit. It empowers users to automate compr

Agent, OpenAI Chat, Mcp Client Tool +4
AI & RAG

AI Agent MCP for Email & News Research

Agent, Chat Trigger, OpenAI Chat +6