Skip to main content

Use attributes from external events in Architect workflows

Use this procedure to read an attribute from an incoming event, such as an external event ingested through the API, and use it in an Architect workflow, for example as the text of a chat message in a .

Before you begin

Create a workflow

  1. that must run when the event occurs.
  2. Add a JSON input variable.
    1. In the workflow, create a variable of type JSON and name it. In the examples depicted in this procedure, the variable is named jsonData. With the JSON data format, the entire event is sent to the workflow as a JSON object. Your workflow refers to this input variable as jsonData.
    2. Select the Input to flow option. 
    3. Ensure that the initial value is set as “NOT SET”.
  3. Use the attribute in an action. The whole event is in Flow.jsonData, so reference the attribute directly under it: ToString(Flow.jsonData.attributes.[attribute_name]). For example, to post the attribute to a group chat:
    1. Add a Send Notification action.
    2. Select the chat notification type and select the group.
    3. Set the chat message to ToString(Flow.jsonData.attributes.purchasePrice).
  4. Configure the to point to this Architect workflow as its Workflow Target.
  5. Test the trigger and confirm the attribute path.
  6. Send a real event. Ingest an event through the external events API, using the schema you configured. Confirm the workflow runs and the expression returns the attribute value.

When the event occurs, the trigger starts the workflow and passes the event as JSON in Flow.jsonData. The expression returns the attribute value for use in the flow.