The webhook for tasks with a tag is incredibly useful, but I still have several client implementations that would hugely benefit from webhooks for milestone creation. I understand the avoidance of webhooks for task creation because of the sheer volume and the strain on the API and the cost of maintaining such a webhook.
However, milestone webhooks seem to make a lot of sense, just like tag webhooks. What are the magic words to say here in the dev forum to rally the support this needs to get some momentum?
Most will quickly realize Iām not a developer, so Iām not sure whether webhook was the right thing to be looking for. My point, to be more explicit, is that integromat can list all tasks that fit any of the following criteria:
tasks from a specific project
tasks from a specific project and section
tasks assigned to a specific person
tasks with a specific tag
It canāt list all tasks (and I know that would be a massive API burden). What I do want it to do though is to be able to list all milestones, which I figure would be very similar to listing all tasks with a specific tag.
Anyway, just wanted to clarify because I think webhooks fire when specific triggers happen, and since Iām saying I need it to list āall tasks marked as a milestoneā, itās probably an API functionality question rather than merely a webhook question.
@Phil_Seeman - am I making any sense? Someday Iāll be able to carry on a coherent conversation with the development community. Until then, any pointers to clarify what Iām trying to say would be amazing.
Your Integromat has āanotherā trigger, and inside the actions you want to be able to list milestones? If yes, I could give you the code to do a search request to the API to get the milestones.
OR you want each new milestone created to trigger your Integromat?
@Bastien_Siebman -
Actually, I have two different integromat scenarios.
On one of them, I need it to trigger when any milestone is created anywhere in the workspace/organization. So, if I understand correctly, that would need to be a webhook.
On the other one, I need to be able to run an automation to list all milestones. Ideally, I do not want to list all tasks and then have integromat filter for which ones are milestones (that will cost me a lot more in Integromat). Is it possible to list all milestones across a whole account?
First thing to understand is that there is no āmilestoneā object in Asana; a milestone is simply a task with a particular field (the resource_subtype field) set to a value of milestone instead of a value of default_task.
Now on to your scenariosā¦
Per my above initial comment, the only way to catch milestones is to set a webhook for tasks, and then check the resource_subtype of the task to see if its milestone.
You can only set task webhooks on a per-project basis, not for the whole organization, so youād have to have a webhook created for each project in the organization.
As you mentioned, itās not a very efficient process, but thatās what we have to work with.
Since I donāt know Integromat, I canāt comment on how you might solve this need with them. But they have the same set of tools to work with as Iāve described here.
I think @Bastien_Siebmanās idea of using the Search API is a good one. But again, I realize you have the constraints of Integromat to work with, so it would probably have to be something that they support.
When making this work with Integromat, you would utilize the āWatch Webhook Eventsā trigger
(you can check out the Asana integration page to see all the triggers and actions, btw).
The āmilestoneā would then be visible in the resource_subtype bit of the task webhook: