Getting task details through webhook

I’m trying to create script that automatically captures task updates. I’ve decided to use a webhook and have been following the script in this github repo (link below). The problem is is that when I update a task, it gives the task ID, but nothing about the task, like the name, date, notes, etc. Is there a way to capture data on the task itself other than the GID, or do you create a separate call to get current info for the task?

I’m open to alternatives or other ways of capturing the data. I tried searching the forums but wasn’t able to figure it out. Thanks so much for the help and please let me know if I can make this question more clear

There is not - webhooks are designed to be as lightweight as possible. So yes, as you surmised you’ll need to do follow-up calls to get the info you need.

thanks @Phil_Seeman ! Do you have a way you like to fill in the details of the task? I guess I could do a separate function to send a request for the task details after the hook is received and then send the update to the database. But, if you have an alternative, i’ll happily look at it

It’s hard to answer too specifically without knowing the details of your infrastructure and tech stack. But my advice is to keep your webhook-receiving module as small and lightweight as possible; you could potentially be receiving a ton of webhooks and you want to be able to process them all smoothly.

For me, I use the Microsoft Azure cloud service - I have one Azure Function that receives the webhooks; it puts the incoming events in a queue (actually a set of queues for performance reasons); then I have another Azure Function (or actually a set of them) that responds to the queue and does the actual work of reading the task, performing the appropriate logic, updating the database, etc.

1 Like

Hi Phil,
Can you please share the Azure function details?

I’m trying to download project files (csv) from asana to Azure storage account using Azure functions and later connect them to Power BI. Direct integration has some issues (Auto refresh and credentials issues).

Hi @anon2243204,

I’m afraid I can’t post the code as it’s part of our proprietary Flowsana product. But the Azure function that captures the webhooks is just a standard Azure function with an Http trigger. If you have specific questions about code you’ve written, you can post those and I can probably provide guidance in that way.

Hi Phil,

Thanks for the feedback, I appreciate it.

I want to export the portfolio daily in the form of csv files, I do have the links for the csv files, need to write an Azure function which can place these csv files from asana to Azure storage and from there i will link Power BI to exported files for updating the report.

Thanks