Back to Catalog

Generate personalized sales emails with LinkedIn data & Claude 3.7 via OpenRouter

Adam JanesAdam Janes
15414 views
2/3/2026
Official Page

How it works

  • The automation loads rows from a Google Sheet of leads that you want to contact.
  • It makes a Google search via Apify for LinkedIn links based on the First name / Last name / Company.
  • Another Apify actor fetches the right LinkedIn profile based on the first profile which is retuned
  • The same process is done for the company that the lead works for, giving extra context. If the lead has a current company listed on their LinkedIn, we use that URL to do the lookup, rather than doing a separate Google search.
  • A call is made to OpenRouter to get an LLM to generate an email based on a prompt designed to do personalized outreach.
  • An email is sent via a Gmail node.

Set up steps

  • Connect your Google Sheets + Gmail accounts to use these APIs.
  • Make an account with Apify and enter your credentials.
  • Set your details in the "Set My Data" node to customize the workflow to revolve around your company + value proposition.

I would recommend changing the prompt in the "Generate Personalized Email" node to match the tone of voice that you want your agent to have.

You can change the guidelines to e.g. change whether the agent introduces itself, and give more examples in the style you want to make the output better.

Generate Personalized Sales Emails with LinkedIn Data & Claude 3.7 via OpenRouter

This n8n workflow automates the process of generating highly personalized sales emails using prospect data from Google Sheets and leveraging the Claude 3.7 large language model via OpenRouter. It's designed to help sales teams create tailored outreach messages efficiently.

What it does

This workflow performs the following steps:

  1. Manual Trigger: The workflow is initiated manually, allowing for on-demand execution.
  2. Retrieve Prospect Data: It reads prospect information (e.g., Name, Company, LinkedIn URL) from a specified Google Sheet.
  3. Loop Over Items: Each row (prospect) from the Google Sheet is processed individually.
  4. Extract LinkedIn Profile: For each prospect, it makes an HTTP request to a LinkedIn profile scraping service (e.g., ProxyCrawl, Bright Data, or a custom scraper) to retrieve detailed public information.
  5. Filter for Valid Data: It checks if the LinkedIn scraping was successful and returned valid data. If not, the item is filtered out.
  6. Prepare Data for LLM: It processes the scraped LinkedIn data and prospect information, preparing it as a structured input for the language model.
  7. Generate Personalized Email Draft: It uses a "Basic LLM Chain" node with the "OpenRouter Chat Model" (configured for Claude 3.7) to generate a personalized sales email draft based on the prospect's data and LinkedIn profile.
  8. Parse LLM Output: A "Structured Output Parser" node extracts the generated email subject and body from the LLM's response.
  9. Aggregate Results: The generated email drafts (subject and body) are aggregated back with the original prospect data.
  10. Send Email (Optional): The workflow can be extended to automatically send the personalized email drafts using Gmail.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Google Sheets Account: To store your prospect data.
  • LinkedIn Scraping Service: An API key or access to a service that can scrape LinkedIn profiles (e.g., ProxyCrawl, Bright Data, or a self-hosted solution). The HTTP Request node needs to be configured with the appropriate endpoint and authentication.
  • OpenRouter Account & API Key: To access the Claude 3.7 language model.
  • Gmail Account (Optional): If you intend to send emails directly from the workflow.

Setup/Usage

  1. Import the Workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Google Sheets: Set up a Google Sheets credential to allow n8n to read your prospect data.
    • HTTP Request (LinkedIn Scraper): Configure the HTTP Request node with the URL and authentication details for your chosen LinkedIn scraping service.
    • OpenRouter Chat Model: Set up an OpenRouter credential with your API key.
    • Gmail (Optional): If using, configure a Gmail credential.
  3. Update Google Sheets Node:
    • In the "Google Sheets" node, specify the Spreadsheet ID and Sheet Name where your prospect data is located. Ensure your sheet has columns for at least "Name", "Company", and "LinkedIn URL".
  4. Review LLM Prompt:
    • Inspect the "Basic LLM Chain" node. The prompt is crucial for generating effective emails. Adjust it to fit your sales strategy and desired email tone.
  5. Test the Workflow: Run the workflow manually using the "When clicking ‘Execute workflow’" trigger to ensure all steps are configured correctly and data flows as expected.
  6. Review and Send Emails: The workflow will output the generated email subjects and bodies. You can then manually review these emails before sending them, or connect the "Gmail" node to automate sending.

Related Templates

Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API

Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use — Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen

RapiwaBy Rapiwa
183

Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack

📊 Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. 🚀📚💬 What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. 📦 Step 3: Logs release data into Google Sheets for record-keeping and analysis. 📊 Step 4: Retrieves FAQ or documentation data from Notion. 📚 Step 5: Merges GitHub and Notion data to calculate documentation drift. 🔍 Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. 🔔 Key Benefits ✅ Keeps SDK documentation aligned with product releases ✅ Prevents outdated information from reaching users ✅ Provides centralized release tracking in Google Sheets ✅ Sends real-time Slack alerts for overdue updates ✅ Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.

Rahul JoshiBy Rahul Joshi
31

Automate Gmail responses with GPT and human-in-the-loop verification

Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com

Nick CanfieldBy Nick Canfield
88