# Slash commands
You can configure slash commands to trigger the Workbot for Slack New command trigger.
You can configure slash commands using the following methods:
- By connecting an Enterprise Workbot (recommended)
- By using a legacy custom integration
We strongly recommend using Enterprise Workbots to configure your slash command, as custom integration is a legacy feature that may be deprecated in the future.
# Prerequisites
To use slash commands, you must have the following:
Access to custom OAuth profiles in Workato.
An Enterprise Workbot in Workato that's set up with Slack Enterprise Grid.
Org-readiness enabled on your Slack app profile. The bot can't integrate with Slack Enterprise Grid without this setting.
Enable org-readiness
# Example: Create a Jira issue slash command
This example demonstrates how to configure a slash command that lets you create new Jira issues from within Slack.
- Define the slash command in Workato
- Create the slash command in Slack
- Complete your recipe
- Test your recipe
# Define the slash command in Workato
Complete the following steps to define the slash command in Workato:
Create a new recipe using Build a Slack bot command as your starting point. This adds the Workbot for Slack New command trigger and Post command reply action to your recipe.
Build a new Slack bot command
Select the trigger.
Select Jira from the App drop-down menu.
Select Create as the action for the command to perform from the Action drop-down menu.
Select Issue as the data the command works with from the Action data drop-down menu.
In the Parameters field, click Add command input. This field lets you define the parameters you expect to receive from an upstream bot command, such as the Jira project key and issue type.
Create the following parameters:
project_issue_type
- Label: Project issue type
- Data type: String
- Optional?: No
- Hint: Enter the project key and issue type separated by two hyphens
- Example input value: IM--Task
summary
- Label: Summary
- Data type: String
- Optional?: No
- Hint: Enter the summary for the Jira issue
description
- Label: Description
- Data type: String
- Optional?: Yes
- Hint: Enter the description for the Jira issue
Example schema
[
{
"control_type": "text",
"label": "Project issue type",
"name": "project_issue_type",
"type": "string",
"optional": false,
"hint": "Enter project key and issue type separated by two hyphens",
"sample": "IM--Task"
},
{
"control_type": "text",
"label": "Summary",
"name": "summary",
"type": "string",
"optional": false,
"hint": "Enter the summary for the Jira issue"
},
{
"control_type": "text",
"label": "Description",
"name": "description",
"type": "string",
"optional": true,
"hint": "Enter the description for the Jira issue"
}
]
Expand the Slash command section and set Enable Slash Command to Yes.
Enter /createissue
in the Command name field. This name is used to invoke the slash command. The command name must begin with a /
and contain no spaces.
Scroll to the top of the trigger configuration and copy the URL. Workato generates this request URL after you enable the slash command and enter a valid command name.
Copy the request URL
Optional. Fill in the Auto-reply message field. For example, you can enter Command received, working...
in this field.
When the command is invoked, Workbot for Slack automatically sends this reply to the user only. If left empty, Workbot for Slack's reply mirrors the user's command to confirm receipt. You can't use datapills in this field.
Optional. Select Yes in the Dialog for missing parameters field. This lets users enter missing parameters in a dialog.
If you select No, Workbot collects these values in a conversation.
Optional. Enter Create new issue in Jira
in the Dialog title field.
Click Save.
# Create the slash command in Slack
Complete the following steps to create the slash command in Slack:
Go to the Slack API website (opens new window) and select Your apps.
Select the app that corresponds to your Enterprise Workbot.
Select your Enterprise bot
Click Slash Commands.
Click Create New Command.
Select Create New Command
Enter /createissue
in the Command field.
Paste the URL from Workato in the Request URL field.
Enter a description in the Short description field. For example, Creates a new issue in Jira
.
Optional. Enter the parameters that can be passed in the slash command in the Usage hint field.
Select the Escape channels, users, and links sent to your app checkbox. This instructs Slack to escape users and channels in their request payload to Workato.
Click Save.
# Complete your recipe
Complete the following steps to add actions that create the issue in Jira and post a message with details about the Jira issue:
Return to your recipe in Workato and click Select an app and action.
Search for and select Jira
as your app.
Select the Create issue action.
Select your Jira connection.
Switch the Project issue type field to Enter project and issue type and map the Workbot for Slack Project issue type Step 1 datapill.
Map the Workbot for Slack Summary Step 1 datapill to the Summary field.
Map the Workbot for Slack Description Step 1 datapill to the Description field.
Configure the Create issue action
Click + Add step and select Action in app.
Search for and select Jira
as your app.
Select the Get issue action.
Map the Jira ID Step 2 datapill to the Issue ID or key field.
Select the Workbot for Slack Post command reply action.
Configure the reply to include details about the newly created Jira issue.
Click Save.
# Test your recipe
Complete the following steps to test your recipe:
Click Test recipe.
Open Slack and select a channel where your Enterprise Workbot is added.
Enter /createissue
and press Return to send the command and open the Create new issue in Jira dialog.
INLINE PARAMETER INPUT
You can also pass parameters directly in the slash command.
Command input parameters follow this format:
/slashcommand name1: value 1 name2: value 2 name3: value 3...
Here, name
is the parameter name and value
is the parameter's value.
For example:
/createissue project_issue_type: UI--Bug summary: Button is misaligned description: At the registration page, the registration button is misaligned.
Fill out the fields and click Submit.
If you configured the Post command reply action, Workbot sends a confirmation reply with details about the newly created Jira issue.
You can add more slash commands to the same Enterprise Workbot. Slash commands aren't namespaced, so be sure to give each command a unique name.
# Troubleshooting
If you encounter a dispatch_failed
error, your Workbot might be misconfigured. If your Enterprise Workbot has Slack Enterprise Grid functionality, you must install the bot at the organizational level rather than within a single Slack workspace.
Last updated: 3/27/2025, 6:33:05 PM