Inputs and outputs
Understand how items are passed between actions
A key concept behind workflows is how each node can take input from the previous node and pass output to the next. While most action nodes do both, some don't require input (Create Item ) and some don't produce output (Delete Item ).
Every workflow starts with a root node. Depending on the workflow type, it may output one or more trigger items to the sequence, or none at all.
When adding an action to the sequence, consider what items may be coming from the previous node. They determine how many times your new action will be performed.
If the previous node outputs no items, only some actions will be available to add. You may want to add a Query action first, to fetch some items to work on.
For a complete listing of the inputs and outputs of all node types, see Actions.
Example
The following event workflow illustrates the concept of actions having input and output items.
Icon | Stage | Input | Times performed | Description | Output |
---|---|---|---|---|---|
Root node | None | 1 | Triggers the workflow when a project is created | One Projects item | |
Relation | One Projects item | 1 | Outputs the contents of the Teams attribute on the incoming project | Two Teams items | |
Relation | Two Teams items | 2 | Outputs the contents of the Team Members attribute on each incoming team | Four Team Members items | |
Create Item | Four Team Members items | 4 | Creates a new item for each incoming team member | Four new items |
In more detail...
Icon | Stage | Input | Description | Output |
---|---|---|---|---|
Root node | None | Triggers the workflow when a project is created | The Projects item | |
Relation | Project item | Outputs the contents of the Teams attribute on the incoming project | Two Teams items | |
Relation | Team 1 item | Outputs the contents of the Team Members attribute on the incoming team | Two Team Members items | |
Team 2 item | Outputs the contents of the Team Members attribute on the incoming team | Two Team Members items | ||
Create Item | Member 1 item (Team 1) | Creates a new item for the incoming team member | Item 1 | |
Member 2 item (Team 1) | Creates a new item for the incoming team member | Item 2 | ||
Member 3 item (Team 2) | Creates a new item for the incoming team member | Item 3 | ||
Member 4 item (Team 2) | Creates a new item for the incoming team member | Item 4 |
Single instance
Some actions have a Single Instance attribute. When enabled, the action is always performed once, regardless of how many input items it receives.
Continuing the example above, if Single Instance is enabled on the Create Item action, it'll only output one new item despite having four input items. To learn more, see Single Instance.
Dynamic values
When configuring an action, attributes marked with can be configured with a dynamic value. This involves linking to the output of another node in the sequence, which can be done in two ways:
-
Link - link to the corresponding output of any preceding stage in the current branch path (one item).
-
Output - reference the total output of any action in the sequence (one or more items).
Continuing the example above, we can illustrate the concept of the Link method.
On the Create Item action, the Subtitle attribute (representing that attribute on the new items) now links to the Name attribute of the first Relation action (representing that attribute on the Teams items).
The links are chronological, so each new item gets its value from the corresponding Teams item in its own causal chain.
If the Output method was used instead, each new item would get the combined values of all the Teams items output by the first Relation action. The Subtitle of each new item would be Team 1 Name, Team 2 Name.
To learn more, see Dynamic action values.