# Creating a Command Reply

Use either the Post command reply or Post message action to respond to the user on Slack. You can configure Workbot to return data that was queried by the command or to respond to the user with a message confirming whether the command was successful or not. See the graphic below for an example use case.

Workbot Command trigger and the Command response diagram Example of a Command reply

This page guides you through the second part of building your first Workbot - create an issue in Github (opens new window). If you have not already done so, follow the steps in configure the New command trigger.

# Step two: Configure the Post command reply action

In the following steps, you configure the Post command reply action with datapills from the GitHub action output.

  1. Under the Github action, click to add a new action. Select Workbot for Slack > Post command reply.
  2. Select the connection that you have established.
  3. In the Message text field, enter the message that Workbot will use in its reply: Issue Number created
    Use the Number datapill from the GitHub action output.
  4. Expand the Message attachment options and configure these fields with the following text and datapills:
    • Title: Name of issue Title
    • Title link: URL
    • Attachment text: Description Body
      Assignee Username
    • Attachment color: Select Good
      This sets the vertical bar to the left of the message to green.
  5. Click Save.

This is how the Message attachment fields should look: Message attachment with expanded fields

This is how the message will appear to users in Slack: Command reply explained

# Test the command

To test the command, start the recipe and open the Slack workspace in which Workbot is installed.

  1. In Slack, send a direct message to Workbot, and enter github create issue.
    Workbot responds with Enter issue: as demonstrated in the screenshot below: Github create issue
  2. Enter the issue title.
    Workbot responds with Enter description as demonstrated in the screenshot below: Github enter description
  3. Enter the description of the issue.
    Workbot responds with Enter assignee: Github enter assignee
  4. Enter your name.
    Workbot takes the information you provided, creates a new issue in Github, and returns a confirmation message. See the screenshot below for an example confirmation message: Github command reply

# Next

You can make the command reply more interactive by including attachment fields, images, buttons, and message menus. To learn more, see Designing the Workbot experience.

Explore other ways Workbot has automated tasks for our community of users in Community Recipes (opens new window).