Auto-Comment on Instagram Posts with GPT-4O, Phantombuster, and SharePoint
## Who's it for 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. ## How it works / What it does 1. **Schedule Trigger** fires every 2h at a specified minute. 2. **Select Cookie** chooses a rotating Instagram session-cookie by time slice. 3. **Generate Random Hashtag** (GPT-4o) outputs a realistic AI/BPA tag. 4. **Hashtag Agent** (Phantombuster) scrapes up to `ENV_MAX_POSS_PER_HASHAG` recent posts. 5. **Get Random Post** picks one; **Create Comment** (GPT-4o) crafts a 150-character reply in the chosen language. 6. Builds `instagram_post_to_comment.csv`, uploads to SharePoint, then launches the **Auto-comment Agent** which posts the reply. 7. Post URL is logged to `instagram_posts_already_commented.csv` to avoid duplicates. 8. **Wait** nodes throttle launches to approximately 80 comments/day. ## How to set up 1. Add credentials: Phantombuster API, SharePoint OAuth2, OpenAI API key. 2. In SharePoint “Phantombuster” folder create: - `instagram_session_cookies.txt` - one cookie per line. - `instagram_posts_already_commented.csv` with header `postUrl`. 3. Edit **Set ENV Variables** to set default language, prompt, and max posts per scrape. 4. Activate the workflow; it will comment every 2h. ## Requirements - n8n 1.33 + - Phantombuster Growth plan (API access) - OpenAI account (GPT-4o) - Microsoft 365 SharePoint tenant ## How to customize - Change tone/length: tweak prompt in **Create Comment**. - Comment more often: raise `ENV_MAX_POSS_PER_HASHAG`, adjust cron, and agent limits. - Swap SharePoint for Drive/Dropbox by replacing storage nodes.
- Platform
- n8n
- Category
- Social Media
- Price
- $24.99
- Creator
- plemeo
- if
- set
- code
- wait
- stickyNote
- convertToFile
- phantombuster
- agent
- extractFromFile
- scheduleTrigger
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Social Media workflows
- Generate & Auto-Post AI Videos to Social Media with Veo3 and Blotato$14.99
- Automate AI-Driven Social Media Content Creation and Publishing$24.99
- Automate Viral TikTok Cloning and Multi-Platform Posting with AI$19.99
- Automate LinkedIn Content Creation and Publishing via Email with AI$24.99
- Automate Social Media Posts Using Google Trends and AI$14.99
- Automate Video Captioning and Posting to Instagram and TikTok$14.99
More from plemeo
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.