Skip to main content

Plan View for Slack Tasks

In Plan View, you can create tasks to send messages to a Slack channel. These tasks are specified in the right context panel.

  • A Slack task is a message from the Alteryx Analytics Cloud to a specified Slack workspace channel.

  • A Slack task is one of the task types available in a plan. For more information, see Plan View Page.

Limitations

  • You can only post messages to Slack channels. Other interaction methods are not supported.

    Tip

    You can also create HTTP tasks to deliver messages to a Slack channel. See Plan View for HTTP Tasks.

  • HTTP-based requests have a 30-second timeout limit.

  • Authentication must be made through OAuth.

Prerequisites

  • To send a message to Slack, you must create an app in the target workspace for the Slack channel to receive the message. For more information, see https://api.slack.com/apps.

  • This Slack app must support OAuth authentication. The OAuth Token that you create must be installed in your workspace.

    Note

    Copy the generated token to a text file and retain it for later. This token must be pasted into the definition of each Slack task where you wish to use it.

  • Create an OAuth Token that has chat:write scopes. This token is inserted into your task definition. There are two types of tokens:

    • Bot Token: These tokens post a Slack message from the name of the app.

      • The Bot Token also requires the chat:write.public scope.

      • A Bot Token is required if you wish to send a direct message through the App category of messages.

      • To send a message to a private channel using a Bot Token, you must install the app in the channel through the Integrations window in the channel's settings.

    • User Token: These tokens post a Slack message from the user who authorizes the message.

      Tip

      To send a message to a user or a private channel using a User Token, additional configuration is required. See below.

Create Task

  1. Drag and drop the Slack task from the left pane to the Plan canvas.

  2. In the right panel, select Slack task. The Slack task panel is displayed.

PlanViewPage-ViewForSlackTask.png

Figure: Slack task

Configure Task

  1. In the Request tab, set the required parameters.

  2. To test the message, click Test. A success message is displayed.

    Tip

    A status code of 200 indicates that the test was successful.

  3. To add the task, click Save.

Field

Description

OAuth Token

The OAuth token to use for posting the message.

Channel

Paste one of the following values from the Slack workspace for where to post the message:

  • Channel Name: Name of the channel as it appears in Slack.

  • Channel ID: This value is available in the Settings page for the channel.

  • Member ID: You can post the message to a specific user instead of posting to a channel.

    Tip

    A user's member ID can be found in the user's Profile page in Slack.

Message

The message to post.

Tip

Messages can include metadata information about the tasks in the current plan run. For more information, see Plan Metadata References.

Rename Task

To rename the task, click More menu > Edit in the right panel.

Tip

Good naming may include the target platform endpoint and method, as well as the purposes of the task in your plan.

Delete Task

To delete the task, click More menu > Delete. Confirm that you wish to delete the task.

Warning

This step cannot be undone.

Plan Metadata References

Within the message of your other tasks, you can reference metadata about the plan, its tasks, and their execution. For more information, see Plan Metadata References.