Table of contents
When a chatbot needs permission to perform a particular task, it sends an Approval request to the concerned Manager. You can create App Workflows with Approvals to make it easier for configuring your chatbots as you can simply call the Approval Workflow in a dialog.
- Select the Automation tab from the left navigation menu and click Approvals.
- Click on the Create One button on the page to create a new Workflow.

- Enter the desired Workflow Name and an optional Workflow Description
- When you’re done, click Create.

The Workflow Builder page will be opened with a few functions for you to start building an approval workflow.
- Select the Add Approval function from the list.

- Fill in the details in the Approval pop-up.

Let us see the configuration for different Approval Type:
Start and wait for approval
This will start the approval execution and wait till it receives the approval response from the assignee.
Approval Inputs:
- Requester name (Name of the requester)
- Requester email (Email of the requester)
- Assigned to (Approver Email)
- Approval title (Approval request tile)
- Approval description (Approval request description)
- Approval hyperlink (Any links to attach to the approval request) – Optional
- Approval hyperlink text (Text to be displayed in place of hyperlink) – Optional

- Click on Add Input button and add input as the field name i.e. if the field name is Requester Name, then keep the input name as Requester Name. This Input will be used to collect the information from the user using the chatbot.
- Click on the tick after typing the input field.

- Click on the added input on the Variable Picker pop-up to get added in the selected field. Continue doing the same for all the remaining fields.

Alternatively, you can enter text value if you don’t want to collect the information form the user through the chatbot and send the default data. Here, as we are creating Approval for unlock account, you can type in the text for the approval title.


Approval reminder and expiry
In this section, you can select the frequency of sending the Approval Request to the approver if not responded to the approval.
- Send approval reminder (Choose between Days, Hours, Minutes)
- Remind Every (Choose based on the reminder selection between Days, Hours, Minutes)
- Approval expiry (Type when the approval should get expired if there is no response from the approver and stop sending reminder emails)

NOTE: Approval expiry will work only when it is provided in the mentioned formats.
2d 5h
or
2days 5hours 3minutes
or
3min 20sec
Description:
- Provide the description to be displayed as information for the approval function on the canvas page.

- Click on the Save button after filling all the details.

- You can hover over the Info icon to view the added description.

- Click the plus icon and add a parallel path to setup conditions for the Approval (for Approved, Rejected and Expired scenarios)

- Click the plus icon in the empty box and select the Add Condition function.

Let us set up the condition for the Approval Approved scenario.
- Provide name for the Condition (eg, If Approved):

- Click on the Select Condition field to open the Variable Picker.

- Select the Approved output variable from the list and it will be added as a condition.

- Select the condition criteria from the down-drown menu as Is true. It means, when the approval is approved by the approver.

- Click Save.

- Continue doing the same for Rejected and Expired conditions as well.


It will appear as shown below, once you have set up the conditions for each scenario.

- Now, add actions under each condition on how you want the workflow to proceed based on your requirement.
For example, under the Approved condition, you can use the Add Action function to unlock the user Account in Azure AD.


- Also, you can add an action to send a notification (email or chat notification action) to the requester upon the successful execution of Approval request (Unlock Account).

Once you have added the action, it will appear as shown below.

Similarly create your workflow for other conditions as well.
Rejected

Expired

If you follow all the steps correctly, the final workflow will appear as shown below.

- Click the Test icon in the top-right corner to test the approval workflow before activating it.

Test interface will be opened to test the Approval workflow. Fill in the relevant details and click Continue.

The Workflow will be executed, and email will be sent to the approver mail.

Email will be received at the Approver’s end and the Approver can click on the View Request button or copy and paste the url to respond to the request.

The request will be opened in a browser window as shown below. The Approver can Approve or Reject the approval request by clicking on the relevant button.
The Approver can also provide comments in the available text field (optional).


Once responded to the approval, it will appear to the Approver as shown below.

Now, workflow will be executed as per the designed flow. You can view the output details in the logs and the status of the execution.

Email notification will be received by the requester as per the workflow.

You can view the logs of the Approval in the Workflow Logs page.
For more information, see Workflow Logs

Once you have designed the workflow, you can Activate it and add in the desired Dialog.
