I need to update the title of an item in my app when a user changes it in another view.
I see that there is a method called monday.listen, which takes “event” as an input. This listener gets triggered when a new item is added, or a column value is changed. But it is not fired for other common events like
- Updating the title of an item
- Removing an item
Is there a plan to add these, or an alternative workaround?
The title of an item is not considered a column value, so when it changes it does not emit the “column_value_changed” event.
Instead, you’ll need to poll the API regularly to check if an item’s name was changed. Same for item deletion.
Thank you Bhowmik.
In our case, we have to poll for all the items in a board, and then do a diff with the previous response to see if some item was deleted. Which seems a bit tedious and network intensive. If we have a lot of simultaneous users, we could be hitting our API rate limits easily.
It would be amazing if these two events - title change and item deletion were also a part of the api specification. Hope these could be added in the near future.
Thank you for that feedback!
What about using webhooks? Would that be a possibility for you?
You could create some webhooks in the board. One with the trigger "When an item is deleted, one with the trigger “When an item’s name changes” and maybe one with the trigger “When an item is archived”.
What do you think?
Hey Thanks Matias.
I was not aware about webhooks. But I am a bit confused after watching the video.
Who creates the webhook? - Do we developers create the webhook and bind it to our app, or does the user create a webhook?
Hello again @kranthi_thoughtflow,
Anyone who has access to the board can create the webhook via UI, or you can create it yourself via API.
You will have to have an endpoint on your end that returns the challenge as explained in the article.
Let me know if you have any other questions!
Sounds great @Matias.Monday . I’ll give it a shot
Let us know if you need anything!
Hey @dipro . Wanted to circle back on this.
Since the listen api already exists, this could be extended to all other edit events on the board, like adding a new item, updating item title and deleting an item ( or subitem ).
I understand that title is not a column value. From the perspective of an app developer though, we would like to have a uniform api to listen to all edits or updates on the board. ( this could also include bulk updates )
Thanks for this suggestion! I’m happy to pass this on to our development team for their consideration.