🤖

Integration of n8n with ManyChat

Jul 7, 2025

Summary

  • The meeting focused on a step-by-step walkthrough of integrating the n8n AI agent with ManyChat, enabling connectivity to Instagram, Facebook, WhatsApp, Telegram, and more.
  • The discussion covered prerequisites, template imports, webhook configuration, API credentials, and message automation for seamless cross-platform AI responses.
  • Testing and troubleshooting steps were shown, including real-time conversation handling, multi-message aggregation, and flexible adaptation for other platforms.
  • Free templates and additional instructional resources were offered through the community site.

Action Items

  • None assigned in the transcript.

Integration Setup Process Overview

  • To connect n8n AI agent to Instagram or other platforms, ManyChat is used as an intermediary, providing automation across several messaging platforms.
  • n8n (workflow builder and AI agent creator) and ManyChat (multi-platform, originally for Instagram) accounts must be set up and connected.
  • Templates for both services are supplied for free via the community, allowing for simplified import and setup.

n8n Configuration

  • Download and import the provided n8n template.
  • The template includes a webhook node (triggered by ManyChat), an OpenAI-connected AI agent node (with prompt and credential setup), a window buffer memory node (context window length set to 10), and a respond-webhook node.
  • Credentials for OpenAI API must be created and saved.
  • System prompts for the AI agent can be customized or use templates as provided.

ManyChat Template and Google Apps Script

  • The ManyChat template includes a message counter system to combine multiple quick user messages into one reply.
  • Time delay for message aggregation is adjustable (10 seconds default in demo, recommended 30-60 seconds).
  • A Google Apps Script is used to process and format messages before sending API requests to n8n.
  • The tutorial for setting up Google Apps Script is available in the community.

Webhook Linking and Testing

  • In n8n, ensure the webhook is set to POST, activate 'listen for test event,' and copy the test URL.
  • In ManyChat, initiate a test contact by direct messaging yourself on the connected Instagram account.
  • Test the integration by sending messages, ensuring n8n receives and processes them, and ManyChat relays the AI response back to the user.

Production Setup and Automation

  • After successful testing, switch the webhook to the production URL and update the ManyChat template accordingly.
  • Review and set automation defaults: assign the new flow as the default reply for every user message (not just once per 24 hours).

Multi-Platform Adaptation

  • The same ManyChat template and n8n workflow can be duplicated and adapted for Facebook Messenger or other supported channels by changing connection settings and flow assignments.

Decisions

  • Default reply frequency set to "every time" — To ensure the AI agent responds to each Instagram message, not just one per 24-hour period.

Open Questions / Follow-Ups

  • None documented in the transcript.