Automate Adding/Removing a User to a Google Group via n8n

This guide shows how to use n8n with Siit so users are automatically added to Google Workspace groups via a webhook.

1. Prerequisites

  • An n8n instance (cloud or self-hosted)
  • A Google Workspace Admin account with API access
  • Header Auth credentials in n8n (for secure webhook calls)
  • Access to Siit workflows

2. Create Google Workspace Credentials

  1. Go to **Google Cloud Console → New Project**
    • Name it (e.g., n8n Google Integration).
  2. Enable APIs
    • Admin SDK API
    • (Optional) Groups Settings API
  3. OAuth Consent Screen
    • Type: Internal
    • Fill in name, support email, domain → Save
  4. Create OAuth Client ID
    • Type: Web application

    • Add redirect URI

      • Local: http://localhost:5678/rest/oauth2-credential/callback
      • Cloud: https://<your-n8n-domain>/rest/oauth2-credential/callback
        • you can find your <your-n8n-domain> in your N8N url

          Screenshot 2025-09-24 at 14.00.07

    • Copy Client ID and Client Secret

  5. In n8n
    • Go to Credentials → Google Workspace Admin OAuth2
    • Paste Client ID + Secret → complete OAuth flow

3. Import the Workflow

  1. In n8n: Create Workflow → ‘…’ → Import from file

Screenshot 2025-09-24 at 14.02.34

 2.    Import the JSON file:

    1. For adding a user to a group

      Google_workspace___add_user_to_a_group.json

    2. For removing a user from a group

      Google_workspace___remove_user_to_a_group.json


⚠️ Credentials are not included. You’ll link them in the next step.


4. Connect Credentials in n8n

  • Webhook node → attach your Header Auth

Credentials Siit N8N

  • Google nodes (List Groups, Add User to Group) → attach Google Workspace Admin OAuth2
    • You’ll find your client ID and Client secret in your google project you created at step 2

Screenshot 2025-09-24 at 14.45.28

5. Workflow Overview

Node Purpose Customization
Webhook (Siit) Receives requesterEmail, userToAdd, groupToAdd Decide who should get success/failure notifications (requester, app owner, etc.)
List groups Fetches all Google Groups Add filters if you want to limit scope or reduce load with many groups
Find group ID Matches groupToAdd with the correct group ID Adjust logic if your naming conventions differ
Add user to group Adds user to the selected Google Group Duplicate this step to add a user to multiple groups
Check success Confirms the operation worked Define what should happen on success or failure (e.g. send email, log, stop workflow)

6. Configure Webhook in Siit

  1. Create Webhook action in Siit
  2. Paste the Webhook URL from n8n (use the production URL)

Screenshot 2025-09-24 at 14.52.24

  3.    Add Authorization header with your token:

Authorization: Bearer <your-token>


  4.   Add JSON body:

{
"requesterEmail": "requester@example.com",
"userToAdd": "newuser@example.com",
"groupToAdd": "Engineering Team"
}



7. Test & Go Live

  1. Activate workflow in n8n
  2. Send test request from Siit
  3. Check execution log:
    • Groups listed
    • Correct group ID found
    • User added successfully
  4. ⚠️ Switch to production Webhook URL in Siit

8. Optional


✅ Done! Siit now adds users automatically to Google Groups through n8n.