Automate Personalized Email Campaigns with n8n, Twitter & LinkedIn

Manually checking social profiles and crafting emails wastes hours weekly. This n8n workflow fetches LinkedIn and Twitter posts, uses AI to generate tailored emails, and automatically sends them, saving time and boosting lead engagement.
googleSheetsTrigger
httpRequest
lmChatOpenAi
+8
Workflow Identifier: 1336
NODES in Use: Google Sheets Trigger, If, Set, HTTP Request, Code, OpenAI Chat Model, Structured Output Parser, LangChain Chain LLM, Email Send, Google Sheets, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow takes lead info from a Google Sheet and fetches their recent LinkedIn posts and tweets.
It then uses AI to find topics the leads care about and writes a custom email for each.
The workflow sends the email and marks the lead as done to avoid duplicates.
This saves many hours and makes outreach more personal and effective.


Tools and Services Used


How This Workflow Works: Inputs, Processing, and Output

Inputs

  • Lead data from Google Sheets: LinkedIn URL, Twitter handle, email, and status.

Processing Steps

  • Trigger runs when sheet shows new leads.
  • Filter out leads already marked as done.
  • Retrieve the user ID from Twitter using the handle via RapidAPI.
  • Get up to 10 recent tweets for each lead.
  • Fetch up to 10 LinkedIn posts for each lead.
  • Use code nodes to extract and limit tweets and LinkedIn posts.
  • Send this social data and company info to OpenAI GPT-4o chat model.
  • Generate a subject line and personalized HTML email body.
  • Send the created email to the lead with a CC to the user.
  • Update the lead row in Google Sheets to mark as done.

Output

  • Personalized outreach emails sent automatically.
  • Google Sheet rows updated to prevent repeat emailing.

Beginner Step-by-Step: How to Use This Workflow in Production

1. Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to use this.
  3. Use the Import from File option to load the workflow.

2. Configure Credentials and Settings

  1. Add API Keys: Google Sheets, RapidAPI, and OpenAI in the credential manager.
  2. Set your email SMTP details for the Email Send node.
  3. Update Google Sheet IDs, sheet names, email addresses, or any other IDs if you copied a sample.
  4. Copy and paste any prompt texts or code snippets from inside the workflow nodes if needed.

3. Test the Workflow

  1. Run a manual test using sample data in your Google Sheet.
  2. Verify if emails are sent and Sheets updated.

4. Activate for Production

  1. Turn on the Google Sheets Trigger node by activating the workflow.
  2. Keep monitoring in n8n for any errors or usage limits.

Use self-host n8n if planning to run this workflow on your own server for more control.


Customization Ideas


Troubleshooting Common Issues

  • No tweets found: Check Twitter handle accuracy and API quota on RapidAPI.
  • No LinkedIn posts: Verify full LinkedIn URL and RapidAPI credentials.
  • AI parsing errors: Refine JSON schema in parser node and adjust prompt.

Pre-Production Checklist

  • Confirm Google Sheets has valid data and “done” status column works correctly.
  • Test API keys and ensure correct scopes and call limits.
  • Run test leads through to check email delivery and sheet updates.
  • Backup the Google Sheet and exported workflow files.

Summary

✓ Saves 4-5 hours every week of manual social research.
✓ Sends personalized emails with relevant social media content.
✓ Updates lead status automatically to prevent repeats.
✓ Improves email response rates and sales pipeline quality.
→ You get an easy-to-use automation inside n8n.
→ You connect social profiles, AI, and email without coding.


Frequently Asked Questions

No, the workflow needs RapidAPI Fresh LinkedIn and Twitter APIs to fetch social posts.
Verify SMTP email settings and credentials in the Email Send node are correct.
The workflow marks leads as done in Google Sheets. Make sure the done column updates properly.
Yes, add HTTP Request nodes for other social APIs and update AI prompts accordingly.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free