> 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/decision.md).

# Decision

You can send a customized message to a recipient, asking to choose between one and four options. The workflow execution waits for the recipient to select an outcome before proceeding, and then branches out to new actions depending on the recipient's decision.

You can send the decision request for a user’s action via one or more of these platforms:

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

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FUJtGuD4Ttk7PAoytN3ro%2FDecision.png?alt=media&amp;token=b0807881-58a8-488a-a54d-7367cc8a6569" alt=""><figcaption><p>A Decision action with several options</p></figcaption></figure>

## **Add a decision**

1. From the **Actions** left pane, select **Decide > Decision**. Drag the **Decision** action to the canvas, and connect it to the previous action.

2. Click the action to open its settings.

3. Enter an appropriate description for the action (optional).

4. Enter between 1-4 decision actions, and click **Enter** after each option. \
   For example: Remove sharing, Keep for 1 month, Notify actor.\
   You can enter up to **30 characters** for text in action buttons.<br>

   <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%2Fb052Jt512c8dAvCZyaXi%2Fdecision%20actions.png?alt=media&amp;token=f664a20e-7c5d-4ea5-965f-f27923ae6578" alt=""><figcaption><p>Each decision action is indicated with a different color</p></figcaption></figure></div>

5. Write the [decision message.](#write-the-decision-message)

6. In the workflow, connect each decision option to its relevant action.\
   For example:

   * **Remove sharing** > Remove collaborator
   * **Keep for 1 month** > Wait
   * **Notify actor** > Notify in Slack
   * You can also create a [loop](/docontrol-user-guide/workflows/define-workflow-settings/action-settings.md#loops) connection between a **Decision** action and any previous action in the workflow.
   * After adding new actions, click on each action to open its settings, and enter values in the relevant fields.&#x20;

7. Once the user chooses a specific option, you'll be notified in Slack:<br>

   <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%2F9vEFGiaNSieAGHfFvAkC%2Fdecision%20Slack%20message.png?alt=media&amp;token=178d7d1f-9dff-471c-b791-5958b8307ebb" alt="" width="563"><figcaption></figcaption></figure></div>

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><ul><li>Click the <strong>Plus</strong><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FTvpE5IEpHHCyMElwl0oP%2Fimage.png?alt=media&amp;token=601d8e5d-3ca4-413e-ba50-77e84dabc9fd" alt=""> icon to open the Event Query tool. You can include details from the event, select input or output fields from previous actions, and add <a href="/docontrol-user-guide/workflows/define-workflow-settings/action-settings.md#dynamic-data">dynamic values</a> from the workflow.</li><li>For security reasons, you cannot use hyperlink tags &#x3C;/a> except for supported <a href="#hyperlink-tags">hyperlink tags.</a></li></ul></div>

## Write the decision message

You can send more than one decision request  via email, Slack or DoControl, but the recipient can decide only once.

{% hint style="info" %}

* The **decision** buttons are displayed automatically in the message.
* If the decision message is sent to more than one recipient, a notification message is displayed to a recipient who tries to choose an option for a step that was already decided: \
  `Your request has already been handled.`
  {% endhint %}

### **Decide by email**

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

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Faj5B8SKUzXJEEokR0uQH%2FDecision%20email.png?alt=media&amp;token=b56380e3-6b20-4e4b-a6c7-45552418544d" alt=""><figcaption></figcaption></figure>

1. In the Decision 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 decide, turn on the **Allow external responses** button. If you disable this option, the option 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 recipient 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 %}

### **Decide in Slack**

You can send a decision request via a Slack message to specific Slack channels or users. If you wish, you can enable any member in a Slack channel to decide the course of action.

<figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FWNQFBiVot2UmchlZhspo%2FDecision%20Slack.png?alt=media&amp;token=20b9806c-49c6-47a6-8c09-7fb3b9eb8250" alt=""><figcaption></figcaption></figure>

{% 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 Decision 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 decision message.

5. Write your decision 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.

6. 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.

7. Click **Allow direct decision in Slack** if you wish to enable any member in the Slack channel to decide the course of action.

8. Enter a timeout duration (required). If the recipient 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 deciding the course of action.  Recipients can select the relevant option directly from the Slack message<mark style="background-color:yellow;">.</mark>

### **Decide in DoControl**

The DoControl app is the default method for sending the decision request. The decision request is displayed inside the workflow activity waiting for you to take action.

<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%2FKf1lSsFow7Igo0oFpsPa%2FDecision%20message%20DC.png?alt=media&amp;token=62ad2f92-4915-4217-8be6-084ab93364d8" alt=""><figcaption></figcaption></figure></div>

1. In the Decision 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;

## 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/decision.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.
