Automate Sales Meeting Prep with AI & APIFY Sent To WhatsApp n8n Workflow Template

n8n workflow template · 47 nodes · Gmail

Automate Sales Meeting Prep with AI & APIFY Sent To WhatsApp is a free n8n workflow template that runs when another workflow calls it and works with Gmail, Google Calendar, OpenAI and WhatsApp Business Cloud. It has 47 nodes, 8 of them AI nodes (OpenAI Chat Model, Information Extractor and Basic LLM Chain). The notes inside the workflow say: “Join the Discord or ask in the Forum!” To run it, you add your own credentials for Gmail OAuth2, Google Calendar OAuth2, HTTP Query Auth, OpenAI API and WhatsApp Business Cloud API.

At a glance

Trigger
Execute Workflow Trigger (Execute Workflow Trigger)
Nodes
47
Apps
Gmail, Google Calendar, OpenAI and WhatsApp Business Cloud
AI nodes
8
Credentials
5 types
Category
Chatbots and messaging

Apps and integrations

  • Gmail
  • Google Calendar
  • OpenAI
  • WhatsApp Business Cloud

Node types used

  • Gmail
  • Edit Fields (Set)
  • Google Calendar
  • OpenAI Chat Model
  • Information Extractor
  • Execute Workflow Trigger
  • WhatsApp Business Cloud
  • Schedule Trigger
  • Switch
  • If
  • Split Out
  • Execute Workflow
  • Merge
  • Aggregate
  • HTML
  • HTTP Request
  • Basic LLM Chain

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.

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!

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

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.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.

Be aware of LinkedIn T&Cs!

For production, you may want to consider not using your main Linkedin account if you can help it!

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.

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.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.

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.

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.

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.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.

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.

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!

Input Required!

You need to add your cuurent linkedIn Cookies here to continue.

Nodes in this workflow

The 47 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Get Message Contents (Gmail)
  2. Simplify Emails (Edit Fields (Set))
  3. Check For Upcoming Meetings (Google Calendar)
  4. OpenAI Chat Model2 (OpenAI Chat Model)
  5. Extract Attendee Information (Information Extractor)
  6. Execute Workflow Trigger (Execute Workflow Trigger)
  7. OpenAI Chat Model (OpenAI Chat Model)
  8. Get Last Correspondence (Gmail)
  9. OpenAI Chat Model1 (OpenAI Chat Model)
  10. OpenAI Chat Model3 (OpenAI Chat Model)
  11. WhatsApp Business Cloud (WhatsApp Business Cloud)
  12. Schedule Trigger (Schedule Trigger)
  13. Return LinkedIn Success (Edit Fields (Set))
  14. Return LinkedIn Error (Edit Fields (Set))
  15. Return Email Error (Edit Fields (Set))
  16. Return Email Success (Edit Fields (Set))
  17. Set Route Email (Edit Fields (Set))
  18. Set Route Linkedin (Edit Fields (Set))
  19. Router (Switch)
  20. Return LinkedIn Error1 (Edit Fields (Set))
  21. Has Emails? (If)
  22. Return Email Error1 (Edit Fields (Set))
  23. Sections To List (Split Out)
  24. Set LinkedIn Cookie (Edit Fields (Set))
  25. Attendees to List (Split Out)
  26. Merge Attendee with Summaries (Edit Fields (Set))
  27. Has Email Address? (If)
  28. Has LinkedIn URL? (If)
  29. Get Correspondance (Execute Workflow)
  30. Merge (Merge)
  31. Aggregate Attendees (Aggregate)
  32. Activities To Array (Aggregate)
  33. Extract Profile Metadata (HTML)
  34. Activities To List (Split Out)
  35. APIFY Web Scraper (HTTP Request)
  36. Get Activity Details (HTML)
  37. Get Sections (HTML)
  38. Get About Section (Edit Fields (Set))
  39. Get Activity Section (Edit Fields (Set))
  40. Extract Activities (HTML)
  41. Merge1 (Merge)
  42. Is Scrape Successful? (If)
  43. Extract About (HTML)
  44. Get LinkedIn Profile & Activity (Execute Workflow)
  45. Correspondance Recap Agent (Basic LLM Chain)
  46. Attendee Research Agent (Basic LLM Chain)
  47. LinkedIn Summarizer Agent (Basic LLM Chain)

Credentials you need

  • Gmail OAuth2 – used by Get Last Correspondence and Get Message Contents
  • Google Calendar OAuth2 – used by Check For Upcoming Meetings
  • HTTP Query Auth – used by APIFY Web Scraper
  • OpenAI API – used by OpenAI Chat Model, OpenAI Chat Model1, OpenAI Chat Model2 and OpenAI Chat Model3
  • WhatsApp Business Cloud API – used by WhatsApp Business Cloud

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. 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.
  3. Open each node that shows a warning and select or create its credential.
  4. 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.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us