3.2: Fetch Last Email Correspondance
Configured with Aggregate, Chain LLM, Execute Workflow, Execute Workflow Trigger, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Messaging
- Transform
- Integration
- AI & models
- Trigger
- Routing
- Subworkflow
- Web / API
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Get Message Contents | Messaging | Gmail | get |
| Simplify Emails | Transform | Edit Fields | See node parameters |
| Check For Upcoming Meetings | Integration | Google Calendar | getAll |
| OpenAI Chat Model2 | AI & models | OpenAI Chat Model | See node parameters |
| Extract Attendee Information | AI & models | Information Extractor | See node parameters |
| Execute Workflow Trigger | Trigger | Execute Workflow Trigger | See node parameters |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| Get Last Correspondence | Messaging | Gmail | getAll |
| OpenAI Chat Model1 | AI & models | OpenAI Chat Model | See node parameters |
| OpenAI Chat Model3 | AI & models | OpenAI Chat Model | See node parameters |
| WhatsApp Business Cloud | Messaging | Whats App | send |
| Schedule Trigger | Trigger | Schedule Trigger | See node parameters |
| Return LinkedIn Success | Transform | Edit Fields | See node parameters |
| Return LinkedIn Error | Transform | Edit Fields | See node parameters |
| Return Email Error | Transform | Edit Fields | See node parameters |
| Return Email Success | Transform | Edit Fields | See node parameters |
| Set Route Email | Transform | Edit Fields | See node parameters |
| Set Route Linkedin | Transform | Edit Fields | See node parameters |
| Router | Routing | Switch | See node parameters |
| Return LinkedIn Error1 | Transform | Edit Fields | See node parameters |
| Has Emails? | Routing | If | See node parameters |
| Return Email Error1 | Transform | Edit Fields | See node parameters |
| Sections To List | Transform | Split Out | See node parameters |
| Set LinkedIn Cookie | Transform | Edit Fields | See node parameters |
| Attendees to List | Transform | Split Out | See node parameters |
| Merge Attendee with Summaries | Transform | Edit Fields | See node parameters |
| Has Email Address? | Routing | If | See node parameters |
| Has LinkedIn URL? | Routing | If | See node parameters |
| Get Correspondance | Subworkflow | Execute Workflow | See node parameters |
| Merge | Transform | Merge | See node parameters |
| Aggregate Attendees | Transform | Aggregate | See node parameters |
| Activities To Array | Transform | Aggregate | See node parameters |
| Extract Profile Metadata | Transform | Html | extractHtmlContent |
| Activities To List | Transform | Split Out | See node parameters |
| APIFY Web Scraper | Web / API | HTTP Request | See node parameters |
| Get Activity Details | Transform | Html | extractHtmlContent |
| Get Sections | Transform | Html | extractHtmlContent |
| Get About Section | Transform | Edit Fields | See node parameters |
| Get Activity Section | Transform | Edit Fields | See node parameters |
| Extract Activities | Transform | Html | extractHtmlContent |
| Merge1 | Transform | Merge | See node parameters |
| Is Scrape Successful? | Routing | If | See node parameters |
| Extract About | Transform | Html | extractHtmlContent |
| Get LinkedIn Profile & Activity | Subworkflow | Execute Workflow | See node parameters |
| Correspondance Recap Agent | AI & models | Chain LLM | See node parameters |
| Attendee Research Agent | AI & models | Chain LLM | See node parameters |
| LinkedIn Summarizer Agent | AI & models | Chain LLM | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
gmailOAuth2googleCalendarOAuth2ApihttpQueryAuthopenAiApiwhatsAppApi
Workflow notes
1. Periodically Search For Upcoming Meetings
1. Periodically Search For Upcoming Meetings
Read about the Scheduled Trigger
Let's use the Scheduled Trigger node to trigger our Assistant to notify about upcoming meetings. Here, we'll set it for 1 hour intervals to check for meetings scheduled in our Google Calendar. You may need to play with the intervals and frequency depending on how many meetings you typically have.
2. Extract Attendee Details From Invite
2. Extract Attendee Details From Invite
Learn more about the Information Extractor node
Once we have our upcoming meeting, it'll be nice to prepare for it by reminding the user what the meeting is about and some context with the attendees. This will be the goal this template and of our assistant! However, first we'll need to extract some contact information of the attendees to do so.
For this demonstration, we'll assume that attendee's email and LinkedIn profile URLs are included in the meeting invite. We'll extract this information for each attendee using the Information Extractor node. This convenient node uses AI to parse and extract which saves us from writing complex pattern matching code otherwise.
In your own scenario, feel free to use your CRM to get this information instead.
3. Fetch Recent Correspondance & LinkedIn Activity
3. Fetch Recent Correspondance & LinkedIn Activity
Learn more about the Execute Workflow node
As both email fetching and LinkedIn scraping actions are quite complex, we'll split them out as subworkflow executions. Doing so (in my honest opinion), helps with development and maintainability of the template. Here, we'll make perform the research for all applicable attendees by making 2 calls to the subworkflow and merging them back into a single node at the end.
Head over to the subworkflow (see below - step 3a) to see how we pull the summaries from Gmail and LinkedIn.
4. Generate Pre-Meeting Notification
4. Generate Pre-Meeting Notification
Read more about the Basic LLM node
Now that we have (1) our upcoming meeting details and (2) recent email and/or Linkedin summaries about our attendee, let's feed them into our LLM node to generate the best pre-meeting notification ever seen! Of course, we'll need to keep it short as we intend to send this notification via WhatsApp message but should you choose to use another channel such as email, feel free to adjust the length of the message which suits.
5. Send Notification via WhatsApp
5. Send Notification via WhatsApp
Learn more about the WhatsApp node
The WhatsApp node is a super convenient way to send messages to WhatsApp which is one of the many messaging apps supported by n8n out of the box. Not using WhatsApp? Simply swap this our for Twilio, Telegram, Slack and others.
3.2: Fetch Last Email Correspondance
3.2: Fetch Last Email Correspondance
Fetching our attendee's last email will definitely help the user "pick up" from when they last last off. To do this, we'll assume a Gmail user and use the Gmail node to filter messages by the attendee's email address.
3.4 Scraping LinkedIn With [Apify.com](https://www.apify.com?fpr=414q6)
3.4 Scraping LinkedIn With Apify.com
Learn more about Apify.com for Web Scraping
To get the attendee's recent LinkedIn activity, we'll need a webscraper capable of rendering the user's LinkedIn profile. We'll use Apify.com which is a commercial web scraping service but has a very generous monthly free tier ($5/mo).
While Apify offers a number of dedicated LinkedIn scrapers, we'll build our own which works by impersonating our own LinkedIn account using our login cookie - this can be obtained by inspecting network requests when logged into Linkedin. Add your LinkedIn Cookie to the node below!
3.1 Attendee Researcher SubWorkflow
3.1 Attendee Researcher SubWorkflow
Learn more about using Execute Workflow Trigger
The Attendee Researcher SubWorkflow's aims to collect and summarize both an attendee's last correspondance with the user (if applicable) and the attendee's LinkedIn profile (if available). It uses the router pattern to handle both branches allowing for shorter execution chains. Using the Switch node, this subworkflow is either triggered to fetch emails or scrape LinkedIn but never both simultaneously.
3.5: Extract LinkedIn Profile & Recent Activity
3.5: Extract LinkedIn Profile & Recent Activity
Learn more about the HTML node
Once we have our scraped LinkedIn profile, it's just a simple case of parsing and extracting the relevant sections from the page. For the purpose of our workflow, we'll only need the "About" and "Activity" sections which we'll pull out of the page using a series of HTML nodes. Feel free to extract other sections to suit your needs! Once extracted, we'll combine the about and activities data in preparation of sending it to our LLM.
Be aware of LinkedIn T&Cs!
Be aware of LinkedIn T&Cs!
For production, you may want to consider not using your main Linkedin account if you can help it!
🚨 Input Required!
🚨 Input Required!
You need to add your cuurent linkedIn Cookies here to continue.
3.6 Summarize LinkedIn For Attendee
3.6 Summarize LinkedIn For Attendee
Read more about the Basic LLM node
Finally, we'll use the Basic LLM node to summarize our attendee's LinkedIn profile and recent activity. Our goal here is to identify and send back interesting tidbits of information which may be relevant to the meeting as well as inform the user. Should you require different criteria, simply edit the summarizer to get the response you need.
3.3: Summarize Correspondance For Attendee
3.3: Summarize Correspondance For Attendee
Read more about the Basic LLM node
Next, we'll generate a shorter version of the email(s) using the Basic LLM node - useful if the email was part of a large chain. The goal here is, if applicable, to remind the user of the conversion with this attendee and highlight any expectations which might be set before going into the meeting.
Try It Out!
Try It Out!
This workflow builds an AI meeting assistant who sends information-dense pre-meeting notifications for a user's upcoming meetings. This template is ideal for busy professional who is constantly on the move and wants to save time and make an impression.
How It Works
- A scheduled trigger fires hourly and checks for upcoming meetings within the hour.
- When found, a search for last correspondence and LinkedIn profile + recent activity is performed for each attendee.
- Using both available correspondance and/or Linkedin profile, an AI/LLM is used to summarize this information and generate a short notification message which should help the user prepare for the meeting.
- The notification is finally sent to the user's WhatsApp.
Need Help?
Join the Discord or ask in the Forum!
Happy Hacking!
3.2: Fetch Last Email Correspondance
3.2: Fetch Last Email Correspondance
Purpose and structure
This folder contains the 3.2: Fetch Last Email Correspondance workflow. Its executable nodes use aggregate, chainLlm, executeWorkflow, executeWorkflowTrigger, gmail, googleCalendar, html, httpRequest, if, informationExtractor, lmChatOpenAi, merge, scheduleTrigger, set, splitOut, switch, whatsApp. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Execute Workflow Trigger, Schedule Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/0649_Splitout_GoogleCalendar_Create_Webhook.json MIT; preserve source notices.