Automated User Invitation Synchronization from Google Sheets - n8n Workflow

Use this powerful n8n workflow to automatically invite new users to your n8n instance based on an external list in Google Sheets. Compare existing users and automate onboarding.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

n8n Instance Administrators managing user access.
Teams needing to synchronize user onboarding from external registration forms (like Google Forms).
Users looking for advanced n8n templates that utilize internal API calls and complex merge logic.
Automation engineers seeking a reliable n8n node structure for periodic data reconciliation.

Overview

Managing user access manually can be time-consuming, especially when lists originate from external sources like Google Sheets. This robust n8n workflow solves this problem by providing a synchronization layer. It automates the entire process: fetching the target list from Google Sheets, cross-referencing it with all current n8n users, and issuing invitations only to those who are missing. This specific n8n workflow leverages internal n8n API calls, demonstrating an efficient, self-managing system. By using the Merge n8n node with a keepNonMatches approach, we ensure that the n8n instance only sends invitations to truly new users, preventing duplicate work and ensuring clean data integrity. This n8n template can run on a schedule, providing continuous synchronization.

How it Works

This automation begins either manually via the 'When clicking ‘Test workflow’ n8n trigger or automatically using the 'Schedule Trigger' n8n trigger.


  1. Initialization: The 'Edit Fields' n8n node sets the critical n8n_url variable, which must point to your specific n8n instance API endpoint (/api/v1/users).

  2. Data Retrieval: The workflow simultaneously executes two critical retrieval steps:

The 'Get all rows' n8n node fetches the list of potential users from the configured Google Sheet.
The 'Get all Users' n8n node performs a paginated HTTP Request to your n8n instance’s API to retrieve a list of all current users.

  1. Data Consolidation: The 'Combine all paginated results' n8n code node takes the multiple pages of user data returned by the API and flattens them into a single, comprehensive list of existing users.

  2. Reconciliation: The core comparison happens at the 'Get non-users' n8n node (a Merge node). It compares the 'Email Address' column from the Google Sheet against the 'email' field of the existing n8n users. The node is configured to 'keep non-matches,' outputting only the records from the Google Sheet that are not currently users.

  3. Payload Preparation: The 'Create users list' n8n node structures the filtered data into the required JSON format for the API call (setting the email and defining the role, typically 'global:member').

  4. Invitation Execution: Finally, the 'Invite Users' n8n node sends a POST request to the n8n API, using the prepared list to create the new users, thereby triggering the automatic invitation email process. This entire process is orchestrated through this powerful n8n workflow.

Installation Guide

To deploy this n8n template successfully, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' menu -> 'Import from JSON'.

  2. Google Sheets Credentials: Create or select an existing Google Sheets OAuth2 API credential. Ensure the account has read access to the target spreadsheet specified in the 'Get all rows' n8n node.

  3. n8n API Credentials: Create a dedicated n8n API key credential.

  4. Configure API Endpoint: Open the 'Edit Fields' n8n node. Crucially, update the n8n_url value to your specific n8n instance URL (e.g., https://your.n8n.cloud/api/v1/users).

  5. Test and Activate: Run the n8n workflow once using the 'When clicking ‘Test workflow’ n8n trigger to verify the connection and logic before activating the 'Schedule Trigger' n8n node for production use.

Node Details

Schedule Trigger / Manual Trigger: These n8n trigger nodes initiate the synchronization. The Schedule Trigger allows the n8n workflow to run automatically at defined intervals.
Edit Fields (Set n8n node): Stores the necessary base URL for the n8n API calls. This is a required configuration step.
Get all rows (Google Sheets n8n node): Connects to the specified Google Sheets Document ID and Sheet Name to extract the list of target users. Key Configuration: Targets a specific Document ID and Sheet Name.
Get all Users (HTTP Request n8n node): Calls the internal n8n API to retrieve existing users. Key Configuration: Uses advanced pagination logic to handle large user bases and the internal n8nApi credential.
Combine all paginated results (Code n8n node): Custom JavaScript used to aggregate results from the paginated 'Get all Users' n8n node into a single array for easier processing.
Get non-users (Merge n8n node): The core filtering n8n node. It compares Input 1 (Sheets) against Input 2 (Existing Users) using the keepNonMatches join mode based on the email fields. This guarantees only new users proceed through the n8n workflow.
Create users list (Set n8n node): Maps the filtered Google Sheet data ('Email Address') to the required n8n API fields ('email' and 'role').
Invite Users (HTTP Request n8n node): Performs the final POST request to the n8n API endpoint (/api/v1/users) to create the new users and send out the invitation emails. This final step completes the automated n8n workflow.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Automation specialist with 10+ years of experience helping SME website owners streamline their workflows—specializing in Squarespace, Shopify, and WordPress. Book an initial consultation for custom n8n automation using my link.

Featured*