---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Wait For Message action

# Wait For Message action {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) 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 Wait For Message action

TheWait For Messageaction in ServiceNow's Workflow Studio allows you to pause a flow until it receives a specific string message via thesendMessage()API.
This action is essential for controlling flow execution based on external or asynchronous events.
It supports an optional timeout feature to prevent indefinite waiting.
Show full answer Show less  

## Key Features

* **Message Input:** Specify the exact text string that the flow waits to receive from `sendMessage()`. This message triggers the flow to resume.
* **Timeout Control:** Enable a timeout option to define how long the flow waits before continuing without receiving the message. This prevents flows from hanging indefinitely.
* **Duration Setting:** Set the timeout duration in hours, minutes, and seconds, controlling the maximum wait time.
* **Outputs:** The action provides a `Payload` output containing any text returned by the `sendMessage()` API and a `State` output indicating success (0) or error (1).
* **Role Requirements:** Available to users with `flowdesigner` or `admin` roles.

## Practical Use and Guidelines

* **Converting Classic Workflows:** Replace classic "Wait for WF Event" activities using this action by specifying the event name as the message string.
* **Generating Messages:** Use the `sendMessage()` API to send messages that resume the flow. This can be done inside the flow (via custom Script steps) or externally (e.g., event scripts).
* **Example Scenario:** In an approval process, if a request is rejected, the flow can wait for a "Resume Flow" message before proceeding. Once the message is sent, including any payload data (e.g., "Resubmitted for approval"), the flow resumes and can re-execute approval actions.

## Benefits for ServiceNow Customers

This action empowers customers to build more responsive and controlled workflows that react dynamically to external inputs or manual interventions. It enables complex flow logic such as waiting for user input, external system signals, or manual approvals, while ensuring flows do not stall indefinitely with timeout support. The ability to handle payload data allows passing contextual information when resuming flows, enhancing automation flexibility and integration capabilities.  
Pause a flow until it receives a specific message from the flow API. Specify the string message that resumes running the flow, and optionally provide a time out value to resume the flow if no message is received after a specific amount of time.

## Roles and availability {#wait-for-message-action__section_wmr_fkc_mcc}

Available as a Workflow Studio ServiceNow core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

## Inputs {#wait-for-message-action__section-inputs}

Provide a value for each input that your action needs. To add dynamic values, you can also drag pills from the Data panel or select them from the pill picker.{#wait-for-message-action__inputs-description}

Message
:   Data type: String

    The text string that the flow is waiting to receive from the sendMessage() API. The action uses this message to resume running the flow. For more information about the sendMessage()
    API, see [FlowAPI - sendMessage(String contextSysID, String message, String payload)](https://www.servicenow.com/docs/access?context=ScriptableFlowAPI&version=australia&pubname=australia-api-reference&section=FlowAPI-sendMessage_S_S_S&ft:locale=en-US).

Enable timeout
    : Data type: True/False  
    Option to limit the amount of time that the flow waits for the action to be completed before continuing.  
    Note:  
    Use the Enable timeout option to help prevent the flow from infinitely waiting. If the message isn't received, a timeout value specifies when the system can skip the Wait for Message action and go to the next item in the flow. You must set a Duration value to enable a timeout.

Duration
:   Data type: Duration

    Amount of time that the flow waits before continuing when the Enable timeout option is selected. Enter the time to wait in hours, minutes, and seconds. If you
    leave this field empty, the flow doesn't wait.

## Outputs {#wait-for-message-action__section-outputs}

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.{#wait-for-message-action__outputs-description}  

Payload
:   Data type: String

    A text string returned by the sendMessage() API. The parent flow can use payload values as inputs for other actions or flow logic.

State
    : Data type: Choice  
    The completion status of the action as a numeric value.

    * 0 (success)
    * 1 (error)
    {#wait-for-message-action__ul_x5y_hjs_qlb}

## General Guidelines {#wait-for-message-action__section_jkh_zbd_mcc}

Use these general guidelines when creating flows that wait for a message.

Convert workflow event waiting activities using this action
:   Convert classic workflows that use the Wait for WF Event activity to flows that use the Wait For Message action. You can use the event name as the message text that resumes the flow.

Use the sendMessage() method to create messages
:   Create messages for waiting flows using the sendMessage() method. If you want the flow to generate the message to resume running, create a custom action with a Script step to generate the message. Alternatively, create some
script logic that runs outside the flow such as an event to generate the message. For more information about the sendMessage() API, see [FlowAPI - sendMessage(String contextSysID, String message, String payload)](https://www.servicenow.com/docs/access?context=ScriptableFlowAPI&version=australia&pubname=australia-api-reference&section=FlowAPI-sendMessage_S_S_S&ft:locale=en-US).  

## Wait for message to run Go back to flow logic {#wait-for-message-action__example_z1k_rkr_c2c}

In this example flow, the approval state determines whether to run the Wait for Message action. If the approval state is skipped or rejected, the flow waits for a message from the sendMessage() API before continuing. You could use
this logic to fix a rejected approval request and resubmit it for approval.

In this example, Fred Luddy rejected the approval and requested more information. To resume the flow, someone has to address Fred's comments, and then run the sendMessage() API to send the proper message `Resume
Flow`.

After fixing the change request, someone ran the sendMessage() API to send the message `Resume Flow` and also send the flow a Payload value of `Resubmitted for approval`. For more information about the
sendMessage() API, see [FlowAPI - sendMessage(String contextSysID, String message, String payload)](https://www.servicenow.com/docs/access?context=ScriptableFlowAPI&version=australia&pubname=australia-api-reference&section=FlowAPI-sendMessage_S_S_S&ft:locale=en-US).

Since the API message value matched the conditions of the Wait for Message action, the flow resumed running. In this case, the flow used a Go back to flow logic block to rerun the Ask for Approval action.

Here is the activity log of the change request. The payload value `Resubmitted for approval` was added to the Additional comments field.

