> For the complete documentation index, see [llms.txt](https://support.suptask.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.suptask.com/integrations-automations-and-workflows/integration-guides/how-to-use-slack-workflows.md).

# Slack Workflows

Learn how to make use of Suptask in Slack Workflows

{% hint style="warning" %}
The integration with Slack Workflows is included in the Professional plan of Suptask.
{% endhint %}

[Slack Workflows](https://slack.com/intl/en-gb/help/articles/17542172840595-Build-a-workflow--Create-a-workflow-in-Slack) allow you to build a multi-step workflow that combines different inputs and actions. Suptask supports the new Slack Workflows and opens up the possibility to integrate Suptask as a part of Slack Workflows.

#### Use cases with Suptask:

* Trigger workflow from an event in Suptask
* Create tickets in Suptask from a workflow

***

### Requirements

You need to have a paid subscription of Slack to have access to Slack Workflows.

***

### How it works

Suptask can work with Slack Workflows in mainly two different ways:

* Suptask can trigger a Slack Workflow using the Webhook event.
* Tickets can be created in Suptask from a Slack Workflow via a message in a channel.

***

### Trigger a Slack Workflow from Suptask

1. Create a new Slack Workflow
2. Select the event on how to start the workflow: [*From a Webhook*](https://slack.com/help/articles/360041352714-Build-a-workflow--Create-a-workflow-that-starts-outside-of-Slack)
3. Set up the data variables that you want to map from Suptask to the Workflow
   1. You can find the sample Webhook data below
4. Store the Webhook URL, you will need it in the Suptask setup.
5. Save your workflow.

<figure><img src="https://621243658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO5JbdwXcuzsmDvD73Ccf%2Fuploads%2Fgit-blob-2573b5b1c857e9d7976b8131245decd2c932000c%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### Set up a new Automation in Suptask

In the new Automation rule...

1. Select what Inbox, and optionally what Form to use the Automation rule for
2. Define the trigger event e.g New ticket created
3. Set up the optional conditions
4. Select the Webhook action
5. Paste the Webhook you retrieved from your Slack Workflow and paste it
6. Save the new rule.

The Slack Workflow will now be executed by Suptask whenever the Automation rule is triggered.

{% hint style="info" %}
You might need to request access and get started via Suptask Support in order to activate the automation.
{% endhint %}

***

### Automatically create tickets from a Slack Workflow

A Slack Workflow can create tickets in Suptask by posting a message to a channel that is an Automatic intake source. Any structured data you include in the message - from Workflow form inputs or variables - is extracted into the ticket's fields, so the ticket arrives categorized without anyone filling it in by hand.

This uses the same mechanism as any other app that posts in Slack. The full reference for how messages are read and how field markers are mapped is on that page:

[Integrate any app that posts in Slack](https://support.suptask.com/integrations-automations-and-workflows/integration-guides/how-to-automate-and-integrate-suptask-with-other-slack-apps)

#### Set up the intake source

Before setting up the integration, create a dedicated private channel where your Slack Workflow can post messages. Suptask will use this channel to convert the messages to tickets.

1. Open your **Inbox** in Suptask and go to the **Intake sources** tab
2. **Add intake source** of the type **Slack channel** and select the newly created channel
   1. e.g #auto-create
3. Set the **Creation mode** to **Automatic**
   1. [Learn more about Intake sources](https://support.suptask.com/setup-and-configure/inboxes/intake-sources)
4. Select the **Form** to offer on the source
5. Save the source

#### Edit your Slack Workflow

1. Open your Slack Workflow
2. As the last step, add the Message > **Send message to a channel**
3. Select the same channel as the intake source in Suptask
4. Add the relevant information to the message field, including any field markers.
5. Save your workflow.

#### Pre-fill fields with field markers

Suptask reads the Workflow message for **field markers** - short snippets that name a ticket field and its value. Three syntax styles work the same way and can be mixed:

| Syntax style        | Example                   |
| ------------------- | ------------------------- |
| **Angle brackets**  | `<<priority: High>>`      |
| **Square brackets** | `[[status: In Progress]]` |
| **Hash syntax**     | `#assigneeId=U123456789`  |

Use Workflow variables inside the markers to set fields from the form the user filled in:

```
Incident reported by {{user}} at {{timestamp}}.
<<priority: {{form_priority}}>>
[[status: New]]
#assigneeId={{form_assignee}}
<<tags: {{form_tags}}>>
Details: {{form_description}}
```

When the message posts in the channel, Suptask extracts the markers into the ticket's fields and keeps the rest of the message as the description.

{% hint style="info" %}
Make sure the options in your Workflow form match the options on your Suptask Form - a value that doesn't match an available option is ignored.
{% endhint %}

#### Set the requester

The message is posted by the Workflow, not by the person who started it, so the Workflow is the author. To make the person the requester, include their Slack user ID as a marker, using the Workflow's user variable:

```
<<requesterId: {{user.id}}>>
```

Without it, Agents may need to set the Requester field on the ticket after it has been created.

***

### Related articles

{% content-ref url="/pages/xzp2WBZUGYEW9MpKuI5c" %}
[Integrate with any app in Slack](https://support.suptask.com/integrations-automations-and-workflows/integration-guides/how-to-automate-and-integrate-suptask-with-other-slack-apps.md)
{% endcontent-ref %}

{% content-ref url="/pages/muOwGHBkMSYJbNMMlpcF" %}
[Automatic ticket creation](https://support.suptask.com/working-with-tickets/for-agents-who-respond-and-manage-tickets/how-to-automatically-create-tickets-from-new-messages.md)
{% endcontent-ref %}

{% content-ref url="/pages/zx2b3jBwDpuzxI47sgia" %}
[Automations in Suptask](https://support.suptask.com/integrations-automations-and-workflows/how-to-set-up-automation-rules.md)
{% endcontent-ref %}
