Update all Zammad Roles to default values

For Zammad, this automated workflow updates all user roles to default values, ensuring consistent access permissions across the platform. It retrieves user and role data, applies necessary filters, and generates an Excel report of the updated roles, streamlining user management and enhancing operational efficiency.

7/8/2025
10 nodes
Medium
manualmediumzammadconverttofilelogicconditionalapiintegrationfilesstorage
Categories:
Manual TriggeredMedium Workflow
Integrations:
ZammadConvertToFile

Target Audience

This workflow is designed for Zammad administrators and IT teams who manage user roles and permissions within the Zammad ticketing system. It is particularly useful for those who need to automate the process of updating user roles to match default settings, ensuring consistent permissions across the organization.

Problem Solved

The workflow addresses the challenge of manually updating user roles in Zammad, which can be time-consuming and prone to errors. By automating this process, it ensures that all users have the correct roles assigned, reducing the risk of permission issues and enhancing operational efficiency.

Workflow Steps

  • Manual Trigger: The workflow starts when the user clicks the ‘Test workflow’ button.
    2. Set Basic Variables: It initializes essential variables such as the Zammad base URL, API key, default roles, and user IDs to exclude from updates.
    3. Retrieve Users: The workflow fetches all users from Zammad, preparing to process each user individually.
    4. Conditional Check: For each user, it checks if they are active and not in the exclusion list before proceeding.
    5. Retrieve Roles: It collects all available roles from Zammad to determine which roles need to be assigned.
    6. Role Filtering: If necessary, it filters roles based on specific conditions before converting them to an Excel file.
    7. Update User Roles: The workflow updates each eligible user's roles to the predefined default roles using the Zammad API.
    8. Convert to Excel: Finally, it converts the list of roles into an Excel file for documentation or reporting purposes.
  • Customization Guide

    To customize this workflow, users can:
    - Change Zammad API Credentials: Replace the placeholder values for zammad_base_url and zammad_api_key with actual credentials.
    - Set Default Roles: Modify the default_roles array to include the IDs of the roles that should be assigned to users.
    - Exclude Specific Users: Update the exclude_zammad_users_by_id array to prevent certain users from having their roles changed.
    - Adjust Role Filtering: Modify the conditions in the 'Filter Roles if needed' node to define which roles should be included or excluded based on specific criteria.