Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/getting-started/7.create-an-automation.md
Comment thread
robluton marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ Create a `posts` collection with at least a `title` and `content` field. [Follow

![Create a new flow pane - including name, metadata, and option to track activity and logs.](/img/3c337848-a40f-4e62-9370-c943e8d5e761.webp)

Navigate to the Flows section in the Settings module. Click on :icon{name="material-symbols:add-circle-outline"} in the page header and name the new flow "Post Created".
Navigate to the Flows module in the module bar. Click on :icon{name="material-symbols:add-circle-outline"} in the page header and name the new flow "Post Created".

## Configure a Trigger

![Create a new flow pane - trigger setup where the trigger is an event hook.](/img/bf02c5e9-ebe2-4bf4-9fc5-3c00811a7a8a.webp)

Click on :icon{name="material-symbols:play-arrow-outline"} to open trigger setup. Select "Event Hook" as the trigger type and select "Action (Non-Blocking)". This will allow you to set up this flow to respond to when an event takes place by running an action that doesn't interrupt.

Select `items.create` as the scope, and then check the "Posts" collection. This combination means that the operation will be triggered when an post is created.
Select `items.create` as the scope, and then select the "Posts" collection. This combination means that the operation will be triggered when a post is created.

## Configure an Operation

![In the flow editor, the trigger connects to an operation. The operation configuration pane is open with a type of Send Notification.](/img/4c072da6-b396-47ad-85ff-f300e3eb9661.webp)
![The operation configuration pane is open in the flow editor with a type of Send Notification.](/img/4c072da6-b396-47ad-85ff-f300e3eb9661.webp)

Click on :icon{name="material-symbols:add-circle-outline"} on the trigger panel.

Expand Down
10 changes: 6 additions & 4 deletions content/guides/06.flows/3.triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Any data generated by the event will be nested in the `$trigger`.
- Action (Non-Blocking) — Actions do not block the event. A non-blocking action is mostly useful for
completing tasks in response to an event, without modifying the event or slowing the API.
- **Scope** — Set the types of events that trip this trigger.
- **Collections** — Set the collections whose events trip this trigger.
- **Collections** — Set the collections whose events trip this trigger. Use the search box to find a collection quickly.
- **Response Body** — This is optional and only for "Filter (Blocking)" events. It defines data to replace the
event's original `payload`. Choose to return:
- **Data of Last Operation** — Replaces event `payload` with value from `$last`.
Expand Down Expand Up @@ -141,9 +141,11 @@ The manual trigger must take in item ID(s) before you can click it. On the colle
grayed out until you select some number of items. From the item page, the current item's ID is passed in
automatically. These item IDs are passed in to `$trigger` as an array.

- **Collections** — Choose the Collection(s) to add the button to.
- **Location** — Choose to display the button on the [Item Page](/guides/content/editor),
[Collection Page](/guides/content/explore), or both.
- **Collections** — Choose the Collection(s) to add the button to. Use the search box to find a collection quickly.
- **Location** — Choose where the button appears: the [Item Page](/guides/content/editor),
the [Collection Page](/guides/content/explore), both, or **None (Hidden)**. Choose **None (Hidden)** when the
Flow should not add a button of its own. It can still be run from a [Button Links](/guides/data-model/interfaces#button-links)
interface configured to trigger it.
- **Asynchronous** — Toggle whether the Flow executes asynchronously. If enabled, you can immediately trigger the Flow
again. If not, you must wait for the Flow to complete to use it again.
- **Collection Page (Requires Selection)** — Toggle whether a selection is required in the Collection Page to trigger.
Expand Down
1 change: 1 addition & 0 deletions content/guides/06.flows/4.operations.md
Comment thread
robluton marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ If you are self-hosting Directus, then you need to make sure that email capabili
- **CC** — Email addresses to be copied<sup>[1]</sup>.
- **BCC** — Email addresses to be blind copied<sup>[1]</sup>.
- **Reply To** — The email address replies will be sent to<sup>[1]</sup>.
- **From Name** — The sender name shown to recipients. Defaults to the project name.
- **Type** — The email body format: `WYSIWYG`, `Markdown`, or `Template`.
- **Body** — Available for `WYSIWYG` and `Markdown` types. Use the editor to compose the email content.
- **Template** — Available when the type is set to `Template`. Select the template to use.
Expand Down
58 changes: 58 additions & 0 deletions content/guides/06.flows/5.manage-flows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
stableId: a953ba99-dea5-44a2-8c7b-176180759fe9
title: Manage Flows
description: Organize, find, duplicate, import, and export Flows from the Flows module.
---

Flows have their own module in the module bar. The Flows page lists every Flow in a table with its folder, status, trigger type, name, and description. From here you can organize Flows into folders, search and filter the list, duplicate a Flow, and import and export Flows.

::callout{icon="i-lucide-info"}
Flows used to live in the Settings module. Links to the old location redirect to the Flows module, so existing bookmarks keep working.
::

## Organize Flows into Folders

![The Create Folder dialog on the Flows page](/img/857d4e58-24b5-4a8c-be42-eed011b95164.webp)

The navigation pane on the left lists your folders. **All Flows** is the root and shows every Flow in the project. Selecting a folder shows only the Flows inside it, and the folder is stored in the page URL so you can bookmark or share a link to it.

- **Create a folder** — Select the **Create Folder** button in the header bar and enter a name. The new folder is nested under the folder you currently have open.
- **Rename, move, or delete a folder** — Open the folder's context menu in the navigation pane and select **Rename Folder**, **Move to Folder**, or **Delete Folder**.
- **Move Flows** — Open a Flow's context menu and select **Move to Folder**. To move several Flows at once, select them in the table and use the **Move to Folder** button in the header bar.

::callout{icon="i-lucide-info"}
Deleting a folder never deletes the Flows inside it. Choose **Delete this folder only** to move its subfolders and Flows up to the parent folder, or **Delete this folder and its subfolders** to remove the whole tree and move its Flows to the nearest surviving parent folder. Flows land in **All Flows** only when no parent folder survives.
::

## Search and Filter Flows

![Filtering the Flows table by folder name and status](/img/166bfc26-b9c0-4609-82da-6c7930d226dc.webp)

Use the search box in the header bar to find Flows by name. Select the filter icon to add conditions on Flow fields such as **Status**, **Trigger**, or the folder's **Name**.

## Duplicate a Flow

To copy a Flow together with its trigger configuration and all of its operations, open the Flow's context menu and select **Duplicate Flow**. Enter a name for the copy and select **Duplicate**. The copy is placed in the same folder as the original.

::callout{icon="i-lucide-info"}
A duplicated Flow is always created with an **inactive** status so it will not run until you review and activate it.
::

## Export Flows

![The Flow context menu with the Export Flow option](/img/f8004890-d889-4a24-a168-c1cbb48ee435.webp)

To export a single Flow, open its context menu and select **Export Flow**. To export several Flows at once, select them in the table and use the **Export Flows** button in the header bar. Each export is a JSON file containing the Flow and its operations.

## Import a Flow

![The Import panel in the Flows page sidebar](/img/64dc472d-3846-4d3e-84fa-9bd708096017.webp)

To import a Flow, open the right-hand sidebar and expand **Import**. Choose a JSON file that was previously exported from Directus, then select **Start Import**. If a folder is open when you import, the Flow is placed in that folder.

Directus rejects files that are not valid JSON, files that are not a Flow export, and exports that contain an operation belonging to a different Flow.

::callout{icon="i-lucide-triangle-alert" color="warning"}
**Review an imported Flow before activating it**
An imported Flow is always set to an **inactive** status, so it will not run until you activate it. If it references collections that do not exist in your project, update those operations to use collections that are available.
::
3 changes: 3 additions & 0 deletions content/guides/06.flows/index.md
Comment thread
robluton marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ description: Flows enable custom, event-driven data processing and task automati

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.

Flows live in the **Flows** module in the module bar and are available to users with admin access. See [Manage Flows](/guides/flows/manage-flows) to organize, search, duplicate, import, and export them.

::callout{icon="i-lucide-info"}
Flows run arbitrary code with elevated accountability. See [Security Best Practices](/guides/security/best-practices#flows) for guidance on restricting who can create, edit, or trigger them.
::
Expand All @@ -17,6 +19,7 @@ Flows run arbitrary code with elevated accountability. See [Security Best Practi
- **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.
- **Folder** — Shows which folder holds the flow on the Flows page. This is read-only. A new flow goes into whichever folder you have open when you create it, and you move it afterwards with **Move to Folder**. See [Manage Flows](/guides/flows/manage-flows#organize-flows-into-folders).
- **Activity and Logs Tracking** — Selects whether the flow should be tracked in both the [activity log](/guides/auth/accountability) and the flow's logs, only in the activity log, or neither.

## Logs
Expand Down
2 changes: 1 addition & 1 deletion content/guides/09.extensions/0.overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Extensions execute code inside the Directus server. See [Security Best Practices

![A module in Directus](/img/7db9b50a-d25b-40b1-86dc-3e09dad388bf.webp)

[Modules](/guides/extensions/app-extensions/modules) are top-level areas of the Data Studio, navigated to from the left-hand module bar. They will load at the specified routes. The Data Studio splits up functionality into modules - the content module, the files module, the user module, the insights module, and the settings module. Extensions can add new modules to the Data Studio.
[Modules](/guides/extensions/app-extensions/modules) are top-level areas of the Data Studio, navigated to from the left-hand module bar. They will load at the specified routes. The Data Studio splits up functionality into modules - the content module, the files module, the user module, the insights module, the flows module, and the settings module. Extensions can add new modules to the Data Studio.

### Themes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Modules are top-level areas of the Data Studio, navigated to from the left-hand

![A module in Directus](/img/7db9b50a-d25b-40b1-86dc-3e09dad388bf.webp)

The Data Studio splits up functionality into modules - the content module, the files module, the user module, the insights module, and the settings module. Extensions can add new modules to the Data Studio.
The Data Studio splits up functionality into modules - the content module, the files module, the user module, the insights module, the flows module, and the settings module. Extensions can add new modules to the Data Studio.

::callout{icon="i-lucide-info"}
**Enable the Module**
Expand Down
2 changes: 1 addition & 1 deletion content/guides/10.environment-sync/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The CLI is built to be safe to point at production: `diff` never applies anythin
## What syncs

- **Schema**: every collection, field, and relation, including custom fields on system collections.
- **Configuration**: roles, policies, access, permissions, flows, operations, dashboards, panels, settings, media-library folders, and custom Data Studio translation strings.
- **Configuration**: roles, policies, access, permissions, flows, operations, dashboards, panels, settings, media-library and flow folders, and custom Data Studio translation strings.
- **Opt-in**: user accounts, with every secret field stripped.

Unlike a full schema snapshot, a pull is not all-or-nothing. `--collections posts` narrows which Schema files it overwrites, and resource flags like `--flows` or `--no-schema` choose which Configuration files it touches. That is how you promote finished work from a shared development instance while unfinished work stays out of the sync files entirely. Scope is by collection and resource type, not by individual record. See [Promote only the changes that are ready](/guides/environment-sync/common-workflows#promote-only-the-changes-that-are-ready).
Expand Down
2 changes: 1 addition & 1 deletion content/guides/10.environment-sync/2.how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Scoping narrows what a pull overwrites from the source. Sync files outside the s
The same role or flow carries a different primary key on every instance, so a push has to decide which target record corresponds to each source record before it can update rather than duplicate. Two mechanisms decide, in order:

- **The ID map.** Each push records its decisions in `id_map.json`: this source record corresponds to that target record. Later pushes look there first.
- **Identifying fields.** A record not yet in the map is matched by stable fields: `name` for most named resources, `email` for a user, `flow` plus `key` for an operation, and `language` plus `key` for a translation. Access rules and permissions use their relationship fields. Panels have no such fields, which is why a first push into a look-alike target can duplicate them once.
- **Identifying fields.** A record not yet in the map is matched by stable fields: `name` for most named resources, `name` plus `folder` for a flow, `name` plus `parent` plus `type` for a folder, `email` for a user, `flow` plus `key` for an operation, and `language` plus `key` for a translation. Access rules and permissions use their relationship fields. Panels have no such fields, which is why a first push into a look-alike target can duplicate them once.

For an existing translation, the CLI replaces the source ID with the matching target ID and sends the complete record. Directus 12.2.0 and later accept an import update that repeats that record's current `language` and `key`, so both `merge` and `mirror` can update translation strings. A pair already owned by another translation still fails as a duplicate.

Expand Down
Loading
Loading