← All N8N workflows
AI & researchAggregateChain LLMExecute WorkflowExecute Workflow TriggerGmail

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.

Workflow preview
MessagingGet Message ContentsGmailTransformSimplify EmailsEdit FieldsIntegrationCheck For UpcomingMeetingsGoogle CalendarAI & modelsOpenAI Chat Model2OpenAI Chat ModelAI & modelsExtract AttendeeInformationInformation ExtractorTriggerExecute WorkflowTriggerExecute Workflow TriggerAI & modelsOpenAI Chat ModelOpenAI Chat ModelMessagingGet Last CorrespondenceGmailAI & modelsOpenAI Chat Model1OpenAI Chat ModelAI & modelsOpenAI Chat Model3OpenAI Chat ModelMessagingWhatsApp Business CloudWhats AppTriggerSchedule TriggerSchedule TriggerTransformReturn LinkedIn SuccessEdit FieldsTransformReturn LinkedIn ErrorEdit FieldsTransformReturn Email ErrorEdit FieldsTransformReturn Email SuccessEdit FieldsTransformSet Route EmailEdit FieldsTransformSet Route LinkedinEdit FieldsRoutingRouterSwitchTransformReturn LinkedIn Error1Edit FieldsRoutingHas Emails?IfTransformReturn Email Error1Edit FieldsTransformSections To ListSplit OutTransformSet LinkedIn CookieEdit FieldsTransformAttendees to ListSplit OutTransformMerge Attendee withSummariesEdit FieldsRoutingHas Email Address?IfRoutingHas LinkedIn URL?IfSubworkflowGet CorrespondanceExecute WorkflowTransformMergeMergeTransformAggregate AttendeesAggregateTransformActivities To ArrayAggregateTransformExtract ProfileMetadataHtmlTransformActivities To ListSplit OutWeb / APIAPIFY Web ScraperHTTP RequestTransformGet Activity DetailsHtmlTransformGet SectionsHtmlTransformGet About SectionEdit FieldsTransformGet Activity SectionEdit FieldsTransformExtract ActivitiesHtmlTransformMerge1MergeRoutingIs Scrape Successful?IfTransformExtract AboutHtmlSubworkflowGet LinkedIn Profile &ActivityExecute WorkflowAI & modelsCorrespondance RecapAgentChain LLMAI & modelsAttendee Research AgentChain LLMAI & modelsLinkedIn SummarizerAgentChain LLM

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Get Message ContentsMessagingGmailget
Simplify EmailsTransformEdit FieldsSee node parameters
Check For Upcoming MeetingsIntegrationGoogle CalendargetAll
OpenAI Chat Model2AI & modelsOpenAI Chat ModelSee node parameters
Extract Attendee InformationAI & modelsInformation ExtractorSee node parameters
Execute Workflow TriggerTriggerExecute Workflow TriggerSee node parameters
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Get Last CorrespondenceMessagingGmailgetAll
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
OpenAI Chat Model3AI & modelsOpenAI Chat ModelSee node parameters
WhatsApp Business CloudMessagingWhats Appsend
Schedule TriggerTriggerSchedule TriggerSee node parameters
Return LinkedIn SuccessTransformEdit FieldsSee node parameters
Return LinkedIn ErrorTransformEdit FieldsSee node parameters
Return Email ErrorTransformEdit FieldsSee node parameters
Return Email SuccessTransformEdit FieldsSee node parameters
Set Route EmailTransformEdit FieldsSee node parameters
Set Route LinkedinTransformEdit FieldsSee node parameters
RouterRoutingSwitchSee node parameters
Return LinkedIn Error1TransformEdit FieldsSee node parameters
Has Emails?RoutingIfSee node parameters
Return Email Error1TransformEdit FieldsSee node parameters
Sections To ListTransformSplit OutSee node parameters
Set LinkedIn CookieTransformEdit FieldsSee node parameters
Attendees to ListTransformSplit OutSee node parameters
Merge Attendee with SummariesTransformEdit FieldsSee node parameters
Has Email Address?RoutingIfSee node parameters
Has LinkedIn URL?RoutingIfSee node parameters
Get CorrespondanceSubworkflowExecute WorkflowSee node parameters
MergeTransformMergeSee node parameters
Aggregate AttendeesTransformAggregateSee node parameters
Activities To ArrayTransformAggregateSee node parameters
Extract Profile MetadataTransformHtmlextractHtmlContent
Activities To ListTransformSplit OutSee node parameters
APIFY Web ScraperWeb / APIHTTP RequestSee node parameters
Get Activity DetailsTransformHtmlextractHtmlContent
Get SectionsTransformHtmlextractHtmlContent
Get About SectionTransformEdit FieldsSee node parameters
Get Activity SectionTransformEdit FieldsSee node parameters
Extract ActivitiesTransformHtmlextractHtmlContent
Merge1TransformMergeSee node parameters
Is Scrape Successful?RoutingIfSee node parameters
Extract AboutTransformHtmlextractHtmlContent
Get LinkedIn Profile & ActivitySubworkflowExecute WorkflowSee node parameters
Correspondance Recap AgentAI & modelsChain LLMSee node parameters
Attendee Research AgentAI & modelsChain LLMSee node parameters
LinkedIn Summarizer AgentAI & modelsChain LLMSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

  • gmailOAuth2
  • googleCalendarOAuth2Api
  • httpQueryAuth
  • openAiApi
  • whatsAppApi

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

Learn more about Gmail node

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.

More in AI & research