How to update multiple items in a Directus flow, with different values for each item?

372 Views Asked by At

I've created a simple Directus flow:

  1. Trigger is items.update for collection invoice
  2. Operation is update data in the same invoice collection

As a payload I have (note the array):

[
  {
    "id": 16,
    "temp": 16
  }
]

This sound strange but it's only for testing purposes. I want to update multiple items for the same trigger, each item with it's own data. In the future, that array will be computed by another operation.

The above payload won't work. Field temp isn't set for that invoice.

enter image description here

1

There are 1 best solutions below

0
On

We can update multiple items through flows. You can use patch option in the flows. For more details, please check the following link which has example.

https://github.com/directus/directus/discussions/16258#discussioncomment-7653287