[REWST - TASK] Approval: Require Pre-Process

This modular workflow functions as a critical approval gate by validating if the requesting user has pre-authorization, sending approval emails when needed, and updating PSA tickets throughout the approval lifecycle. MSPs will find this valuable for implementing governance in client onboarding, license provisioning, security changes, and access management scenarios where documented approval is required before execution. Technically, the workflow first checks if the requesting user is on an approved list, then either bypasses or initiates an email approval flow, updates the PSA ticket at each stage (request sent, approved, denied, timed out), and ultimately serves as a decision point that larger automation processes can branch from based on approval status.

This workflow contains 12 tasks.

Inputs

  • psa - string

    • Specify the PSA if an override needed, otherwise we will default to the ORG Var within the automation.

  • workflow_name - string (Required)

    • Specifies the workflow name that the approval process kicks off for

  • existing_ticket - string (Required)

    • Specify the existing ticket id in order to update an existing ticket. If none specified, we will create a new ticket.

  • approval_email_list - array (Required)

    • List of users that are able to give authorisation

    • Default: {{ [ ] }}

  • user_running_automation - string (Required)

    • Specify the user running the automation

    • Default: {{ CTX.user.username | d }}

Outputs

  • automation_log: Standardized Rewst automation log

  • is_approved: Boolean; States if workflow was successful.

Key tasks

  • new_user_approval_email: Core integration: Confirmation Email

  • update_psa_ticket_approval_timeout: Data modification

  • update_psa_ticket_no_emails: Data modification

  • check_running_user_vs_approval_list: Validation/verification

  • validate_email_approval_list: Validation/verification

Jinja examples

Example 1

{{ CTX.approval_email_list|join(',') }}

Used in input parameter 'to'

Example 2

{{ CTX.workflow_name }}

Used in input parameter 'title'

Last updated

Was this helpful?