Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Webhook do not call my callback URL

Ido June 5, 2020

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?

1 answer

1 accepted

0 votes
Answer accepted
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2020

@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:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271

You can see lots of sample code I have posted to the community over the past year or so here:

https://gist.github.com/iaindooley

Ido June 5, 2020

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..."]

Ido June 6, 2020

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!

Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 6, 2020

@Ido sure thing you can use it for any purpose you like :) glad you like it!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events