Changing item status if name conatins (external variable)

i want to change an item`s status if it contains a variable that i am getting from external source. is it possible?
how to write the query with the variable?

this is my query which works but i need it as i mentioned above.

x = ‘mutation {change_simple_column_value (board_id: 2827196132, item_id: {id_num}, column_id: “status3”, value: “Paid”) {id}}’

y = x.format(id_num = item_id_from_coda)# i tried using .format which does not works.

data = {‘query’:y}


Hello @roy-zomet and welcome to the community!

I hope you like it here :muscle:

If I understand correctly, you need to change the status of an item ONLY IF the current status is a specific status like “DONE”.

You would have to send a query checking the status for that item, and then if that status contains the variable, you send the mutation to change it.

Your query could be something like this:

  boards(ids: 1234567890) {
    items(ids: 1122334455) {
      column_values(ids: "status3") {