Update Roles by Excel

For Zammad, this workflow automates the updating of user roles based on data extracted from an Excel file. By manually triggering the process, users can seamlessly download, merge, and update role information, ensuring accurate user management and streamlined operations.

7/4/2025
9 nodes
Medium
manualmediumextractfromfilesticky notefilesstorageapiintegration
Categories:
Manual TriggeredMedium Workflow
Integrations:
ExtractFromFileSticky Note

Target Audience

This workflow is ideal for:
- IT Administrators: Who manage user roles and permissions within Zammad.
- HR Managers: Who need to update user roles based on changing job functions.
- Data Analysts: Who extract and manipulate data from Excel files for user management.
- Developers: Who require automation in user role assignment through API integration.

Problem Solved

This workflow addresses the challenge of efficiently updating user roles in Zammad based on data extracted from an Excel file. It automates the process, reducing manual errors and saving time by integrating file extraction and API calls into a single workflow.

Workflow Steps

  • Manual Trigger: The workflow starts when the user clicks the 'Execute Workflow' button.
    2. Set Basic Variables: It initializes necessary variables, including the Zammad base URL and the source URL for the Excel file.
    3. Download Excel: The workflow downloads the Excel file containing user data from the specified URL.
    4. Extract from File: It extracts relevant data from the downloaded Excel file, specifically targeting user emails and role IDs.
    5. Create Zammad Universal User Object: A standardized object is created for each user, containing their email and role IDs.
    6. Find Zammad User by Email: The workflow queries the Zammad API to find existing users based on their email addresses.
    7. Merge Data: The extracted user data is merged with the user information retrieved from Zammad to prepare for updates.
    8. Update User Roles: For each user, the workflow sends a PUT request to the Zammad API to update their roles based on the merged data.
    9. Sticky Note: A note is included in the workflow to remind users about the authentication requirements for accessing the Zammad API.
  • Customization Guide

    To customize this workflow:
    - Update URLs: Modify the zammad_base_url and excel_source_url variables to point to your specific Zammad instance and the Excel file location.
    - Change Role Logic: Adjust the logic in the 'Zammad Universal User Object' node to fit your specific role assignment criteria.
    - Add Error Handling: Implement additional error handling in the 'Update User Roles' node to manage API response errors more effectively.
    - Enhance Data Extraction: If your Excel file structure changes, update the 'Extract from File' node settings to ensure the correct data is being extracted.