You can pass a value captured in an API block response, such as a ticket number, to a corresponding block using a workflow variable.
In the following tutorial, a value is captured in an API block response and passed to a subsequent API block. You can also apply workflow variables to most other workflow blocks, including the Threshold, Notify, Update, and Decision blocks.
First API block
- Drag the API block onto the canvas.
- Select an API from the list, supply the required information, and click Advanced Mode.
- Select the Response tab. Map the API response to the new workflow variable that you created.
Second API block
- Add a second API block onto the canvas. Supply the required information, and click Advanced Mode. You can add the workflow variable to any of the following tabs:
- Information
- Params
- Headers
- Body
- Use the following syntax
{{WFVariables.Variable_name}}
to add the workflow variable. Alternatively, select the Select a field button and chose the variable from the list. - Set the Begin block criteria to trigger your workflow.
Result
As soon as your workflow is triggered, the variable value is passed from one API block to the next.
Comments
0 comments
Please sign in to leave a comment.