📱 Instagram content & DM automation with Gemini, Telegram, and Apify

4,564 views · 📱 Social Media & Email Marketing

💡 Pro Tip — Heads up — if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.

View All Scrapers

Description

🤖 Instagram Automation Suite: AI Chatbot & Content Powerhouse

Workflow Overview

This cutting-edge n8n workflow is a comprehensive automation solution designed to streamline various Instagram operations. It combines an intelligent AI chatbot for direct message management, automated user following, and an advanced content generation system, all integrated to enhance your Instagram presence and efficiency.

This workflow automatically:


Key Benefits


Setup Requirements

To set up and run this workflow, you’ll need the following:


Workflow Architecture

[Telegram New Message Trigger]
    ⬇️
[Variables (Set OpenRouter API Key, Instagram Personality, Session ID)]
    ⬇️
[Switch (Filter messages from 'Wolf23000' and ensure message text exists)]
    ⬇️
[Edit Fields (Extract message text)]
    ⬇️
[AI Agent (Determine action based on message intent)]
    ⬇️
[Structured Output Parser (Parse AI agent's JSON output)]
    ⬇️
[Switch1 (Route based on AI agent's determined action: chat_back, run_agent, get_instagram_profile)]
    ⬇️
    ┌─────────────┬─────────────┬─────────────┐
    │             │             │             │
    ▼             ▼             ▼             ▼
[Send a text message1 (Chat back)] [Send a text message (Run agent confirmation)] [Send a text message2 (Get profile confirmation)]


[Schedule Trigger (Hourly for Instagram follow)]
    ⬇️
[Variables (Set OpenRouter API Key, Instagram Personality, Session ID)]
    ⬇️
[Code (Prepare usernames for following)]
    ⬇️
[Code1 (Process followed usernames)]
    ⬇️
[Schedule Trigger2 (Monthly for Instagram post generation)]
    ⬇️
[AI Agent1 (Generate monthly Instagram post ideas)]
    ⬇️
[OpenRouter Chat Model (AI Model for content generation)]
    ⬇️
[Code2 (Parse AI agent's JSON output)]
    ⬇️
[Schedule Trigger3 (Daily for post generation refinement and auto-posting)]
    ⬇️
[AI Agent2 (Enhance image prompts and captions)]
    ⬇️
[OpenRouter Chat Model2 (AI Model for prompt refinement)]
    ⬇️
[Update row in sheet1 (Update Google Sheet with enhanced content)]
    ⬇️
[Get row(s) in sheet2 (Retrieve data from Google Sheet)]

Connect With Me

Exploring AI-Powered Social Media Automation? 📧 Email: mohamedgb00714@gmail.com 💼 LinkedIn: Mohamed el Hadi Msaid

Supercharge your Instagram presence with intelligent automation and AI-driven content! 🚀

🔗 Nodes Used

Google Sheets, HTTP Request, Telegram, Telegram Trigger, Schedule Trigger, AI Agent

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup