I have created Webhook and confirmed the ID by
https://trello.com/1/tokens/{token}/webhooks/
Board ID is identical with my board.
Callback URL is GAS (anyone, even anonymous) and my Web form can successfully post to the URL, then doPost is executed.
But, card modification or moving in Trello seems not to call the URL.
What kind of causes can you think of?
Or, Webhook is not available in free plan?
@Ido the problem is that GAS doesn't respond correctly to the HEAD request that the Trello API sends to verify that the link is active. I have this forwarder/buffer sitting in front of GAS, you can see my nginx config there:
https://github.com/iaindooley/trellinator-buffer
Also note that Trello sends LOTS AND LOTS of notifications, and GAS can't cope, it just starts dropping requests and becomes unresponsive, so the buffer I built above uses a NodeJS script to receive the notifications and dump them onto a beanstalkd queue, then a separate PHP worker picks them up and drip feeds them to GAS with a maximum number of concurrent connections.
https://github.com/iaindooley/trellinator-buffer/blob/master/gas_buffer.php#L9
If you're building Trello automations in GAS, you might like to start with Trellinator, since it's open source and makes the API very "butler-like" given the fact that I built it to replace ButlerBot for about 1800 commands I had delivered for my clients:
You can see lots of sample code I have posted to the community over the past year or so here:
Thank you for your reply.
I have understood that HEAD request is problem.
I installed Trellinator and confirmed that Trello API calls Webhook in InfoLog sheet.
Trellinator fits my purpose and I would like to use it.
I can get my board list as each sheet and put helloWorld in A2.
But, it does not work.
The log says
["Examining Notification: [ID1-commentCard]","Yes, this is a board level notification...","Processing notification for board: Test Board [ID2]","executing realtime function: helloWorld","Test Board [ID2]helloWorld\nID3","Now coming to Global Commands..."]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Although I don't know why helloWorld did not work, I tried to post message to Teams when card is moved to another list.
Finally, I succeeded in posting the names of card and lists to Teams using your following script in Document and my script.
var notif = new Notification(posted); var card = notif.movedCard(new RegExp("Done.*")); var from = notif.listBefore().name(); var to = notif.listAfter().name(); card.postComment(from+" to "+to);
Trellinator is very useful! I'd like to use this for various purpose.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ido sure thing you can use it for any purpose you like :) glad you like it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.