> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/decide/approval.md).

# Approval

You can send an approval request for a user’s action, such as sharing an asset publicly, via one or more of these platforms:

* [Email](#approve-by-email)
* [Slack](#approve-in-slack)
* [DoControl](#approve-in-docontrol)

The approval includes a customizable message to the approver, asking to either approve or reject the user's action. You then need to define subsequent actions for Yes, No, and Timeout.

The **Approval** action must have three subsequent outcomes connected to it:

* **Yes -** An action to take when the activity is approved.
* **No -** An action to take when the activity is not approved (rejected).&#x20;
* **Timeout -** An action to take when the approver does not respond within a defined time period.&#x20;

You can also create a [loop](/docontrol-user-guide/workflows/define-workflow-settings/action-settings.md#loops) connection between the **Approval** action and any previous action in the workflow:

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FbCk77BkiKSI8zx8cJjEA%2Fapproval%20loop.png?alt=media&amp;token=ac2fb432-16d9-484e-852c-f17484051c70" alt=""><figcaption><p>A workflow with an approval loop</p></figcaption></figure></div>

{% hint style="info" %}
Learn more about approval workflows and looping with [DoControl videos](/docontrol-user-guide/help/videos.md#approval-steps-and-looping-functionality).
{% endhint %}

## **Add an approval action**

1. From the **Actions** left pane, select **Decide > Approval**. Drag the **Approval** action to the canvas, and connect it to the previous action.
2. Click the action to open its settings.<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FsrGWJR5AqVvCDCRHXzW7%2Fapparoval.png?alt=media&amp;token=23620ba7-affd-4c03-8a0c-e492ae434475" alt=""><figcaption></figcaption></figure>
3. Enter a step description.
4. Write the [approval message](#write-the-approval-message) via one or more of these platforms: email, Slack or DoControl.\
   The **Approve** or **Reject** buttons are displayed automatically in the message.
5. Add and connect the outcome actions to the **Approval** action: Yes, No, Timeout.
   * Connect the **Approval** action to previous actions by [loop](/docontrol-user-guide/workflows/define-workflow-settings/action-settings.md#loops).
   * Combine adding new actions with connecting to previous actions by [loop](/docontrol-user-guide/workflows/define-workflow-settings/action-settings.md#loops).
6. After adding new actions, click on each action to open its settings, and enter values in the relevant fields.  &#x20;

## Write the approval message

You can send more than one message via email, Slack or DoControl, but the recipient can approve or reject only once.

{% hint style="info" %}

* The **Approve** or **Reject** buttons are displayed automatically in the message.
* If the approval message is sent to more than one recipient, a notification message is displayed to a recipient who tries to approve an action that was already approved: \
  `Your request has already been handled.`
  {% endhint %}

### Approve by email&#x20;

Use a predefined template or the default email template to send an approval request.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FsrGWJR5AqVvCDCRHXzW7%2Fapparoval.png?alt=media&amp;token=23620ba7-affd-4c03-8a0c-e492ae434475" alt=""><figcaption></figcaption></figure></div>

1. In the Approval action, click the **Email** tab.

2. Enter the required fields in your email: subject, to, message, and timeout duration. The other fields are optional.<br>

   <table><thead><tr><th width="207">Email field</th><th width="133">Required</th><th>Description</th></tr></thead><tbody><tr><td>Subject</td><td>Required</td><td>Subject line of the email.</td></tr><tr><td>To (recipients as bcc)</td><td>Required</td><td>People receiving the email (blind carbon copy).</td></tr><tr><td>From (sender name)</td><td>Optional</td><td>Person sending the email: You can customize the displayed name, but the email address remains unchanged: &#x3C;no-reply@docontrol.io></td></tr><tr><td>Message</td><td>Required</td><td><p><img src="https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252F25lV4ove5X8jg9huISiO%252FEdit%2520icon%25202.png%3Falt%3Dmedia%26token%3D6e9ca545-9678-4764-979a-997823fa8c72&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=3901bb81&#x26;sv=1" alt=""> <strong>Edit</strong> mode - Type the content for your email.</p><p><img src="https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252FOrawP5hA8I90zytiW2D2%252FPreview%2520icon%25202.png%3Falt%3Dmedia%26token%3Dbfa02140-326e-4b3e-9bac-0494af74723a&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=250d8e89&#x26;sv=1" alt=""> <strong>Preview</strong> mode - View how your email will be displayed.</p></td></tr></tbody></table>

3. If you wish to allow recipients outside of your trusted domains to approve or reject the action, turn on the **Allow external responses** button. If you disable this option, Approve and Reject buttons won't appear in the email.

4. Click the **Plus** <img src="https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252FMFokaiNx127HyZD93Ph3%252Fplus%2520icon%25202.png%3Falt%3Dmedia%26token%3D6bd9644a-ea2a-4969-81de-0a49a61b3dd7&#x26;width=41&#x26;dpr=4&#x26;quality=100&#x26;sign=2e4c73a2&#x26;sv=1" alt="" data-size="line"> icon to add [dynamic values](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings#dynamic-data) to include details from the event, workflow, or select input and output fields from previous actions.

5. Click [Templates](/docontrol-user-guide/system-management/settings/email-templates.md) to use a predefined email template.

6. Enter a timeout duration (required). If the approver ignores the email, you need to define after what interval to run the timeout logic.  The default timeout is 1 day.&#x20;

{% hint style="info" %}

* To configure customized templates for email notifications, see [email templates](https://docs.docontrol.io/docontrol-user-guide/system-management/settings/email-templates).
* For security reasons, you cannot use hyperlink tags \</a> in an email message except for supported [hyperlink tags.](#hyperlink-tags) If you use a DoControl [email template](/docontrol-user-guide/system-management/settings/email-templates.md), you can insert any hyperlink tag.
  {% endhint %}

### Approve in Slack

You can send an approval request via a Slack message to specific Slack channels or users. If you wish, you can enable any member in a Slack channel to approve or reject a file share.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2F4FdXOWj8YKg2E9DKsOpO%2FApprove%20in%20Slack.png?alt=media&amp;token=d15264cc-4126-4e7a-9bbf-246c7d40a9ad" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
For security reasons, you cannot use hyperlink tags \</a> in a Slack message except for supported [hyperlink tags.](#hyperlink-tags)
{% endhint %}

1. In the Approval action, click the **Slack** tab.

2. To send a Slack message to a **public** channel: select a Slack public channel from the dropdown list.

3. To send a Slack message to a **private** channel:

   * Go to your private channel, and click the channel name to view the channel details.
   * Scroll to the bottom and copy the **channel ID**.
   * Enter the channel ID for a private Slack channel.
   * Make sure to invite the **DoControl app** to each private channel.

4. To send a Slack message to **users**: Select Slack users in your organization to whom to send the approval message.

5. Write your approval message:

   ![](https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252F25lV4ove5X8jg9huISiO%252FEdit%2520icon%25202.png%3Falt%3Dmedia%26token%3D6e9ca545-9678-4764-979a-997823fa8c72\&width=300\&dpr=4\&quality=100\&sign=3901bb81\&sv=1) **Edit** mode - Type the content for your message.

   ![](https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252FOrawP5hA8I90zytiW2D2%252FPreview%2520icon%25202.png%3Falt%3Dmedia%26token%3Dbfa02140-326e-4b3e-9bac-0494af74723a\&width=300\&dpr=4\&quality=100\&sign=250d8e89\&sv=1) **Preview** mode - View how your message will be displayed.<br>

6. Click **Allow direct approval in Slack** if you wish to enable any member in the Slack channel to approve or reject the file share.

7. Click the **Plus** <img src="https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252F0tL8R3V3loM2SPzWrGmA%252Fplus%2520icon%25202.png%3Falt%3Dmedia%26token%3D9ac46b63-b289-4f11-8390-4dc740c9bab0&#x26;width=41&#x26;dpr=4&#x26;quality=100&#x26;sign=58e1bc9d&#x26;sv=1" alt="" data-size="line"> icon to add [dynamic values](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings#dynamic-data) to include details from the event, workflow, or select input and output fields from previous actions.

8. Enter a timeout duration (required). If the approver ignores the message, you need to define after what interval to run the timeout logic.  The default timeout is 1 day.&#x20;

The selected channels or users receive a link for approving or rejecting the user's action.  Recipients can either approve or reject directly from the Slack message<mark style="background-color:yellow;">.</mark>

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FsKx5k9JoRppyQhGzSTUV%2FSlack%20approval%20channel.png?alt=media&amp;token=3a64739c-b1ff-442c-b9d2-0c2ee72e2fca" alt="" width="541"><figcaption><p>An approval request sent to a Slack channel</p></figcaption></figure></div>

Once the request is approved or rejected, you'll be notified in Slack:

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FY9nVMz7SnOTDwLXFTFpF%2FDoControl%20app%20share.png?alt=media&amp;token=3b4e5c89-111b-4053-9c0c-efa42abbf8a5" alt="" width="563"><figcaption></figcaption></figure></div>

### Approve in DoControl

The DoControl app is the default method for sending the approval request. The approval request is displayed inside the workflow activity waiting for you to approve or reject.

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FiOeD7ICC7D64OXSv6ENp%2FApprove%20in%20DoControl.png?alt=media&amp;token=56445ab3-b51c-4086-9db4-605bfd39720f" alt=""><figcaption></figcaption></figure></div>

1. In the Approval action, click the **DoControl** tab.
2. Write your approval message:\
   ![](https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252F25lV4ove5X8jg9huISiO%252FEdit%2520icon%25202.png%3Falt%3Dmedia%26token%3D6e9ca545-9678-4764-979a-997823fa8c72\&width=300\&dpr=4\&quality=100\&sign=3901bb81\&sv=1) **Edit** mode - Type the content for your message.\
   ![](https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252FOrawP5hA8I90zytiW2D2%252FPreview%2520icon%25202.png%3Falt%3Dmedia%26token%3Dbfa02140-326e-4b3e-9bac-0494af74723a\&width=300\&dpr=4\&quality=100\&sign=250d8e89\&sv=1) **Preview** mode - View how your message will be displayed.
3. Click the **Plus** <img src="https://docs.docontrol.io/~gitbook/image?url=https%3A%2F%2F3236294211-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MesrnyDMZGYg1V-tOBo%252Fuploads%252F0tL8R3V3loM2SPzWrGmA%252Fplus%2520icon%25202.png%3Falt%3Dmedia%26token%3D9ac46b63-b289-4f11-8390-4dc740c9bab0&#x26;width=41&#x26;dpr=4&#x26;quality=100&#x26;sign=58e1bc9d&#x26;sv=1" alt="" data-size="line"> icon to add [dynamic values](https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings#dynamic-data) to include details from the event, workflow, or select input and output fields from previous actions.
4. Enter a timeout duration (required). If the approver ignores the message, you need to define after what interval to run the timeout logic.  The default timeout is 1 day.&#x20;

<div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fe8t2TdDkzfyaTTg3SUbC%2Fapproval%20details.png?alt=media&amp;token=926e2c9e-e6e8-4533-ab90-38f260716a60" alt="" width="563"><figcaption><p>The approval request is indicated in the workflow execution details:</p></figcaption></figure></div>

## Hyperlink tags in messages

For security reasons, you cannot use hyperlink tags \</a> in an email, Slack message or DoControl webhook, except for these HTML tags:

* \<i> and \<em> - italics
* \<s> - strikethrough
* \<ul> and \<li> - unordered list
* \<ol> and \<li> - ordered list
* \<br> - line break
* \<p> - paragraph
* \<h1> - heading 1
* \<h2> - heading 2
* \<div> - section
* \<span> - inline element

{% hint style="success" %}
If you wish to insert any other HTML tag, you can do so from a DoControl [email template](/docontrol-user-guide/system-management/settings/email-templates.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/workflows/define-workflow-settings/action-settings/decide/approval.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
