Send Flow Message
send_flow_messageResume a paused ServiceNow flow execution by sending the message its Wait For Message step expects, then check the flow context status to confirm it continued.
Instructions
Send a message to a paused flow execution (one waiting in a Wait For Message step), which resumes it: the flow then runs whatever comes next. Sent from a server-side script (sn_fd.FlowAPI.sendMessage). Only when the user asked; the message must be the one the step waits for. The platform accepts a message even when nothing is waiting for it, so check get_flow_context_status afterwards to see whether the flow resumed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | The scope to run the sending script in, when it is not global. | |
| message | Yes | The message the Wait For Message step waits for. Leading and trailing spaces are removed. | |
| payload | No | Payload passed with the message, on one line (e.g. minified JSON). | |
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| context_id | Yes | The execution's sys_flow_context sys_id. |