AI Template Search
N8N Bazar

Find n8n Templates with AI Search

Search thousands of workflows using natural language. Find exactly what you need, instantly.

Start Searching Free
Sep 10, 2025

Monitor LinkedIn Updates for HubSpot Clients with n8n

Monitor LinkedIn Updates for HubSpot Clients with n8n This guide teaches you how to build and understand an n8n workflow that: Monitors LinkedIn activity and job changes for HubSpot contacts Saves a baseline and updates in Google Sheets Sends alert emails via Gmail when something changes It is especially useful for sales and customer success […]

Monitor LinkedIn Updates for HubSpot Clients with n8n

Monitor LinkedIn Updates for HubSpot Clients with n8n

This guide teaches you how to build and understand an n8n workflow that:

  • Monitors LinkedIn activity and job changes for HubSpot contacts
  • Saves a baseline and updates in Google Sheets
  • Sends alert emails via Gmail when something changes

It is especially useful for sales and customer success teams that want automatic notifications when clients post on LinkedIn or change their job titles.


What you will learn

By the end of this tutorial, you will be able to:

  • Connect HubSpot, LinkedIn (via RapidAPI), Google Sheets, and Gmail in n8n
  • Fetch HubSpot owners and their contacts using pagination
  • Maintain a Google Sheets record of each contact’s LinkedIn URL, last post, and current position
  • Use RapidAPI to find LinkedIn profiles and pull profile data
  • Compare new LinkedIn data with stored data and detect changes
  • Send a digest email to each HubSpot owner summarizing updates
  • Scale the workflow safely and troubleshoot common issues

Why automate LinkedIn monitoring in n8n?

Checking LinkedIn manually for dozens or hundreds of clients is slow and unreliable. You might miss an important job change or a post that is a perfect trigger for outreach.

With an automated n8n workflow you can:

  • Track LinkedIn changes in near real time, without manual work
  • Give account owners timely signals to start conversations
  • Centralize data in Google Sheets for reporting and follow-up
  • Free up time for higher-value work instead of profile checking

In this setup, n8n acts as the automation hub that connects:

  • HubSpot for owners and contacts
  • LinkedIn via RapidAPI for profile search and data
  • Google Sheets for storing baseline and updates
  • Gmail for sending alert emails

Relevant keywords for this tutorial: n8n, HubSpot, LinkedIn, Google Sheets, RapidAPI, Gmail alerts, workflow automation.


Concept overview: how the workflow is structured

Before we dive into the steps, it helps to see the big picture. The workflow is organized into several logical stages:

  1. Get HubSpot owners
    Use the HubSpot Owners API to retrieve all owners who are responsible for contacts.
  2. Get contacts for each owner
    For each owner, use the HubSpot Contacts Search API with pagination to fetch their contacts.
  3. Sync contacts with Google Sheets
    Make sure every contact has a row in a Google Sheet and read any existing LinkedIn data.
  4. Find or confirm LinkedIn profile URLs
    Use RapidAPI to search for LinkedIn profiles or to enrich existing LinkedIn URLs.
  5. Retrieve LinkedIn posts and position details
    Call RapidAPI endpoints to get latest posts and current positions for each profile.
  6. Compare with stored data and update the sheet
    Detect changes in last post or job title, then update Google Sheets and flag changes.
  7. Send a Gmail digest per owner
    Aggregate all changes per owner and email them a summary of what changed for their contacts.

Next we will walk through each stage in a more instructional, step-by-step way.


Prerequisites and setup checklist

Before building the workflow in n8n, make sure you have:

  • An n8n instance (self-hosted or cloud)
  • Access to a HubSpot account with API access and OAuth scopes for owners and contacts
  • A Google account with access to Google Sheets
  • A Gmail account for sending alerts
  • A RapidAPI account and key for LinkedIn-related endpoints

In n8n you will create and configure the following credentials:

  • HubSpot OAuth2
  • Google Sheets OAuth2
  • Gmail OAuth2
  • RapidAPI (HTTP Header or similar)

Step 1 – Fetch HubSpot owners and their contacts

1.1 Get the list of HubSpot owners

Start with a HubSpot node that calls the endpoint /crm/v3/owners:

  • Set the resource to Owners
  • Use the Get All operation or a custom API call
  • Use your HubSpot OAuth2 credentials with the required scopes

This gives you a list of owners that you will loop through. Each owner will receive their own digest email at the end.

1.2 Retrieve contacts per owner with pagination

For each owner, you need to query their contacts. HubSpot search returns a limited number of records per page, so pagination is essential.

Use the HubSpot endpoint /crm/v3/objects/contacts/search with:

  • A filter on hubspot_owner_id to get only contacts for the current owner
  • A page size up to 200 items per page
  • The after parameter to handle pagination

In n8n this usually involves:

  • Storing an incremental counter, for example sofar, to track how many contacts you have processed
  • Looping while HubSpot returns more pages, updating the after parameter each time
  • Appending contacts from each page into an array that you will use later

Important tips for this step:

  • Make sure HubSpot OAuth2 has scopes for reading contacts and owners.
  • Add delay nodes if you have many owners or contacts, to avoid rate limit issues.
  • Test pagination with a small owner first to confirm your after and sofar logic is correct.

Step 2 – Prepare and use Google Sheets as your baseline

2.1 Create the Google Sheet structure

Create a Google Sheet that will store one row per HubSpot contact. At minimum include these columns:

  • email
  • linkedin_url
  • last post
  • current position
  • date (for when the last check or update happened)

This sheet will act as both baseline and history. It lets you compare what you saw last time with what you see now.

2.2 Configure Google Sheets in n8n

In n8n:

  • Set up Google Sheets OAuth2 credentials
  • Use a configuration or Set node to store the sheet URL, so it is easy to reuse

