[RELEASED] Use result of a query as a parameter for another

Hi, I have just begun creating queries with the monday API. I know how to create a subitem. I also know how to search for an item by it’s column value, but I don’t understand how to put them together.

Create a subitem :

mutation {
create_subitem (parent_item_id: 1160322847, item_name: “omg i created a subitem”) {
board {

Search by column value (email) :

query {
items_by_column_values (board_id: 1160277700, column_id: “email”, column_value: “email@whatever.com”) {

Now I would like to put the two together. Search for an item by the column value (email), and they create a subitem for that very item. How do I merge the two codes ? Thank you !

Hi @mildorviolon!

Ahh yes, this is the age-old question that we get very often.

At this time, I’m afraid that the only way to “match” the two up would be to do so on your end, manually. I know that some of our other developers who utilize monday apps framework will come up with a function on their backend to do this matching (using the subitem id).

I know that this perhaps isn’t the answer you were hoping for, but this is something our developers are aware of and are actively working to implement.

I actually found a way to do that. I was accessing the API from Zapier and realised that I can use the webhook output value to pass it along and insert in the second query because Zapier stores the result of a query inside a kind of variable. So yeah thanks, but accessing the API with Zapier’s webhooks has just completly opened up possibilities for me, much more than the Monday-Zapier integration which is still pretty awesome :slight_smile:

1 Like

Hey @mildorviolon,

I’m glad you were able to find a solution that seems to make sense for you :slight_smile: That’s pretty awsome and I’m happy to hear that our Zapier integration is working well for you in this case.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hi @mildorviolon,

Happy to update that we recently released the parent_item field when querying subitems that should help here!

1 Like