AutomationFlowsAI & RAG › Auto-comment on Instagram Posts with Gpt-4o, Phantombuster, and Sharepoint

Auto-comment on Instagram Posts with Gpt-4o, Phantombuster, and Sharepoint

Byplemeo @plemeo on n8n.io

Social-media teams and influencers who want to grow engagement by automatically posting short, relevant comments on new Instagram posts under rotating hashtags—while staying under platform limits. Schedule Trigger fires every 2 h at a specified minute. Select Cookie chooses a…

Cron / scheduled trigger★★★★★ complexityAI-powered39 nodesOpenAI ChatPhantomBusterAgentMicrosoft SharePoint
AI & RAG Trigger: Cron / scheduled Nodes: 39 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Agent → OpenAI Chat 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": "LNR9VPUbFEajd57v",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Instagram Auto Commenting - Creators Hub",
  "tags": [],
  "nodes": [
    {
      "id": "91bc557b-028a-4778-8e51-8b69590ff2bd",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -256,
        -1776
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "700968b7-51ba-4ffa-919d-f0da43e3743a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -512,
        -1184
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "680e81c7-5219-4117-b084-ba951e61ca56",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        656,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "132707b5-b634-4ada-9c49-43c6e8a227a7",
      "name": "Launch Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -416,
        -1776
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a9e108c7-efb3-488b-9ba8-901c0994093b",
      "name": "Get Random Post",
      "type": "n8n-nodes-base.code",
      "position": [
        -1840,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "10116cd5-806c-4604-9447-ed8d8e140ca2",
      "name": "Create Comment",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -512,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "fa623878-40ab-45f0-8685-726816927c75",
      "name": "Create CSV Binary",
      "type": "n8n-nodes-base.code",
      "position": [
        -176,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "93d4a1b3-1b51-4b8e-b2bb-abad737b6d90",
      "name": "Upload CSV",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -16,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5113c291-24e0-4a4c-ba45-fea45693a99d",
      "name": "Get Autocomment Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        240,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2f8df366-546b-45b8-affa-2eec0419451f",
      "name": "Get Hashtag Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -576,
        -1776
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b6fe5490-11df-4875-bd46-3ead76bb803c",
      "name": "Get Posts",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -96,
        -1776
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f1213cad-f240-42fe-a02c-7d23949f8e1b",
      "name": "Launch AC Agent",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        448,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "73f3edd0-6339-48a1-8048-249419c7dfd3",
      "name": "Get Response",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        848,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "dbb2757c-fee3-4b76-a139-cde54ae6c3b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -1888
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "62f0a062-4794-4dd6-8b83-2d5d38b104d8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        -1472
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e128e19c-0341-4c86-adab-1fd9d8add971",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -1472
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "770e3a45-8d4c-4cc1-aadd-fcf3dce2f40c",
      "name": "Set ENV Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -736,
        -1776
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "77379241-7ac0-4764-a84e-fdcad65b9261",
      "name": "Generate Random Hashtag",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1056,
        -1776
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "523432df-f776-46b9-a1d7-fccbd3bd8f64",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -992,
        -2208
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "7043f25d-3dca-40b5-9f25-b07c86c4dc36",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1072,
        -1616
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "e0074e8b-8138-4fd6-b139-d764746984ff",
      "name": "Update file",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -672,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d423679a-dcad-4c70-8bce-6b479503c07c",
      "name": "Download file",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -1664,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "edef95e3-c2e4-4e11-aee4-ace49b4608d1",
      "name": "Check if in List",
      "type": "n8n-nodes-base.code",
      "position": [
        -1312,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "afb29b9c-cb02-47fb-bf31-bae6a77c54ce",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1152,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "af4ff58e-bc3c-4b80-9bd9-e9dc479de3ee",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2000,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "728c2193-b301-40d8-b327-1de92cfe99a9",
      "name": "Prepare Updated Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -992,
        -1360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "95e7013e-461f-4f4e-87e1-c409c03a9980",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -1488,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "f67e2b1c-bee6-4740-a680-23412bf2ae9f",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -832,
        -1360
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e9405e7d-ae94-4737-bb6a-85e570293e9d",
      "name": "Get Available Session Cookies",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        -784,
        -2208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bea33381-e12f-4342-9ade-707fad72dac4",
      "name": "Extract Cookies",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -560,
        -2208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "58dc021e-1631-4068-94b9-9cfe7e1b35ec",
      "name": "Select Cookie",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -368,
        -2208
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "e8ba7b3c-6ca5-4591-af86-886d4abe9bb8",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -384,
        -2048
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "93e2bae7-adcd-46f3-a818-b4e85329f407",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -2304
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9272a99c-d2d4-4a8d-900c-7517e62ea201",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -2304
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "183dc623-a9aa-4479-bd8a-8717a7a710f9",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        -1888
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "edbd080d-5225-49c1-889b-ed083272b8d0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        -1056
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ee36dd67-92fa-4456-b642-098848e9d6da",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -1056
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d6f2287b-2cda-44f8-af9e-00134abec388",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -1056
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "edfe9418-4ffa-48a8-920e-d2c298204fef",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -1472
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a66471bb-ceb1-4560-97eb-f4afa2b11569",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Updated Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Get Random Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Posts": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload CSV": {
      "main": [
        [
          {
            "node": "Get Autocomment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update file": {
      "main": [
        [
          {
            "node": "Create Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch Agent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Cookie": {
      "main": [
        [
          {
            "node": "Generate Random Hashtag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Comment": {
      "main": [
        [
          {
            "node": "Create CSV Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Update file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Cookies": {
      "main": [
        [
          {
            "node": "Select Cookie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Random Post": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Launch AC Agent": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in List": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Available Session Cookies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create CSV Binary": {
      "main": [
        [
          {
            "node": "Upload CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Check if in List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Hashtag Agent": {
      "main": [
        [
          {
            "node": "Launch Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create Comment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set ENV Variables": {
      "main": [
        [
          {
            "node": "Get Hashtag Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Random Hashtag",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Select Cookie",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Updated Data": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Autocomment Agent": {
      "main": [
        [
          {
            "node": "Launch AC Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Random Hashtag": {
      "main": [
        [
          {
            "node": "Set ENV Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Available Session Cookies": {
      "main": [
        [
          {
            "node": "Extract Cookies",
            "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

Social-media teams and influencers who want to grow engagement by automatically posting short, relevant comments on new Instagram posts under rotating hashtags—while staying under platform limits. Schedule Trigger fires every 2 h at a specified minute. Select Cookie chooses a…

Source: https://n8n.io/workflows/6768/ — 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

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

OpenAI Chat, Agent, Microsoft SharePoint +2
AI & RAG

B2B marketers, recruiters, and personal-brand builders who want to spark conversations on LinkedIn by automatically posting short, relevant comments on fresh industry content—while staying under daily

OpenAI Chat, PhantomBuster, Agent +1
AI & RAG

Social-media managers, growth hackers, and brands who want to keep their Instagram accounts active by auto-liking posts from specific profiles they track—without scrolling feeds manually. Schedule Tri

Microsoft SharePoint, PhantomBuster, OpenAI Chat +2
AI & RAG

Growth hackers, community builders, and marketers who want to keep their Twitter (X) accounts active by liking posts from selected profiles automatically. Schedule Trigger fires hourly. Profile Post E

Microsoft SharePoint, PhantomBuster, Agent +2
AI & RAG

Social-media managers and brands that want to keep their Instagram accounts active by automatically liking fresh posts under selected hashtags—hands-free and rate-limited. Schedule Trigger runs every

PhantomBuster, Microsoft SharePoint, Agent +1