n8n Workflow
Intermediate

G Suite Admin: Create, Update, and Get User

Automate Google Workspace user management with this n8n workflow. Learn how to create, update, and retrieve user information using the G Suite Admin node.

Overview

Demonstrates how to automate the user lifecycle in Google Workspace by creating, updating, and retrieving a user's details through n8n.

⚙️ Description & Use Case

This workflow demonstrates the fundamental user management operations—Create, Update, and Get—within Google Workspace (formerly G Suite) using the n8n G Suite Admin node. It provides a clear, step-by-step example of how to manage a user's lifecycle programmatically.

🔄 How It Works:

  1. Trigger

    • The workflow is initiated manually by clicking the 'execute' button.
  2. Create User

    • The first G Suite Admin node is configured with the Create operation. It creates a new user in your specified domain (n8n.io in this example) with a first name, last name, username, and password.
  3. Update User

    • The second G Suite Admin node uses the Update operation. It takes the unique id of the user created in the previous step and updates a specific field—in this case, changing the lastName from "Nat" to "Nate".
  4. Get User

    • The final G Suite Admin node performs a Get operation. Using the same user id, it retrieves the complete, updated user profile from Google Workspace, allowing you to verify that the changes were successful.

✅ Real-World Use Cases:

  • Automated Employee Onboarding: Trigger this workflow when a new employee is added to your HR system to automatically create their Google Workspace account.
  • User Profile Synchronization: Keep user details (like names, departments, or job titles) in Google Workspace synchronized with a master database or another application.
  • Bulk User Updates: Modify the workflow to loop through a list of users from a spreadsheet or API to perform bulk updates, such as assigning them to a new organizational unit.
  • Testing and Development: Quickly provision and modify test user accounts in a development environment without manual intervention in the Google Admin console.

Instructions

Basic steps

  1. Download workflow JSON
  2. Import into n8n
  3. Configure node parameters as needed
  4. Test and enable the workflow

💡 Tips

After importing, verify all connectors and credentials match your environment.

Preview

Workflow Visualization

4 nodes
100%
On clicking 'execute'manualTriggerG Suite AdmingSuiteAdminG Suite Admin1gSuiteAdminG Suite Admin2gSuiteAdmin

Nodes

1

On clicking 'execute'

manualTrigger

v1
2

G Suite Admin

gSuiteAdmin

v1
3

G Suite Admin1

gSuiteAdmin

v1
4

G Suite Admin2

gSuiteAdmin

v1

Statistics

Total nodes:4
Disabled nodes:0
Node types:2
Connections:3
View full JSON structure
{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        240,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "G Suite Admin",
      "type": "n8n-nodes-base.gSuiteAdmin",
      "position": [
        440,
        300
      ],
      "parameters": {
        "domain": "n8n.io",
        "lastName": "Nat",
        "password": "sjhdjsdhbajshdb",
        "username": "nat",
        "firstName": "Nathan",
        "additionalFields": {}
      },
      "credentials": {
        "gSuiteAdminOAuth2Api": "Google"
      },
      "typeVersion": 1
    },
    {
      "name": "G Suite Admin1",
      "type": "n8n-nodes-base.gSuiteAdmin",
      "position": [
        640,
        300
      ],
      "parameters": {
        "userId": "={{$node[\"G Suite Admin\"].json[\"id\"]}}",
        "operation": "update",
        "updateFields": {
          "lastName": "Nate"
        }
      },
      "credentials": {
        "gSuiteAdminOAuth2Api": "Google"
      },
      "typeVersion": 1
    },
    {
      "name": "G Suite Admin2",
      "type": "n8n-nodes-base.gSuiteAdmin",
      "position": [
        840,
        300
      ],
      "parameters": {
        "userId": "={{$node[\"G Suite Admin\"].json[\"id\"]}}",
        "options": {},
        "operation": "get"
      },
      "credentials": {
        "gSuiteAdminOAuth2Api": "Google"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "G Suite Admin": {
      "main": [
        [
          {
            "node": "G Suite Admin1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "G Suite Admin1": {
      "main": [
        [
          {
            "node": "G Suite Admin2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "G Suite Admin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Actions

Share
Categories:
Tags:
manualtriggergsuiteadmin

Technical Specs

Complexity:
Intermediate
Node Count:
4 nodes
Published:11 months ago
Updated:about 1 month ago

Compatibility

Platform:
N8N Cloud & Self-hosted
Min Version:
N8N v1.0.0+
Supports cloud and self-hosted deployment

License

This workflow template follows MIT license, you can freely use, modify and distribute.

Please comply with relevant third-party service terms when using.

Related Workflows