Directus
App · 9 actions
Keep your Directus content and data up to date: add items to any collection from forms and other apps, update them or add-or-update one matched by a field such as email, find and read them, and upload files. Start a workflow when an item is added or changed.
Actions
| Action | What it does |
|---|---|
| Create item | Add an item to a collection, such as a blog post, a product or a lead from a form, with a value for each field you fill in. |
| Create or update item | Update the item whose value in the field you match on is the one given, such as a lead with this email address, or add it if there is none, so a workflow that runs twice never adds it twice. |
| Delete file | Delete a file from Directus's file library, for good. |
| Delete item | Delete one item of a collection, for good. |
| Find items | Find the items of a collection whose field matches a value, or that contain some words, sorted the way you choose. |
| Get item | Read one item of a collection by its ID, with its fields. |
| List collections | List the collections the token can see, with each one's fields, their types and the ones a new item must be given. |
| Update item | Change some fields of an item. |
| Upload file | Add a file to Directus's file library, such as an image or a PDF, to put in an item's file or image field with its ID. |
Create item
Add an item to a collection, such as a blog post, a product or a lead from a form, with a value for each field you fill in.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Fields
fieldsobjectRequired - A value for each field to fill in. Fields left blank get their default. For a file or image field, give the ID that Upload file returns; for a related item, its ID.
Outputs
collectiontext- The collection it's in, such as posts
idtext- The item's ID (its primary key), as text
itemobject- The item's fields and values, by field name, such as {"id": 12, "title": "Hello", "status": "published"}
linktext- Where to open it in the Directus Data Studio
Example output
{
"collection": "posts",
"id": "12",
"item": {
"body": "Written by a workflow.",
"date_created": "2026-11-05T10:00:00.000Z",
"date_updated": null,
"id": 12,
"status": "published",
"title": "Hello from Lodol"
},
"link": "https://example.directus.app/admin/content/posts/12"
}Create or update item
Update the item whose value in the field you match on is the one given, such as a lead with this email address, or add it if there is none, so a workflow that runs twice never adds it twice.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Match on
match_fieldtextRequired - The field that tells items apart, such as email. Give its value in Fields; its values should be unique.
- Fields
fieldsobjectRequired - A value for each field to fill in, including the one to match on. An existing item keeps the fields left blank. For a file or image field, give the ID that Upload file returns; for a related item, its ID.
Outputs
collectiontext- The collection it's in, such as posts
createdtrue/false- True if the item was added, false if an existing one was updated
idtext- The item's ID (its primary key), as text
itemobject- The item's fields and values, by field name, such as {"id": 12, "title": "Hello", "status": "published"}
linktext- Where to open it in the Directus Data Studio
Example output
{
"collection": "posts",
"created": true,
"id": "12",
"item": {
"body": "Written by a workflow.",
"date_created": "2026-11-05T10:00:00.000Z",
"date_updated": null,
"id": 12,
"status": "published",
"title": "Hello from Lodol"
},
"link": "https://example.directus.app/admin/content/posts/12"
}Delete file
Delete a file from Directus's file library, for good.
Inputs
- File ID
file_idtextRequired - The file's ID, from Upload file or an item's file field, or its link copied from the file library.
Outputs
deletedtrue/false- True once the file is deleted
idtext- The deleted file's ID
Example output
{
"deleted": true,
"id": "8cbb43fe-4cdf-4991-8352-c461779cec02"
}Delete item
Delete one item of a collection, for good.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Item ID
item_idtextRequired - The item's ID, such as 12, from the trigger or another Directus step, or a link to the item copied from the Data Studio.
Outputs
collectiontext- The collection it was in
deletedtrue/false- True once the item is deleted
idtext- The deleted item's ID
Example output
{
"collection": "posts",
"deleted": true,
"id": "12"
}Find items
Find the items of a collection whose field matches a value, or that contain some words, sorted the way you choose. Leave the filter blank to list them all, a page at a time.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Filter by field
filter_fieldtext - Only items whose value in this field passes the filter. A related item's field can be named with a dot, such as author.email.
- Filter
filter_operatortext - How the field's value is compared. Contains ignores upper and lower case.One of:
equals,not_equals(Does not equal),contains,greater_than(Greater than),at_least(Greater than or equal to),less_than(Less than),at_most(Less than or equal to),one_of(Is one of),empty(Is empty),not_empty(Is not empty). Default:equals. - Filter value
filter_valuetext - The value to compare with. For Is one of, give the values separated by commas.Only when Filter is Equals, Does not equal, Contains, Greater than, Greater than or equal to, Less than, Less than or equal to or Is one of.
- Advanced filter
advanced_filtertext - A Directus filter in JSON, for several conditions at once, such as {"status": {"_eq": "published"}, "views": {"_gt": 100}}. Used together with Filter by field.
- Search
searchtext - Only items with these words in any of their text fields.
- Sort by
sort_fieldtext - The field to sort the items by. Leave blank for the collection's own order.
- Newest or highest first
descendingtrue/false - Sort from highest to lowest (newest first, Z to A).Default:
false. - How many
limitnumber - The most items to return, up to 1000. Defaults to 100.From 1 to 1000.
- Page
pagenumber - Which page of results to return, starting at 1.At least 1.
- Fields to return
return_fieldslist - Return only these fields. Leave empty for all of them. A related item's field can be named with a dot, such as author.first_name.
Outputs
collectiontext- The collection searched
countnumber- How many items are listed
idslist- The IDs of the items listed, as text
itemslist- The items that match, each with its fields by name
totalnumber- How many items match in all, across every page
Example output
{
"collection": "posts",
"count": 1,
"ids": [
"12"
],
"items": [
{
"body": "Written by a workflow.",
"date_created": "2026-11-05T10:00:00.000Z",
"date_updated": null,
"id": 12,
"status": "published",
"title": "Hello from Lodol"
}
],
"total": 1
}Get item
Read one item of a collection by its ID, with its fields.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Item ID
item_idtextRequired - The item's ID, such as 12, from the trigger or another Directus step, or a link to the item copied from the Data Studio.
- Fields to return
return_fieldslist - Return only these fields. Leave empty for all of them. A related item's field can be named with a dot, such as author.first_name.
Outputs
collectiontext- The collection it's in, such as posts
idtext- The item's ID (its primary key), as text
itemobject- The item's fields and values, by field name, such as {"id": 12, "title": "Hello", "status": "published"}
linktext- Where to open it in the Directus Data Studio
Example output
{
"collection": "posts",
"id": "12",
"item": {
"body": "Written by a workflow.",
"date_created": "2026-11-05T10:00:00.000Z",
"date_updated": null,
"id": 12,
"status": "published",
"title": "Hello from Lodol"
},
"link": "https://example.directus.app/admin/content/posts/12"
}List collections
List the collections the token can see, with each one's fields, their types and the ones a new item must be given.
Inputs
None.
Outputs
collectionslist- The collections the token can see
countnumber- How many collections there are
Example output
{
"collections": [
{
"collection": "posts",
"created_field": "date_created",
"fields": [
{
"field": "id",
"required": false,
"type": "integer",
"writable": false
},
{
"field": "title",
"required": true,
"type": "string",
"writable": true
},
{
"field": "date_created",
"required": false,
"type": "timestamp",
"writable": false
}
],
"name": "Posts",
"note": "Blog posts",
"primary_key": "id",
"required_fields": [
"title"
],
"singleton": false,
"updated_field": ""
}
],
"count": 1
}Update item
Change some fields of an item. Fields left blank keep their value.
Inputs
- Collection
collectiontextRequired - The collection to work with, such as posts. Pick it from the list, or type its name or paste a link to it from the Data Studio.
- Item ID
item_idtextRequired - The item's ID, such as 12, from the trigger or another Directus step, or a link to the item copied from the Data Studio.
- Fields
fieldsobjectRequired - The new value for each field to change. Fields left blank keep their value. For a file or image field, give the ID that Upload file returns; for a related item, its ID.
Outputs
collectiontext- The collection it's in, such as posts
idtext- The item's ID (its primary key), as text
itemobject- The item's fields and values, by field name, such as {"id": 12, "title": "Hello", "status": "published"}
linktext- Where to open it in the Directus Data Studio
Example output
{
"collection": "posts",
"id": "12",
"item": {
"body": "Written by a workflow.",
"date_created": "2026-11-05T10:00:00.000Z",
"date_updated": null,
"id": 12,
"status": "published",
"title": "Hello from Lodol"
},
"link": "https://example.directus.app/admin/content/posts/12"
}Upload file
Add a file to Directus's file library, such as an image or a PDF, to put in an item's file or image field with its ID.
Inputs
- File
filetextRequired - The file: upload one, pick one from an earlier step, or give a public https link to download.
- Title
titletext - What the file is called in the library. Defaults to one made from its name.
- Folder
foldertext - The library folder to put it in. Leave blank for the top of the library.
Outputs
asset_urltext- Its address for download; needs a token unless the Public role may read files
filenametext- The name it downloads as
foldertext- The ID of the folder it's in; empty for the top of the library
heightnumber- An image's height in pixels; 0 for other files
idtext- The file's ID; put it in a file or image field to attach it
linktext- Where to open it in the Data Studio's file library
sizenumber- Its size in bytes
titletext- The file's title
typetext- Its type, such as image/png or application/pdf
uploaded_ontext- When it was uploaded (ISO 8601)
widthnumber- An image's width in pixels; 0 for other files
Example output
{
"asset_url": "https://example.directus.app/assets/8cbb43fe-4cdf-4991-8352-c461779cec02",
"filename": "invoice-1042.pdf",
"folder": "",
"height": 0,
"id": "8cbb43fe-4cdf-4991-8352-c461779cec02",
"link": "https://example.directus.app/admin/files/8cbb43fe-4cdf-4991-8352-c461779cec02",
"size": 48213,
"title": "Invoice 1042",
"type": "application/pdf",
"uploaded_on": "2026-11-05T10:00:00.000Z",
"width": 0
}