Execute board automations on items created using the API

Hi there, whenever I create a item within a board the automations will automatically execute. But if I use the API to add a new item, the automations won’t be executed at all.

Is there a way to run the automations when adding a new item using the API?

Kind regards,

Rik

This shouldn’t be true. When an item is created with the API it should still trigger automations to run - and did so when I tested just now.

1 Like

Thank you for helping me.

To clarify my case:
I have created a board with two groups. These groups are “Aanwezig” (present) and “Afwezig” (out of office). To make it easier for my employees to change groups and also to automatically write the date since the last group change, I’ve created an addtional column called “Status” and an automation.

The “Status” column contains the same values as the titles of the groups (“Aanwezig” & “Afwezig”)).

The automation detects the change of the “Status” column and moves it into the appropiate group.

I use this JSON body to send my API request:

{
  "query": "mutation {create_item (board_id: {{CURRENT_BOARD}}, group_id: \"topics\", item_name:\"Item naam\", column_values: \"{ \\\"tekst9\\\": \\\"1\\\", \\\"status\\\": \\\"Afwezig\\\" }\" ){id}}"
}

What is remarkable is that if I send this query it should put it first into the “Aanwezig” group (which has the ID ‘topics’). The automation should afterwards see that the value of the “Status” column is “Afwezig”. But it doesn’t:

2 Likes

hi @BlueTiger2002

Those labels looks “erg Nederlands” :slight_smile: to me. I will answer in English though. What is happening is that you create an item with column values (in one go). This does not trigger a column change on the status column. You could argue about this but in monday’s point of view the status column is not changed (as it was not there at all).

You experience exactly the same when you create an item through the monday forms. This will also NOT trigger on the status column change for the same reason.

The recommended approach is to have a second (and in your case a third) automation like this:

2 Likes

Hi Bas, thank you for helping me. This clarifies the problem I’m facing. We will probably use insert the new item and change its column value afterwards using a second call.

Thank you fellow countryman!

1 Like