Got a google sheet and Asana doing 2-way synching which is super useful for our process.
Only niggle is having to poll for changes, either fetching with modified_since or by polling Events, though it takes around 20 seconds either way.
Webhooks would be the solution, however, Google Apps Script doesn’t allow access to headers via doPost, so I can’t complete the handshake.
Here’s a post about it: https://stackoverflow.com/questions/41357834/can-i-use-google-apps-script-as-asana-webhooks-endpoint-dopost
Any chance of another way to create the webhooks, as once created I don’t need access to the headers to process the events? E.g. have app.asana (or a standalone app) take the target/resource and create the webhooks? The other workaround in the above post looks painful.
2 Likes
Unfortunately needing to set the header in the response is still the situation so our webhooks don’t work that well with Apps Script. Although they would be faster than events, it’s worth noting that webhooks still take a little time to be delivered, so I’m not sure that you’d get a huge boost in real-time processing with them - in general I’ve seen delays on the order of tens of seconds not be that unusual. That’s maybe a bit of sour grapes, through. If you’d like to get a feel for what sorts of latency you could expect, we have a quick-and-dirty example of implementing webhooks that just logs the payload when received which is available for reference.
In any case, I don’t know of a great workaround for this. We do know that this is an issue and I’ll add this report as a +1 occurrence to the API team’s backlog.
2 Likes