LinkedIn scraping, structuring, and messaging using PhantomBuster and GPT-4
Description
This template automates the end-to-end process of extracting professional data from LinkedIn and converting it into a usable format—ideal for recruiters, SDRs, marketers, and growth teams. With a few simple configurations, you’ll be able to trigger the flow, scrape profiles, and use AI to extract name, headline, company, role, industry, and more—without writing a single line of code.
Key Features
🔗 Launch PhantomBuster Agent using a profile URL ⏳ Wait 45 seconds for PhantomBuster to complete scraping 📥 Fetch and parse scraped data (download URL to JSON) 🤖 Use GPT-4 (OpenAI/Azure) to extract structured information 📄 Output fields: Name, Headline, Company, Job Title, Industry, Experience, etc. 🧰 Optional: Personalize messages using extracted data 📊 Send structured output to Google Sheets, Airtable, or CRM
Setup Instructions
PhantomBuster Configuration
- Sign up for PhantomBuster
- Use the LinkedIn Profile Scraper Phantom
- Obtain your API Key and Agent ID
- Provide a valid LinkedIn session cookie (from browser dev tools)
OpenAI or Azure Setup
- Add your GPT-4 or GPT-4o API credentials
- Can be from either OpenAI or Azure OpenAI
Google Sheet (Optional) Add a sheet with LinkedIn profile URLs to process in batch mode
Environment Cleanup
- This version uses n8n credentials manager
- All hardcoded tokens and API keys are removed for security compliance
Customization Tips
- You can adjust the wait duration depending on PhantomBuster execution time
- Replace or extend the AI parsing prompt to include more fields (e.g., education, location, skills)
- Add additional automations: Slack notifications, CRM sync, or enrichment tools like Clearbit or Hunter.io
Perfect For
🚀 Growth hackers and SDRs automating lead generation 🧠 Recruiters scraping profiles for outreach 📊 Marketing teams enriching data for campaigns 🛠️ SaaS builders building LinkedIn intelligence tools
LinkedIn Scraping, Structuring, and Messaging with PhantomBuster and GPT-4
This n8n workflow automates the process of extracting LinkedIn profile data, structuring it, and generating personalized messages using AI. It's designed to streamline outreach efforts by leveraging PhantomBuster for data collection and an AI agent (GPT-4 via Azure OpenAI) for intelligent message creation.
What it does
This workflow performs the following key steps:
- Triggers on Schedule: The workflow starts at a predefined schedule, ensuring regular execution.
- Reads Data from Google Sheets: It fetches raw LinkedIn profile data (likely scraped by PhantomBuster) from a specified Google Sheet.
- Processes Data with AI Agent: The extracted data is then fed into an AI Agent (powered by Azure OpenAI Chat Model). This agent is configured to:
- Structure Data: Parse and organize the raw LinkedIn data into a more usable format.
- Generate Personalized Messages: Create tailored outreach messages based on the structured profile information.
- Parses AI Output: A Structured Output Parser extracts the structured data and generated messages from the AI Agent's response.
- Performs HTTP Request: It sends an HTTP request, likely to another service or API, using the processed data and generated messages. This could be for sending the messages, updating another system, or further processing.
- Waits: A "Wait" node introduces a delay in the workflow, which can be useful for respecting API rate limits or allowing time for external processes to complete.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Google Sheets Account: Access to a Google Sheet containing the raw LinkedIn profile data.
- Azure OpenAI Account: An Azure account with access to OpenAI services (specifically GPT-4 or a similar chat model).
- PhantomBuster (External): While not directly part of this n8n workflow, the workflow assumes that LinkedIn profile data is being scraped by a tool like PhantomBuster and then imported into the Google Sheet.
- Credentials:
- Google Sheets credentials configured in n8n.
- Azure OpenAI Chat Model credentials configured in n8n.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- Set up your Google Sheets credentials.
- Set up your Azure OpenAI Chat Model credentials.
- Configure Google Sheets Node (ID 18):
- Specify the Spreadsheet ID and Sheet Name where your raw LinkedIn data is stored.
- Ensure the data is in a format that your AI Agent can understand for structuring.
- Configure AI Agent Node (ID 1119):
- Select your Azure OpenAI Chat Model credential.
- Review and adjust the prompt for the AI Agent to ensure it correctly understands how to structure the LinkedIn data and generate appropriate messages.
- Configure Structured Output Parser Node (ID 1179):
- Ensure the schema defined in this node matches the expected JSON output format from your AI Agent.
- Configure HTTP Request Node (ID 19):
- Specify the URL, Method, and Headers for your target API.
- Map the structured data and generated messages from the previous AI steps to the request body or parameters as needed.
- Configure Schedule Trigger Node (ID 839):
- Set your desired schedule for the workflow to run automatically (e.g., daily, weekly).
- Activate the Workflow: Once configured, activate the workflow to start automating your LinkedIn outreach process.
Related Templates
Daily cash flow reports with Google Sheets, Slack & Email for finance teams
Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generates a comprehensive daily report. The workflow sends multi-channel notifications via email and Slack, ensuring finance professionals stay updated with real-time financial insights. 💸📧 Key Features Daily automation keeps cash flow tracking current. Analyzes inflows and outflows for actionable insights. Multi-channel alerts enhance team visibility. Logs maintain a detailed record in Google Sheets. Workflow Process The Every Day node triggers a daily check at a set time. Get Cash Flow Data retrieves financial data from a Google Sheet. Analyze Inflows & Outflows processes the data to identify trends and totals. Validate Records ensures all entries are complete and accurate. If records are valid, it branches to: Sends Email Daily Report to finance team members. Send Slack Alert to notify the team instantly. Logs to Sheet appends the summary data to a Google Sheet for tracking. Setup Instructions Import the workflow into n8n and configure Google Sheets OAuth2 for data access. Set the daily trigger time (e.g., 9:00 AM IST) in the "Every Day" node. Test the workflow by adding sample cash flow data and verifying reports. Adjust analysis parameters as needed for specific financial metrics. Prerequisites Google Sheets OAuth2 credentials Gmail API Key for email reports Slack Bot Token (with chat:write permissions) Structured financial data in a Google Sheet Google Sheet Structure: Create a sheet with columns: Date Cash Inflow Cash Outflow Category Notes Updated At Modification Options Customize the "Analyze Inflows & Outflows" node to include custom financial ratios. Adjust the "Validate Records" filter to flag anomalies or missing data. Modify email and Slack templates with branded formatting. Integrate with accounting tools (e.g., Xero) for live data feeds. Set different trigger times to align with your financial review schedule. Discover more workflows – Get in touch with us
Generate Funny AI Videos with Sora 2 and Auto-Publish to TikTok
This automation creates a fully integrated pipeline to generate AI-powered videos, store them, and publish them on TikTok — all automatically. It connects OpenAI Sora 2, and Postiz (for TikTok publishing) to streamline content creation. --- Key Benefits ✅ Full Automation – From text prompt to TikTok upload, everything happens automatically with no manual intervention once set up. ✅ Centralized Control – Google Sheets acts as a simple dashboard to manage prompts, durations, and generated results. ✅ AI-Powered Creativity – Uses OpenAI Sora 2 for realistic video generation and GPT-5 for optimized titles. ✅ Social Media Integration – Seamlessly posts videos to TikTok via Postiz, ready for your audience. ✅ Scalable & Customizable – Can easily be extended to other platforms like YouTube, Instagram, or LinkedIn. ✅ Time-Saving – Eliminates repetitive steps like manual video uploads or caption writing. --- How it works This workflow automates the end-to-end process of generating AI videos and publishing them to TikTok. It is triggered either manually or on a recurring schedule. Trigger & Data Fetch: The workflow starts by checking a specified Form for new entries. It looks for rows where a video has been requested (a "PROMPT" is filled) but not yet generated (the "VIDEO" column is empty). AI Video Generation: For each new prompt found, the workflow sends a request to the Fal.ai Sora 2 model to generate a video. It then enters a polling loop, repeatedly checking the status of the generation request every 60 seconds until the video is "COMPLETED". Post-Processing & Upload: Once the video is ready, the workflow performs several actions in parallel: Fetch Video & Store: It retrieves the final video URL, downloads the video file Generate Title: It uses the OpenAI GPT-4o-mini model to analyze the original prompt and generate an optimized, engaging title for the video. Publish to TikTok: The video file is uploaded to Postiz, a social media scheduling tool, which then automatically publishes it to a connected TikTok channel, using the AI-generated title as the post's caption. --- Set up steps To make this workflow functional, you need to complete the following configuration steps: Prepare the Google Sheet: Create a Form with at least "PROMPT", "DURATION", and "VIDEO" fields. Configure Fal.ai for Video Generation: Create an account at Fal.ai and obtain your API key. In both the "Create Video" and "Get status" HTTP Request nodes, set up the "Header Auth" credential. Set the Name to Authorization and the Value to Key YOURAPIKEY. Set up TikTok Publishing via Postiz: Create an account on Postiz and connect your TikTok account to get a Channel ID. Obtain your Postiz API key. In the "Upload Video to Postiz" and "TikTok" (Postiz) nodes, configure the API credentials. In the "TikTok" node, replace the placeholder "XXX" in the integrationId field with your actual TikTok Channel ID from Postiz. (Optional) Configure AI Title Generation: The "Generate title" node uses OpenAI. Ensure you have valid OpenAI API credentials configured in n8n for this node to work. --- Need help customizing? Contact me for consulting and support or add me on Linkedin. Header 2
Competitor intelligence agent: SERP monitoring + summary with Thordata + OpenAI
Who this is for? This workflow is designed for: Marketing analysts, SEO specialists, and content strategists who want automated intelligence on their online competitors. Growth teams that need quick insights from SERP (Search Engine Results Pages) without manual data scraping. Agencies managing multiple clients’ SEO presence and tracking competitive positioning in real-time. What problem is this workflow solving? Manual competitor research is time-consuming, fragmented, and often lacks actionable insights. This workflow automates the entire process by: Fetching SERP results from multiple search engines (Google, Bing, Yandex, DuckDuckGo) using Thordata’s Scraper API. Using OpenAI GPT-4.1-mini to analyze, summarize, and extract keyword opportunities, topic clusters, and competitor weaknesses. Producing structured, JSON-based insights ready for dashboards or reports. Essentially, it transforms raw SERP data into strategic marketing intelligence — saving hours of research time. What this workflow does Here’s a step-by-step overview of how the workflow operates: Step 1: Manual Trigger Initiates the process on demand when you click “Execute Workflow.” Step 2: Set the Input Query The “Set Input Fields” node defines your search query, such as: > “Top SEO strategies for e-commerce in 2025” Step 3: Multi-Engine SERP Fetching Four HTTP request tools send the query to Thordata Scraper API to retrieve results from: Google Bing Yandex DuckDuckGo Each uses Bearer Authentication configured via “Thordata SERP Bearer Auth Account.” Step 4: AI Agent Processing The LangChain AI Agent orchestrates the data flow, combining inputs and preparing them for structured analysis. Step 5: SEO Analysis The SEO Analyst node (powered by GPT-4.1-mini) parses SERP results into a structured schema, extracting: Competitor domains Page titles & content types Ranking positions Keyword overlaps Traffic share estimations Strengths and weaknesses Step 6: Summarization The Summarize the content node distills complex data into a concise executive summary using GPT-4.1-mini. Step 7: Keyword & Topic Extraction The Keyword and Topic Analysis node extracts: Primary and secondary keywords Topic clusters and content gaps SEO strength scores Competitor insights Step 8: Output Formatting The Structured Output Parser ensures results are clean, validated JSON objects for further integration (e.g., Google Sheets, Notion, or dashboards). Setup Prerequisites n8n Cloud or Self-Hosted instance Thordata Scraper API Key (for SERP data retrieval) OpenAI API Key (for GPT-based reasoning) Setup Steps Add Credentials Go to Credentials → Add New → HTTP Bearer Auth* → Paste your Thordata API token. Add OpenAI API Credentials* for the GPT model. Import the Workflow Copy the provided JSON or upload it into your n8n instance. Set Input In the “Set the Input Fields” node, replace the example query with your desired topic, e.g.: “Google Search for Top SEO strategies for e-commerce in 2025” Execute Click “Execute Workflow” to run the analysis. How to customize this workflow to your needs Modify Search Query Change the search_query variable in the Set Node to any target keyword or topic. Change AI Model In the OpenAI Chat Model nodes, you can switch from gpt-4.1-mini to another model for better quality or lower cost. Extend Analysis Edit the JSON schema in the “Information Extractor” nodes to include: Sentiment analysis of top pages SERP volatility metrics Content freshness indicators Export Results Connect the output to: Google Sheets / Airtable for analytics Notion / Slack for team reporting Webhook / Database for automated storage Summary This workflow creates an AI-powered Competitor Intelligence System inside n8n by blending: Real-time SERP scraping (Thordata) Automated AI reasoning (OpenAI GPT-4.1-mini) Structured data extraction (LangChain Information Extractors)