At a glance
- Trigger
- Google Sheets Trigger (Google Sheets Trigger)
- Nodes
- 13
- Apps
- OpenAI, Email (SMTP) and Google Sheets
- AI nodes
- 3
- Credentials
- 5 types
- Category
- Email automation
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Personalize here
Set
- your name
- your company name
- your company activity, used to find a match with your leads
- your email, used as the sender
Here you can modify the prompt
- make it better by adding some examples
- Follow a known framework
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Social Media Analysis and Automated Email Generation
> by Thomas Vie
Who is this for?
This template is ideal for marketers, lead generation specialists, and business professionals seeking to analyze social media profiles of potential leads and automate personalized email outreach efficiently.
What problem is this workflow solving?
Manually analyzing social media profiles and crafting personalized emails can be time-consuming and prone to errors. This workflow streamlines the process by integrating social media APIs with AI to generate tailored communication, saving time and increasing outreach effectiveness.
What this workflow does
- Google Sheets Integration: Start with a Google Sheet containing lead information such as LinkedIn URL, Twitter handle, name, and email.
- Social Media Data Extraction: Automatically fetch profile and activity data from Twitter and LinkedIn using RapidAPI integrations.
- AI-Powered Content Generation: Use OpenAI's Chat Model to analyze the extracted data and generate personalized email subject lines and cover letters.
- Automated Email Dispatch: Send the generated email directly to the lead, with a copy sent to yourself for tracking purposes.
- Progress Tracking: Update the Google Sheet to indicate completed actions.
Setup
- Google Sheets
- Create a sheet with the columns: LinkedIn URL, name, Twitter handle, email, and a "done" column for tracking.
- Populate the sheet with your leads.
- RapidAPI Accounts
- Sign up for RapidAPI and subscribe to the Twitter and LinkedIn API plans.
- Configure API authentication keys in the workflow.
- AI Configuration
- Connect OpenAI Chat Model with your API key for text generation.
- Email Integration
- Add your email credentials or service (SMTP or third-party service like Gmail) for sending automated emails.
How to customize this workflow to your needs
- Modify the AI Prompt: Adapt the prompt in the AI node to better align with your tone, style, or specific messaging framework.
- Expand Data Fields: Add additional data fields in Google Sheets if you require further personalization.
- API Limits: Adjust API configurations to fit your usage limits or upgrade to higher tiers for increased data scraping capabilities.
- Personalize Email Templates: Tweak email formats to suit different audiences or use cases.
- Extend Functionality: Integrate additional social media platforms or CRM tools as needed.
By implementing this workflow, you’ll save time on repetitive tasks and create more effective lead generation strategies.
Create a Gooogle sheet with the following columns
- linkedin_url
- twitter_handler
And put some data in it except in "done" that should remain empty.
Call RapidAPI Twitter API Profile Data
You have to create an account in RapidAPI and subscribe to Twiiter API. With a free account you will be able to scrape 500 tweets / month. After your subscription you will have to choose as Generic Auth Type: Header Auth and then put as header name: "x-rapidapi-key" and the value given in the RapidAPI interface
Call RapidAPI Fresh Linkedin Profile Data
You have to create an account in RapidAPI and subscribe to Fresh LinkedIn Profile Data. With a free account you will be able to scrape 100 profile / month. After your subscription you will have to choose as Generic Auth Type: Header Auth and then put as header name: "x-rapidapi-key" and the value given in the RapidAPI interface
Nodes in this workflow
The 13 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- Set your company's variables (Edit Fields (Set))
- Get linkedin Posts (HTTP Request)
- Get twitter ID (HTTP Request)
- Get tweets (HTTP Request)
- Extract and limit Linkedin (Code)
- Exract and limit X (Code)
- OpenAI Chat Model (OpenAI Chat Model)
- Structured Output Parser (Structured Output Parser)
- Generate Subject and cover letter based on match (Basic LLM Chain)
- Send Cover letter and CC me (Send Email)
- Google Sheets Trigger (Google Sheets Trigger)
- Google Sheets (Google Sheets)
- If (If)
Credentials you need
- Google Sheets OAuth2 – used by Google Sheets
- Google Sheets Trigger OAuth2 – used by Google Sheets Trigger
- HTTP Header Auth – used by Get linkedin Posts, Get tweets and Get twitter ID
- OpenAI API – used by OpenAI Chat Model
- SMTP – used by Send Cover letter and CC me
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.