Workflow Builder
Input

Input

The input object consists of a JSONSchema that validates the input of your workflow. Defining input is optional.

In the following example, the input object can be used for receiving an invitation invitationUrl, and sending a basic message welcomeMessage:

YAML
input:
  type: 'object'
  properties:
    invitationUrl:
      type: string
    welcomeMessage:
      type: string

The workflow now validates the workflow input based on this schema. An example input could be:

JSON
{
  "invitationUrl": "https://didcomm.demo.animo.id?c_i=eyJAdHlwZSI6ImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb25zLzEuMC9pbnZpdGF0aW9uIiwiQGlkIjoiNjY4MzBkNDUtMWM3YS00MmM1LWE5NmMtNGYwMzlhN2JhMmY3IiwibGFiZWwiOiJBbmltbyIsImltYWdlVXJsIjoiaHR0cHM6Ly9pLmltZ3VyLmNvbS9nM2FiY0NPLnBuZyIsInJlY2lwaWVudEtleXMiOlsiRXVMV2FiQW05M2RtdjNmSkFlcEQ3WjM2RG42aExGQncxdDZIbWh0ckNUVE0iXSwic2VydmljZUVuZHBvaW50IjoiaHR0cHM6Ly9kaWRjb21tLmRlbW8uYW5pbW8uaWQiLCJyb3V0aW5nS2V5cyI6W119",
  "welcomeMessage": "Welcome!"
}

Within a workflow you can refer to input values using $.input.<key>. For example, the welcome message in the previous code sample can be used in an action by calling $.input.welcomeMessage.