Use this advanced n8n workflow to automatically scrape and like Instagram posts from target profiles via Phantombuster, featuring intelligent cookie rotation via OpenAI and duplicate checking using SharePoint.
Download this n8n workflow template and start using it instantly.
This robust n8n workflow provides a sophisticated solution for automating Instagram interactions, ensuring account safety and data integrity. The core problem this automation solves is the need for consistent, rate-limited engagement with fresh content from specific profiles, while intelligently rotating login credentials (session cookies) and preventing the system from liking the same post twice. This advanced n8n template leverages Microsoft SharePoint for storing critical data (profiles to scrape, used cookies, and already-liked posts) and uses the Phantombuster platform to handle the heavy lifting of scraping and liking. Furthermore, an innovative AI LangChain n8n node is used to implement a time-slice logic for rotating session cookies, adding a layer of intelligence and resilience to the overall n8n workflow.
The entire process is initiated by an n8n trigger, specifically a Schedule Trigger, running every two hours and fifteen minutes.
Wait period, the n8n node logic fetches the resulting data (post URLs) from Phantombuster. A Code n8n node then selects a single random post URL from the scraped list to be liked.To deploy this comprehensive n8n workflow, follow these steps:
Select Cookie n8n node uses a LangChain Agent which relies on an OpenAI model for its decision-making logic.instagramsessioncookies.txt (JSON array of cookies for rotation).instagramprofilestoscrape.csv (List of profile URLs the workflow should target).instagrampostsalreadyliked.csv (The persistent history log). Schedule Trigger (n8n trigger): Initiates the n8n workflow execution every 2 hours and 15 minutes, maintaining safe operational pacing.
Get Available Session Cookies (Microsoft SharePoint n8n node): Downloads the file containing Instagram session cookies from SharePoint.
Select Cookie (LangChain Agent n8n node): Uses a complex time-based logic, powered by OpenAI, to select one session cookie from the list for the current run, crucial for account security in this n8n template.
Get Profile Extractor Agent (Phantombuster n8n node): Retrieves the specific agent ID needed to scrape Instagram profiles.
Launch Agent (Phantombuster n8n node): Starts the profile scraping operation, passing the required sessionCookie and the SharePoint URL of the target profile list.
Prepare Posts (Code n8n node): Custom JavaScript logic within this n8n node cleans and transforms the raw result data from Phantombuster into usable JSON items.
Get Random Post (Code n8n node): Selects a single, random post URL from the scraped results, ensuring varied engagement.
Download file / Extract from File (SharePoint & CSV n8n nodes): These nodes manage the history log, fetching and parsing the list of previously liked posts.
Check if in List / If (Code & If n8n nodes): Core logic n8n nodes that verify if the selected post is a duplicate, preventing repeated actions, which is a vital feature of this n8n workflow.
Create CSV Binary (Code n8n node): Generates a temporary, single-row CSV file containing only the URL of the post to be liked.
Upload CSV (Microsoft SharePoint n8n node): Uploads the single-post CSV to SharePoint so the Phantombuster Autoliker can access the input via URL.
Launch AL Agent (Phantombuster n8n node): Executes the actual liking action using the new input CSV and the rotated session cookie, demonstrating the power of this comprehensive n8n template.
Streamline your inbox management using this advanced n8n workflow. Automatically analyze incoming Gmail messages with OpenAI to apply relevant labels like 'Inquiry' or 'Partnership'. Perfect for efficient n8n templates.

Automate daily sales reporting using this powerful n8n workflow. Pull data from Google Sheets, generate metrics analysis via Google Gemini, and instantly notify teams via Gmail and Telegram. Perfect for sales operations.

Automate the creation of SEO-optimized product comparison ("vs") pages using this advanced n8n workflow. Combines Google Sheets data, OpenAI content generation, and direct CMS publishing.

This advanced n8n workflow template uses OpenAI to generate dynamic LinkedIn search terms, Phantombuster for automated scraping and liking, and SharePoint for session and history management.

A powerful n8n workflow template for automated Twitter liking. Features Phantombuster integration, SharePoint state management, AI-driven session cookie rotation, and robust deduplication logic.

Hi, I'm Gerhard from Plemeo. At plemeo.ai, we focus on AI-driven automation and workflow optimization. Our deep expertise with n8n enables us to streamline processes and boost efficiency in software development. This allows us to deliver real, measurable improvements. Curious how plemeo.ai and n8n can benefit your business? Reach out at [email protected] or visit plemeo.ai.







