2.3 Ensure each contact has a row

For every HubSpot contact you retrieved:

  • Use a Google Sheets node with an appendOrUpdate style operation
  • Use the email column as the unique key

The goal is:

  • If a contact does not exist in the sheet, create a new row with at least their email
  • If a contact already exists, update the row instead of duplicating it

2.4 Read the existing row for comparison

Next, use a Google Sheets get rows or similar operation to:

  • Fetch the row for the current contact
  • Read the existing values for linkedin_url, last post, and current position

These values will be used later to detect changes in LinkedIn posts or job titles.


Step 3 – Find and validate LinkedIn profile URLs with RapidAPI

3.1 Configure RapidAPI credentials

In n8n, create a credential for RapidAPI that includes your API key, usually sent in an HTTP header such as X-RapidAPI-Key. Also set the correct host header for the LinkedIn API you are using.

Keep in mind:

  • RapidAPI often has rate limits, so you may need delay nodes between calls
  • API calls may incur costs depending on your RapidAPI plan

3.2 Strategy when no LinkedIn URL is stored

If the Google Sheet row does not have a linkedin_url, the workflow tries to find it using the contact’s details:

  • Search by first name, last name, and company using a LinkedIn search endpoint on RapidAPI
  • Parse the search results to find the most likely profile URL for that person

If a suitable URL is found, the workflow can write that linkedin_url back into the sheet so it is available for future runs.

3.3 Strategy when a LinkedIn URL already exists

If the row already contains a linkedin_url, the workflow:

  • Uses a RapidAPI endpoint that takes the profile URL as input
  • Retrieves detailed profile information and recent activity

If RapidAPI fails to find or resolve the profile, you can choose to:

  • Leave the existing row unchanged
  • Log the error for troubleshooting
  • Retry in a later run

Step 4 – Retrieve LinkedIn posts and position data

Once the profile is identified (either found via search or confirmed via URL), use the relevant RapidAPI LinkedIn endpoint to pull profile data.

The example workflow typically extracts:

  • The latest post text from the user’s recent LinkedIn posts
  • The current position title from the user’s profile positions

These two pieces of information are then compared to the values stored in Google Sheets:

  • last post column in the sheet
  • current position column in the sheet

You can also store additional fields if your RapidAPI response includes them, but the core logic focuses on post text and job title.


Step 5 – Compare LinkedIn data and update Google Sheets

5.1 Detect changes

For each contact, the workflow compares:

  • New latest post text vs. the last post stored in the sheet
  • New current position title vs. the current position stored in the sheet

If either value is different, the workflow:

  • Updates the corresponding columns in the Google Sheet
  • Updates the date column to indicate when the change was detected
  • Sets flags such as post_updated or position_updated for later use

5.2 Build a dataset for notifications

As the workflow processes contacts, it collects all updates in a single dataset keyed by email. This dataset includes:

  • Contact email
  • Whether a post changed, a position changed, or both
  • Possibly the new post text or new job title
  • The associated HubSpot owner

This aggregation is important so that each owner receives one digest email summarizing all changes for their contacts, instead of many small emails.


Step 6 – Generate digest and send Gmail notifications

6.1 Create a human-readable digest

Use a Code node in n8n to transform the collected update data into a readable summary. For example, the digest can include sections like:

  • Contacts with new LinkedIn posts listing email addresses and possibly excerpts
  • Contacts with job title changes listing old and new positions

The Code node loops through the aggregated dataset and builds a text or HTML string that will become the email body.

6.2 Send the email using Gmail

Next, add a Gmail node configured with OAuth2 credentials:

  • Set the recipient to the owner’s email address, which you can define in a Set node or map from HubSpot owner data
  • Use a clear subject line, for example “LinkedIn updates for your HubSpot contacts”
  • Use the digest text from the Code node as the email body

Before running this at scale, test with a small subset of contacts and one owner to confirm that:

  • The email content is correct
  • Only the relevant updates are listed
  • The formatting is readable

Scaling, reliability, and best practices

Run owners independently

For larger teams, it is often better to process owners in isolation:

  • Use n8n’s “each” execution mode or similar patterns to run one owner per execution
  • This prevents a single long-running workflow from blocking everything

Respect API rate limits

Both HubSpot and RapidAPI can enforce rate limits. To avoid problems:

  • Add Delay nodes between API calls when processing many contacts
  • Monitor execution times and API responses for rate-limit errors
  • Use n8n’s scheduling to spread calls over time if needed

Logging and error handling

To make the workflow easier to maintain:

  • Wrap sensitive sections in try/catch blocks inside Code nodes
  • Write error details to a separate Google Sheet or logging service
  • Include the contact email and owner in error logs for easier debugging

Security of credentials

Keep your credentials safe:

  • Always store API keys and OAuth tokens in n8n’s credential store
  • Do not hardcode secrets directly into nodes or Code nodes
  • Limit scopes for OAuth apps to only what is needed

Troubleshooting common issues

  • Empty RapidAPI search results
    Check that:
    • The RapidAPI host header is correct
    • You are passing the right query parameters, such as firstName, lastName, and company
    • Your RapidAPI key is valid and has quota
  • Pagination appears stuck
    Verify that:
    • You increment your after or sofar parameter correctly
    • You stop the pagination loop when there are no more results from HubSpot
    • You are not accidentally reusing the same page token
  • Authentication errors
    For HubSpot, Gmail, or Google Sheets:
    • Reauthorize the OAuth2 credentials in n8n
    • Check that the required scopes (contacts,

Leave a Reply

Your email address will not be published. Required fields are marked *

AI Workflow Builder
N8N Bazar

AI-Powered n8n Workflows

🔍 Search 1000s of Templates
✨ Generate with AI
🚀 Deploy Instantly
Try Free Now