Zammad User Role Synchronization via Excel - n8n Workflow

Use this powerful n8n workflow to automatically synchronize Zammad user roles and permissions by extracting user data from an external Excel (.xlsx) file using the dedicated n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • System Administrators and IT staff who manage large user bases in Zammad.

  • DevOps or Operations teams needing to automate user provisioning and role updates.

  • Users searching for practical n8n templates for scheduled data syncs.

  • Technical writers documenting specific HTTP Request usage within an n8n workflow.

Overview

Managing user roles across dozens or hundreds of users can be a time-consuming administrative burden. This specialized n8n workflow provides a solution by automating the entire role update process. It solves the critical problem of keeping your Zammad user roles in sync with an external source of truth (like an Excel spreadsheet). By leveraging key n8n node types—specifically HTTP Request and data transformation utilities—this n8n workflow ensures that user emails are matched against existing Zammad accounts and the corresponding role IDs are updated securely via the Zammad API. This n8n automation is an excellent example of using core flow control for mission-critical administrative tasks.

How it Works

This automation is initiated by a manual n8n trigger, making it ideal for scheduled administrative runs.


  1. Setup Variables: The flow first uses an n8n node to define basic variables, including the zammadbaseurl and the excelsourceurl (the location of the user data file).

  2. Download and Extract Data: An HTTP Request n8n node downloads the file specified by the URL. The data is then processed by the 'Extract from File' n8n node, which interprets the Excel (.xlsx) data rows.

  3. Standardize Data: The data is formatted using another n8n node, creating a standardized object with the user's email and the new roleids (expected to be an array of Zammad Role IDs).

  4. Find Existing User: For each user record extracted, a dedicated HTTP Request n8n node searches the Zammad API by email to retrieve the corresponding Zammad user object, which contains the essential Zammad internal id.

  5. Merge Data: The core 'Merge' n8n node combines the original Excel role data (from Step 3) with the Zammad User ID (from Step 4) based on the matching email field.

  6. Update Roles: A final HTTP Request n8n node performs a PUT request to the Zammad API endpoint for the specific user ID, sending the new roleids payload. This completes the synchronization using this highly effective n8n workflow.

Installation Guide

To install and utilize this n8n workflow template, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON structure and paste it into your n8n instance via the 'Import from JSON' option.

  2. Review Initial Variables: Open the 'Basic Variables' n8n node and update the zammadbaseurl to your active Zammad instance and verify the excelsourceurl points to the exact location of your user data file.

  3. Configure Zammad Authentication: Two critical HTTP Request n8n nodes ('Find Zammad User by email' and 'Update User Roles') require authentication. Following the instructions in the Sticky Note, configure a Generic Credential Type (HTTP Header Auth).

Credential Name: Use an appropriate name (e.g., Zammad API Token).
Header Name: Set to Authorization.
* Header Value: Set to Bearer YOURAPITOKEN (replace YOURAPITOKEN with a valid, privileged Zammad API token).

  1. File Format: Ensure your source file is an Excel spreadsheet containing columns mapped correctly to the required fields (email and role_ids).

  2. Execution: Use the 'Execute Workflow' button on the manual n8n trigger to run the process.

Node Details

When clicking "Execute Workflow" (Manual Trigger): The starting n8n trigger for the flow, designed for manual runs rather than external hooks.
Basic Variables (Set): Defines flow constants like zammadbaseurl and excelsourceurl. This makes the n8n workflow easily portable.
Download Excel (HTTP Request): Downloads the user data file from the specified URL. Key configuration: sets the response format to file.
Extract from File (Extract from File): This specialized n8n node parses the downloaded binary data, expecting an xlsx (Excel) file format, extracting rows into structured JSON items.
Zammad Universal User Object (Set): Maps the extracted Excel columns to standardized keys (email, roleids), preparing the data for Zammad API consumption. Uses n8n expressions like {{ $json.email }}.
Find Zammad User by email (HTTP Request): Performs a GET request to Zammad's search API using the email as the query parameter. Requires Bearer Token Authentication.
Merge (Merge): A crucial core logic n8n node that combines the role data (input 1) with the Zammad user ID found (input 0), matching records based on the email field.
Update User Roles (HTTP Request): Executes the final PUT request to update the user's roles (/api/v1/users/{{ $json.id }}). Key configuration: Sends a JSON body containing the array of role
ids and utilizes the Zammad Bearer token credential.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Sirhexalot
Sirhexalot

Open source enthusiast and Zammad user with a passion for sharing knowledge and building simple, effective automation solutions with n8n.

Featured*