WebHooks with vital info

27 views
Skip to first unread message

Jed Wood

unread,
Mar 28, 2014, 6:52:37 PM3/28/14
to slac...@googlegroups.com
I've already made this request via the app support, but I got such a great and timely response to my last request on this list I though I should cross-post it here. :) Also, perhaps I can save other API users some headaches.

In my current app, I need to know every time a file is uploaded or a comment is made. Unfortunately, the information that's contained in the WebHook POST for each of those two cases is really thin. I can't even tell which is which. I just have to check if there's a "text" attribute. If not, then I assume it's not a normal chat message and my app calls "get the most recent comments" AND "get the most recent file uploads." It then matches those results against what I've already saved in the database, and grabs what I don't already have. To make matters worse, there can sometimes be a really long delay (I've seen 20 minutes) between when I get that WebHook to when the file shows up in the files.list call. So in addition to checking as soon as I get the WebHook, I run the checking script every minute. Yuck.

If the WebHook for uploaded files contained the file info, and if the WebHook for a comment contained the comment info, everything would be peachy.

Thanks,
-Jed
Reply all
Reply to author
Forward
0 new messages