Automate

Flows

Flows enable custom, event-driven data processing and task automation within Directus.

Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, a series of operations, and a data chain that is passed between each step.

Fields

  • Name (required) — The displayed name of the Flow.
  • Status — Sets the flow to active or inactive.
  • Icon — Adds an icon to help quickly identify the flow.
  • Description — Sets a brief verbal description of the flow.
  • Color — Sets a color to help identify the flow.
  • Activity and Logs Tracking — Selects whether the flow should be tracked in both the activity log and the flow's logs, only in the activity log, or neither.

Logs

Logs from one flow execution. It shows the trigger payload and accountability, and the operation options and payload.

Accessible from the sidebar, logs store information for each flow execution. Each log will display information from triggers as well as each operation in the flow.

Logs are not a 1:1 mapping to the data chain. Each trigger and operation gets its own dropdown, which stores its relevant data. Here's what you'll get from each of these:

Trigger

  • Options — The values you input when you configured the trigger.
  • Payload — Displays the data appended under $trigger, which includes the data passed into the flow itself.
  • Accountability — Displays data appended under $accountability, which is a breakdown of the permissions and request information of the user that triggered that event.

Note that $accountability is not nested under the $trigger key. However, it is listed under the trigger in the log because $accountability is generated by the trigger.

<OperationKey>

  • Options — The values you input when you configured the operation.
    (These configuration options are not stored on the data chain).
  • Payload — Displays the data appended under this <operationKey>.
Logs are stored in the database
Flows configured to tracks will store this information in the database, which may require occasionally deleting.
Where is $last?
$last constantly updates to store the data of the most recently executed operation. Since the log shows the results of the entire flow, $last would only be the final operation in the flow.