Before
An operator likely reviewed each user individually, looked up their information, and checked whether the relevant user conditions were satisfied. They then manually decided whether to grant or revoke roles, checked the operation status, and prepared a success or error response.
How it works
- Receive a webhook request and process each submitted user sequentially.
- Retrieve user information and validate the configured user-count and decision conditions.
- Grant or revoke the applicable roles, verify the result, and return a success or error response.
Workflow details
- Trigger and user processing: The workflow starts when a webhook receives input containing one or more users. It processes the users sequentially so each user can be evaluated and handled independently.
- User validation: For each user, the workflow retrieves user information and evaluates the configured conditions, including a check on the number of matching users. If the validation does not pass, the workflow follows an error path instead of changing the user's role.
- Role decision: When the required conditions are met, the workflow determines whether the requested outcome is to create or suspend access. The create path grants one or more roles, while the suspend path revokes one or more roles.
- Status handling: After a role grant or revocation, the workflow checks the operation status and separates successful operations from failures. Successful branches generate a success response, while failed checks or actions generate an error response.
- Operational result: The process delivers a clear response after handling the user records, making the role change outcome available without requiring an operator to perform each lookup, decision, and status check manually.
What changed
User role changes now follow an automated validation and decision path immediately after the webhook request is received. The workflow performs the lookup, condition checks, role grant or revocation, status verification, and response routing before handing the outcome back to the requester.
Work removed
Manually looking up each user, checking matching-user conditions, deciding whether to grant or revoke roles, performing the role change, checking its status, and composing the resulting success or error response.
Expected outcome
For each processed user, the workflow can remove at least one manual lookup and one manual role-change decision while consistently returning a success or error result.