Automate and customize Slack tasks

  • Release version: Zurich
  • Updated July 31, 2025
  • 4 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Automate and customize Slack tasks

    This guide explains how ServiceNow customers can automate and customize Slack tasks using Workflow Studio, inbound decisions, and outbound configurations. It provides practical steps to configure Slack commands, message actions, approval messages, request assignments, and actionable messages. These automations enhance collaboration by integrating ServiceNow workflows directly within Slack.

    Show full answer Show less

    Automate Slack Commands

    • Configure Slack commands on the Slash Commands page of your custom Slack app.
    • Create or copy a subflow (e.g., Respond to Slack Command) in Workflow Studio to handle incident creation and other commands.
    • Set inbound decisions in ServiceNow with conditions specifying the Slack command (e.g., /now) and parameters to trigger the appropriate subflow.
    • Supported commands include:
      • /now create incident [description] [urgency] [impact] - creates an incident.
      • /now list incidents - lists active incidents assigned to the user.
      • /now help - displays available commands.
      • /now note [note] - adds notes to incidents.

    Automate Slack Message Actions

    • Create a message shortcut in your Slack app with postmessagenow as the Callback ID.
    • Create or copy the Respond to Slack Message Action subflow in Workflow Studio to handle incident creation from message actions.
    • Configure inbound decisions to listen for the callback ID and trigger the subflow accordingly.

    Post Approval Messages

    • In Workflow Studio, customize the Respond to Slack Approval Action subflow to post approval messages in Slack channels.
    • Use the default outbound configuration Approval Message, specifying a unique Action ID (e.g., approvalrequest).
    • Set inbound decisions with the Action ID to trigger the approval subflow when matching Slack events occur.

    Assign Requests Based on Acknowledgement

    • Customize the On-Call Assign by Acknowledgement subflow in Workflow Studio for request assignment automation.
    • Use the default outbound configuration On Call: Assign by Acknowledgement with a unique Action ID (e.g., oncallassignbyacknowledgement).
    • Configure inbound decisions with this Action ID to trigger the assignment subflow on relevant Slack acknowledgements.

    Post Actionable Messages

    • Configure outbound settings to define target tables, fields (e.g., shortdescription, priority), and action buttons (e.g., Accept, Reject).
    • Create or copy the Post Actionable Message subflow in Workflow Studio, using record sysid and templates as inputs.
    • Set inbound decisions with the appropriate Action ID to trigger the subflow when Slack events match.

    Key Outcomes

    • Enable seamless incident creation, updates, and management directly from Slack commands and message actions.
    • Automate posting and handling of approval messages and acknowledgements within Slack channels.
    • Streamline assignment processes and interactive message handling to improve response times and collaboration.
    • Leverage customizable subflows and conditions to tailor Slack interactions to your organization's specific workflows and requirements.

    Automate Slack tasks as per your requirement, using the sample these scenarios as a reference.

    You can use the default outbound configurations, inbound decisions, and subflows as reference to customize tasks as per your requirement.

    Automate Slack commands

    Perform these steps to automate events such as, create incident records, based on the Slack commands:
    1. Configure the Slack commands on the Slash Commands page of your custom application. For more information, see Configure Slack app.
    2. In Workflow Studio, create a subflow configure to create the incident records as per your requirement or create a copy of the default subflow, Respond to Slack Command, and configure it.
      Note:
      Create an action and use the payload in the subflow input as per your requirement.
    3. Configure inbound decisions in ServiceNow instance.
      1. In the Condition, ensure that you specify the value of command as /now and specify the required parameters.
        Note:
        You can specify up to 2 parameters in your condition to trigger the required subflow.
        Slack command
      2. In Answer, select the subflow you had configured.
    When a Slack user enters the command, /now create incident <text>, the condition specified in inbound decision is met and the associated subflow is triggered. Similarly, you can customize subflows and inbound decisions to configure more Slack commands such as:
    • /now list incidents to list all active incidents assigned to the logged in user.
    • /now help to display all available commands and their describe usage.
    • /now note [note] to add notes to the required incident.
    • /now create incident [short description] > [optional: urgency] > [optional: impact] to create an incident with specified short description, urgency, and impact. For example, /now create incident Email is not working > 3 > 2.

    Automate message actions

    1. In your Slack custom application, create a shortcut that appears on messages and enter the value, post_message_now for Callback ID. For more information, see Configure Slack app.
    2. In Workflow Studio, create a subflow configure to create the incident records as per your requirement or create a copy of the default subflow, Respond to Slack Message Action, and configure it.
      Note:
      Create an action and use the payload in the subflow input as per your requirement.
    3. Configure inbound decisions in ServiceNow instance.
      1. In the Condition, ensure that you specify the value of callback_id as post_message_now and specify the required parameters.
        Provide the required callback_id.
      2. In Answer, select the subflow you had configured.

    Post an approval message

    Perform these steps to automate posting an approval message on a Slack channel.
    1. In Workflow Studio, create a copy of the default subflow, Respond to Slack Approval Action, and configure it as per your requirement.
      Note:
      Create an action and use the payload in the subflow input as per your requirement.
    2. Configure outbound configurations in ServiceNow instance
      1. Open the default outbound configuration, Approval Message.
      2. In Action ID , specify the unique identifier for automating the task of posting an acknowledgement message. For example, value of Action ID can be approval_request.
    3. Configure inbound decisions in ServiceNow instance.
      1. In the Condition, ensure that you specify the value of Action ID as approval_request. You can specify other conditions as per your requirement.
        Provide value for Action ID.
      2. In Answer, select the subflow you had configured.

    When the Slack events match the relevant the action ID, the associated subflow, that is, the Respond to Slack Approval Action subflow is triggered. This subflow contains the logic to update the required record and send the relevant acknowledgement message on Slack channel.

    Assign request based on acknowledgement

    Perform these steps to automate assigning request:
    1. In Workflow Studio, create a copy of the default subflow, On-Call Assign by Acknowledgement, and configure it as per your requirement.
      Note:
      Create an action and use the payload in the subflow input as per your requirement.
    2. Configure outbound configurations in ServiceNow instance.
      1. Open the default outbound configuration, On Call: Assign by Acknowledgement.
      2. In Action ID , specify the unique identifier for automating the task of posting an acknowledgement message. For example, value of Action ID can be on_call_assign_by_acknowledgement.
    3. Configure inbound decisions in ServiceNow instance.
      1. In the Condition, ensure that you specify the value of Action ID as on_call_assign_by_acknowledgement. You can specify other conditions as per your requirement.
      2. In Answer, select the subflow you had configured.

    Post an actionable message

    Perform these steps to automate posting an actionable message:
    1. Configure outbound configurations in ServiceNow instance.
      1. Open the default outbound configuration, On Call: Assign by Acknowledgement.
      2. Select Target Table and Fields as per your requirement. For example, short_description and priority from the Task [task] table.
      3. Select Buttons as per your requirement. For example, Accept and Reject.
      4. In Action ID , specify the unique identifier for automating the task of posting an acknowledgement message. For example, value of Action ID can be on_call_assign_by_acknowledgement.
    2. In Workflow Studio, create a copy of the default subflow, Post Actionable Message, and configure it as per your requirement.
      Note:
      Create an action and use the payload in the subflow input as per your requirement.
      1. In the Record Sys_ID input, provide the sys ID of the required record. For example, specify the sys ID of the task record.
      2. In the Template input, select template you had created in the outbound configurations.
    3. Configure inbound decisions in ServiceNow instance.
      1. In the Condition, ensure that you specify the value of Action ID as on_call_assign_by_acknowledgement. You can specify other conditions as per your requirement.
      2. In Answer, select the subflow you had configured.