Skip to main content

REFERENCE

Developer Reference

Authentication, APIs, SDKs, Flow Agent processors and parameter resolution, in full.

Push Message

Send a message to the user straight away, then carry on.

Push Message is the processor that sends a message back to the user.

  1. Basic usage​

    Push Message sends the configured message immediately, then continues to the next processor.

  2. Configuration​

    The node's property panel:

    The Push Message property panel: Message is required, plus Template, a Flush toggle and Payload

    Name​

    The name shown on the canvas, used to identify this processor within the workflow.

    Description​

    Explains what this processor is for, making the workflow easier to read.

    Properties​

    Message (required)​

    The text to send to the user. Supports Literal, Expression and Template value types; see Expression introduction — resolving values.

    Template​

    The message template, defining how the message is presented. Use it for richer formats such as buttons, images and quick replies.

    Flush​

    The node panel and the Workflow CRD still have this setting. It defaults to false.

    The executor does not read this setting. Push Message behaves the same when it is true or false.

    When Push Message runs, it writes the message to the conversation history and publishes it to the live stream.

    Messages to LINE, Slack, Discord and Telegram go to the chat platform together when the request ends. Every Push Message in the turn arrives after the request ends.

    Payload​

    Additional structured data (metadata, for instance) to push alongside the message, for the frontend to use.

  3. In the Workflow CRD​

    - name: proc-push-error-msg
    type: push-message
    labels:
    display_name: Push Error Message
    configs:
    - name: message
    value: The system is busy, please try again shortly.
    - name: flush
    value: "false"
    - name: template
    expression: |-
    (() => {
    return { type: "HINT" };
    })()
    - name: payload
    expression: |-
    ({ prevError })

    flush is a boolean, but in the CRD it is always written as the string "true" or "false".

    Automation Tool workflows also use type: push-message, but there it accepts only payload and plays the part of Response.

  4. Relationships​

    Success​

    Once the message has been sent, the workflow continues from this connection point to the next processor.

    Failure​

    If sending fails, the workflow continues from this connection point and a prevError variable holds the error.

  5. A worked example​

    Report back what the previous node found.

    FieldValue
    MessageExpression: low_stock.length + ' items are low on stock'
    Flushoff

    Message can also be written in Template mode to produce a richer message with buttons or images.

  6. Notes​

    • Message supports both Expression and Template, and either can reference any variable already set in the flow.
    • Flush does not change when the message is sent.

Ready to get started?

Want to see how Asgard fits your team? Talk to us.

Contact us