For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use Slack in an Agentic Workflow

Overview

Build Agentic Workflows to look up Slack® user names from email addresses and send plain-text or formatted Slack messages.


Before You Begin

To use Slack in an Agentic Workflow, you need an active Slack workspace at any membership tier and the Slack integration installed and configured.

See Set Up Slack in Kizen for details.


Add Slack to an Agentic Workflow

To add Slack to an Agentic Workflow:

1

Go to the Agentic Workflow builder

In the global navigation, select Agentic Workflows. Then, to open the builder, do one of the following:

  • Select New Agentic Workflow.

  • Select the name of an existing Agentic Workflow.

2

Add an action to the workflow

Select +, and then select Add Action.

3

Select the Slack action

In the Add Action modal that opens, scroll to the Integration section, and select the Slack card.

4

Choose the function to perform

In the Action Settings section of the Add Action modal, select the Action dropdown menu, and do one of the following:

  • To get the user name of someone on Slack, select Get Username, and set up the action. For more information, see Set Up a Get Username Action below.

  • To send a plain-text message to a Slack channel, select Send Slack Message, and set up the action. For more information, see Set Up a Send Slack Message Action below.

  • To send a rich-text message to a Slack channel, select Get Send Slack Block Message, and set up the action. For more information, see Set Up a Send Slack Block Message Action below.

5

Configure error handling

In the Error Handling section of the modal, specify how to handle errors in this step of the Agentic Workflow.

6

Save the Slack action

Select Save.


Set Up a Get Username Action

The Get Username action gives you the user name of any Slack member on your workspace from their email address. The integration returns the user name in the form of a Slack mention, like this: <@U012AB3CD>.

Note: Because the user name comes back as a mention, you can tag this person in a Slack message in a later step of your Agentic Workflow without parsing the output in any way. The value renders correctly in Slack when you send it to a channel through the Send Slack Message or Send Slack Block Message action.

To set up a Get Username Action:

1

Configure the source for the email address

The action takes one of the following:

  • The Team Member field of the Slack user in Kizen

  • The email address of the Slack user as a string

Find the Email field in the Script Inputs section of the Add Action modal, select the source of the email address from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

2

Configure the destination for the Slack user name

The person's user name comes back as a string. Find the User Mention field in the Script Outputs section of the modal, select the destination of the user name from the Output Source dropdown menu, and then configure the destination with the additional controls that appear.


Set Up a Send Slack Message Action

The Send Slack Message action sends a plain-text Slack message to the specified Slack channel on your workspace.

Note: This type of message can have a maximum of 40,000 characters. Slack truncates any text beyond this limit.

To set up a Send Slack Message action, for each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:

Field
Type
Description
Required?

Message

String

The plain-text message to send

Yes

Channel

String

The ID or name of the destination Slack channel

Yes

Note: Whenever possible, identify the channel by its ID (C123456789) instead of its name (#channel). Using the ID requires fewer API calls.


Set Up a Send Slack Block Message Action

The Send Slack Block Message action sends a formatted or interactive message to the specified Slack channel on your workspace.

To set up a Send Slack Block Message action:

1

Build the message from Slack blocks

Blocks in Slack are JSON objects that represent message components like text, images, code listings, and videos. Build the message to send as an array of these blocks.

For more details, see Slack's Block Kit documentation.

Note: Be sure to create the JSON object for the block as a long text variable, not with a static string input field. This way, you can see the entire structure of the object more easily.

To build the block payload visually, use Slack's Block Kit Builder.

Note: Slack limits you to a maximum of 50 blocks per payload. Each section block has a limit of 3000 characters per text field, and each header block has a limit of 150 characters per headline text field. Exceeding any one of these limits causes the entire payload to fail.

See the Blocks reference for advanced information.

2

Configure the sources for the script inputs

For each of the fields in the Script Inputs section of the Add Action modal, select the source of the field's value from the Input Source dropdown menu, and then configure the source with the additional controls that appear.

The fields are as follows:

Field
Type
Description
Required?

Channel

String

The ID or name of the destination Slack channel

Yes

Message

String

The message to send in blocks

Yes

Note: Like with the Send Slack Message action, identify the channel by its ID (C123456789) instead of its name (#channel) whenever you can. Using the ID results in fewer API calls.


What's Next

Continue to Troubleshoot Slack for solutions to common technical problems.


Slack is a registered trademark and service mark of Slack Technologies, Inc. Kizen's Slack integration is not created by, affiliated with, or supported by Slack Technologies, LLC.

Last updated

Was this helpful?