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

ActionWhat it does
Create itemAdd 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 itemUpdate 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 fileDelete a file from Directus's file library, for good.
Delete itemDelete one item of a collection, for good.
Find itemsFind the items of a collection whose field matches a value, or that contain some words, sorted the way you choose.
Get itemRead one item of a collection by its ID, with its fields.
List collectionsList the collections the token can see, with each one's fields, their types and the ones a new item must be given.
Update itemChange some fields of an item.
Upload fileAdd 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

CollectioncollectiontextRequired
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.
FieldsfieldsobjectRequired
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

CollectioncollectiontextRequired
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 onmatch_fieldtextRequired
The field that tells items apart, such as email. Give its value in Fields; its values should be unique.
FieldsfieldsobjectRequired
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 IDfile_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

CollectioncollectiontextRequired
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 IDitem_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

CollectioncollectiontextRequired
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 fieldfilter_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.
Filterfilter_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 valuefilter_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 filteradvanced_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.
Searchsearchtext
Only items with these words in any of their text fields.
Sort bysort_fieldtext
The field to sort the items by. Leave blank for the collection's own order.
Newest or highest firstdescendingtrue/false
Sort from highest to lowest (newest first, Z to A).Default: false.
How manylimitnumber
The most items to return, up to 1000. Defaults to 100.From 1 to 1000.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Fields to returnreturn_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

CollectioncollectiontextRequired
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 IDitem_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 returnreturn_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

CollectioncollectiontextRequired
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 IDitem_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.
FieldsfieldsobjectRequired
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

FilefiletextRequired
The file: upload one, pick one from an earlier step, or give a public https link to download.
Titletitletext
What the file is called in the library. Defaults to one made from its name.
Folderfoldertext
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
}

On this page