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.
Suggerimento
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.
Nota
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.
Suggerimento
To send a message to a user or a private channel using a User Token, additional configuration is required. See below.
Create Task
Drag and drop the Slack task from the left pane to the Plan canvas.
In the right panel, select Slack task. The Slack task panel is displayed.
Configure Task
In the Request tab, set the required parameters.
To test the message, click Test. A success message is displayed.
Suggerimento
A status code of
200
indicates that the test was successful.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:
|
Message | The message to post. Suggerimento 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.
Suggerimento
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.
Avvertimento
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.