Mindket

Instagram DM reply bot with ManyChat and an OpenAI agent

Newversion 1 · updated

Overview

An n8n workflow that answers Instagram direct messages in your own voice. ManyChat posts each message to a webhook, an OpenAI agent replies with a short memory of the chat, and the reply goes back as JSON.

Instagram DM reply bot with ManyChat and an OpenAI agent is an n8n workflow in the Marketing & SEO category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file and publish it, then use the production webhook address
  • Your own n8n server: the same file and steps, with the webhook reachable from the internet over https
  • ManyChat: a flow that posts each message to that address and shows the reply
  • OpenAI: the model that writes the replies

Platform

Connects 3 apps

How it works

Trigger

A follower sends a message

It starts when ManyChat posts a message to the webhook. It brings:

  • The text of the message
  • An id for the chat, which keys the memory

Actions

  1. Takes the message text and the chat id from the request
  2. Loads your system prompt, with the example posts that set the tone
  3. Has an OpenAI agent write a reply, with the recent turns of that chat as memory
  4. Sends the reply back to ManyChat as JSON

Result

A short reply in your voice, returned to ManyChat as JSON in a field called output

Integrations

What you need before you start.

ManyChat

Instagram chat tool

Posts each message to the webhook and shows the reply.

NeedsA ManyChat account with Instagram connected

Instagram

Message source

Where the follower writes the direct message.

NeedsAn Instagram account connected to ManyChat

OpenAI

Reply writer

Writes the reply in the voice of your prompt.

NeedsAn OpenAI API key

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
4 steps, starting when its webhook is called
AI
1 step calls an AI model: AI Agent
Sign-ins
Signs in to: OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 4 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow is the brain behind an Instagram message bot. ManyChat, the chat tool that sits between Instagram and n8n, posts each incoming message to a webhook, together with an id for that chat. A Set step holds your system prompt and picks the message text and the chat id out of the request. An OpenAI agent writes the answer in the voice the prompt describes, and a window memory keeps the recent turns of each chat. The workflow then hands the answer back as JSON. Six nodes run it, beside one sticky note.

Who it suits

Creators and small brands who get the same questions in their Instagram inbox and want a first reply in their own tone. Skip it if a wrong answer would cost money or trust, because the bot knows only what your prompt tells it. It writes to real people.

Who uses it, and how
IndustryWho uses itHow they use itExample
CreatorsSolo creatorsAnswer the questions every post brings inA creator pastes ten captions into the prompt and the bot replies in the same easy tone.
CoachingFitness and life coachesGive a first answer to “where do I start” messagesA coach lists a free guide in the prompt, and the bot points new followers to it.
ShopsSmall online shopsAnswer opening hours, sizes and shipping from facts in the promptA shop owner writes the delivery times into the prompt once.
AgenciesSocial media managersCover first-line replies for a client’s accountA manager keeps one copy of the workflow for each client, each with its own prompt.

You need to know n8n’s settings: import a file, add one credential, set a webhook live and call it from another tool.

Where to use it

It needs an n8n that ManyChat can reach over the internet, and a ManyChat account connected to Instagram.

  • n8n Cloud: import the file and publish it, then use the production webhook address
  • Your own n8n server: the same file and steps, with the webhook reachable from the internet over https
  • ManyChat: a flow that posts each message to that address and shows the reply
  • OpenAI: the model that writes the replies

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup is one credential, one prompt and one address in ManyChat.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own that the internet can reach
OpenAIAn API key, added in n8n as an OpenAI credential
ManyChatAn account with your Instagram account connected. Mindket did not check which ManyChat plan allows calls to a webhook
Example postsA few of your own captions or posts, so that the bot can copy your tone
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add an OpenAI credential and select it in OpenAI Chat Model.
  3. Open Set System Prompt. Replace <YOUR_EXAMPLE_POSTS> with your own posts, and change the rules if you like.
  4. Publish the workflow, open Receive Instagram Message and copy its production address.
  5. In ManyChat, add a request step that posts JSON to that address. Send a value that is unique to each contact as session_id, and the contact’s last message as text. Show the output field of the reply as the bot’s message.

How to use it

Leave the workflow published. Each message a follower sends in the ManyChat flow gets a reply that the agent writes. Test with your own account before you open it to everyone.

What to change for a different result
To changeWhere
The bot’s voice and rulesThe prompt field in Set System Prompt
How many turns it remembersThe context window length in Window Buffer Memory
The modelOpenAI Chat Model
The webhook addressThe path in Receive Instagram Message
The shape of the answerSend Reply

Example

A follower asks your bot a question through the ManyChat flow.

{"session_id": "1001", "text": "What is your top tip for starting out?"}

The agent answers in a short line, in the voice of your example posts, and the webhook returns a JSON object with one field called output. ManyChat shows that text to the follower.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one waits for a message, asks an AI to answer it and sends the answer back. Add your example posts first, because the bot only knows what you give it.

For experts. The chat id from ManyChat is the memory key.

Where to look closer
NodeWhat it doesWhat to know
Receive Instagram MessageTakes a POST and waits for a reply nodeAnyone who knows the address can post to it
Set System PromptHolds the prompt and reads session_id and text from the bodyThe chat id keys the memory
AI AgentRuns the model with the prompt and the messageNo tools are connected
OpenAI Chat ModelThe model behind the agentSet to gpt-5.6-terra, which an agent can use for tool calling
Window Buffer MemoryKeeps the recent turns of each chatIt lives in n8n’s own memory, so a restart clears it
Send ReplyReturns the first incoming item as JSONThe answer sits in output

