content/guides/06.automate/1.flows.md
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.
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, which includes the data passed into the flow itself.$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><operationKey>.::callout{icon="material-symbols:warning-rounded" color="warning"} Logs are stored in the database Flows configured to tracks will store this information in the database, which may require occasionally deleting. ::
::callout{icon="material-symbols:info-outline"}
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.
::
:video-embed{video-id="511b1967-c04f-42db-b515-911de7981d33"}