Skip to main content

Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster

Workflow preview

Workflow preview
100%
Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who’s it for Influencers and social media teams who want to comment automatically on posts from selected Instagram profiles —scaling engagement while staying within platform limits. How it works / ...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.wait, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.microsoftsharepoint, n8n-nodes-base.phantombuster, n8n-nodes-base.stickynote, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster
Workflow name
Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster

Who’s it for

Influencers and social-media teams who want to comment automatically on posts from selected Instagram profiles—scaling engagement while staying within platform limits.

How it works / What it does

  1. Schedule Trigger runs every 2 h.
  2. Profile Post Extractor fetches up to 20 posts per profile from your CSV.
  3. Select Cookie rotates Instagram session-cookies.
  4. Get Random Post selects one.
  5. Create Comment (GPT-4o) writes ≤150-character reply in your chosen language.
  6. Builds instagram_post_to_comment.csv, uploads to SharePoint.
  7. Phantombuster Autocomment Agent posts it.
  8. Logged in instagram_posts_already_commented.csv to prevent repeats.

How to set up

  • Same as the auto-liker, but also add instagram_posts_already_commented.csv (header postUrl).
  • Define tracked profiles in profiles_instagram.csv.
  • Configure comment prompt & language in Set ENV Variables.

Profile CSV format

Your profiles_instagram.csv must contain a header profileUrl and valid Instagram profile URLs. Example:

profileUrl
https://www.instagram.com/brand_account/
https://www.instagram.com/influencer123/

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 - OpenAI Chat Model

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

Block 2 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 3 - Get Random Post

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Create Comment

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

Block 5 - Create CSV Binary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Upload CSV

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

Block 7 - Get Autocomment Agent

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

Block 8 - Launch AC Agent

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

Block 9 - Get Response

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

Block 10 - Sticky Note2

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

Block 11 - Set ENV Variables

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

Block 12 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 13 - Update file

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

Block 14 - Download file

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

Block 15 - Check if in List

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 17 - Wait2

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 18 - Prepare Updated Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Extract from File

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

Block 20 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 21 - Get Available Session Cookies

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

Block 22 - Extract Cookies

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

Block 23 - Select Cookie

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

Block 24 - OpenAI Chat Model2

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

Showing the first 24 of 41 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster
Complexity advanced
Nodes 41
Categories Social Media
Author plemeo
Published 16 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8629/8629.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 Automated Instagram commenting on selected profiles with GPT-4o and Phantombuster do?

Who’s it for Influencers and social media teams who want to comment automatically on posts from selected Instagram profiles —scaling engagement while staying within platform limits. How it works / ...

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 use case.