Good to know

The webhook is open, so treat it like a door with no lock.

  • Safety: anyone who finds the address can send messages and spend your OpenAI credit. Switch the webhook’s authentication to a header check and send the same header from ManyChat, if ManyChat lets you add one
  • Fixes: the original set no model, so n8n would have used its default, gpt-5-mini, which OpenAI shuts down on 11 December 2026. The model is now gpt-5.6-terra. The prompt is rewritten, with a placeholder for your posts, and the webhook address is neutral
  • Limits: the bot knows only what the prompt tells it. It is told to say so when it does not know, which lowers the risk of a made-up answer and does not remove it
  • Memory: it lives in the n8n process, so a restart clears every chat. The last turns are all it keeps
  • Cost and data: each message is one OpenAI call, and the chat text goes to OpenAI
  • Not run: Mindket did not run it against ManyChat, Instagram or OpenAI, and did not check ManyChat’s screens, its limits or how long it waits for a reply
  • Credentials: the JSON holds none

README and files

README

Instagram DM reply bot with ManyChat and an OpenAI agent

An n8n workflow that answers Instagram direct messages in your own voice. ManyChat posts each message to a webhook, an
OpenAI agent writes the reply with a short memory of the chat, and the workflow sends the reply back as JSON.

What is inside

  • workflow.json: the workflow as n8n exports it, seven nodes. One is a sticky note. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The chat model had no model set, so n8n would have used its default, gpt-5-mini, which OpenAI shuts down on
    11 December 2026. It is now gpt-5.6-terra, set in OpenAI Chat Model.
  • The system prompt is rewritten in new words. It points to a placeholder, <YOUR_EXAMPLE_POSTS>, where you paste your own
    posts. It also tells the bot to say so when it does not know, and not to invent facts.
  • The webhook path is a neutral instagram-dm, and the hidden webhook id from the original is gone.
  • The nodes have plain names, such as Receive Instagram Message, Set System Prompt and Send Reply. The wiring is
    unchanged.
  • The sticky note is rewritten.

Before you start

  • An n8n that ManyChat can reach over the internet, on n8n Cloud or on a server of your own.
  • An OpenAI API key.
  • A ManyChat account with your Instagram account connected. Mindket did not check which ManyChat plan allows calls to a
    webhook.
  • A few of your own posts or captions to paste into the prompt.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add an OpenAI credential and select it in OpenAI Chat Model.
  3. Open Set System Prompt. Replace <YOUR_EXAMPLE_POSTS> with your own posts, and change the rules if you like.
  4. Publish the workflow, open Receive Instagram Message and copy its production address.
  5. In ManyChat, add a request step that posts JSON to that address. Send a value that is unique to each contact as
    session_id, and the contact's last message as text. Show the output field of the reply as the bot's message.

How a run goes

  1. Receive Instagram Message takes the POST and waits for a reply node.
  2. Set System Prompt builds three fields: the prompt, the chat id from session_id and the message from text.
  3. AI Agent sends the message to the model with your prompt as its system message. Window Buffer Memory supplies the
    recent turns of that chat and stores the new one under the chat id.
  4. Send Reply returns the agent's answer as JSON. The text sits in a field called output.

Change the result

  • The voice and the rules: the prompt field in Set System Prompt.
  • How many turns it remembers: the context window length in Window Buffer Memory.
  • The model: OpenAI Chat Model.
  • The webhook address: the path in Receive Instagram Message.

Good to know

  • The webhook is open. Anyone who finds the address can send messages and spend your OpenAI credit. Switch the webhook's
    authentication to a header check, and send the same header from ManyChat if it lets you add one.
  • The bot knows only what the prompt tells it. Telling it to admit when it does not know lowers the risk of a made-up
    answer, and does not remove it. Read the first replies before you open it to everyone.
  • The memory lives in the n8n process, so a restart clears every chat.
  • Each message is one OpenAI call, and the chat text goes to OpenAI.
  • No tools are connected to the agent. The model is set to gpt-5.6-terra because an agent talks to its model through
    tool calling.
  • Mindket did not run this workflow against ManyChat, Instagram or OpenAI. It did not check ManyChat's screens, its limits or
    how long it waits for a reply. The ManyChat steps are described from the shape of the request the workflow expects.
Files
NOTICE.md  625 B
README.md  4 KB
workflow.json  5 KB

3 files, 9 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Marketing & SEO

See all in Marketing & SEO

Pixel Art XL

nerijs · Kit

A pixel art style add-on for Stable Diffusion XL that turns text prompts into pixel-style images, with an optional LCM LoRA for faster runs. For game makers, d…

New

Licon MSR for LTX-2.5

LiconStudio · Kit

Keeps characters, clothing, objects and backgrounds consistent in generated video by feeding the model up to five reference images. A LoRA for LTX-2.5 in Comfy…

New

Flux.2-Klein-9B-MatchingPose

nhathoangfoto · Kit

A LoRA for FLUX.2 Klein 9B that puts a character into the pose shown by a mannequin reference while keeping the character's face and style. For artists and des…

New