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

Introducing Trellinator: Automate Trello with Google Apps Script

82 comments

Comment

Log in or Sign up to comment
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.
November 19, 2019

@Camiel_Wieme_SA the error "Getting Trello member ID invalid token" means that you haven't pasted your api key and token properly into the configuration sheet. The rest of the errors are caused by that as well.

Camiel_Wieme_SA November 20, 2019

Hi Ian, 

Thanks for helping out. 

I managed to get the helloWorld script working.

Now I'm trying to move on, but it has been a while since I did some programming in Java(script). Are there anymore example of functions and stuff?

I would like to create a script that count the cards with a specific label in a pipeline. So if a pipeline has 5 cards with label "must" and 3 with "nice", I would like to automatically create a card with a sort of report saying:

Must : 5 

Nice: 3

The trigger can be adding a new card or preferably a Butler Board Button. 

Hopefully you can help me again. 

 

regards, 

 

Camiel 

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.
November 20, 2019

@Camiel_Wieme_SA firstly if you want to trigger this with a butler board button, then you'll maybe need to add a label using the button then use that as the trigger to execute your function (then you can remove the label from the function to reset it). You could also use the ExecutionQueue to do a recurring trigger in Trellinator:

https://www.theprocedurepeople.com/trellinator-automate-trello/docs/module-TrellinatorCore.ExecutionQueue.html

There's a reference API for Trellinator:

https://www.theprocedurepeople.com/trellinator-automate-trello/docs/

But if you want to get a feel for how to solve typical problems and a sense of "idiomatic" Trellinator with lots of examples just browse through all the gists I've made while posting comments here on the community, there are hundreds of examples:

https://gist.github.com/iaindooley

With the combination of those examples and the reference documentation you should be able to get a handle on it.

To give you a head start the function to do what you want executed hourly would look like this:

https://gist.github.com/iaindooley/adcdbcda0eaf4c634b9bf4127f445f88

Lucas Fogolin November 28, 2019

Hi there!

@Iain Dooley listen, I'm facing a bit of trouble with a new installation, followed exactly your steps here but keep getting an unknown error, look:

["helloWorld executing from queue...","Error executing function: Exception: Invalid argument: https://api.trello.com/1/tokens/58397c7961017570ed9127475e7055da397cbe3c29e21d06bf9fc71c83e3d0fd\r/member?key=d7678894c4045f2aa42e6e9c81f3e541&token=58397c7961017570ed9127475e7055da397cbe3c29e21d06bf9fc71c83e3d0fd","helloWorld executing from queue...","Error executing function: Exception: Invalid argument: https://api.trello.com/1/tokens/58397c7961017570ed9127475e7055da397cbe3c29e21d06bf9fc71c83e3d0fd\r/member?key=d7678894c4045f2aa42e6e9c81f3e541&token=58397c7961017570ed9127475e7055da397cbe3c29e21d06bf9fc71c83e3d0fd"]

This invalid argument is troubling me. Can you shed any light?

Lucas Fogolin November 28, 2019

Ian, I can't get it to work with a new account. It says invalid argument to very request, even the simplest one, this Hello World example you posted here. Can you help? 

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.
November 28, 2019

@Lucas Fogolin see that "\r" at the end of the token before "/member" in the URL? My guess is wherever you copied the token from snuck a carriage return in there, you just need to delete that from the configuration tab

Lucas Fogolin November 28, 2019

@Iain Dooley actually no, there's no '\' in any part of the key nor the token, but doing some digging In this new account, I realized that,different from my previous one, when I generate the API key the whitelisted URLs do not have the wildcard "*" and I can't add it there. Would, maybe its something to do with this issue? I took a print:
trello.png

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.
November 28, 2019

@Lucas Fogolin that origins thing is only for OAuth2 authorisation flows afaik. It's not relevant to Trellinator setup, I've never used it before. Have a look at this screenshot:

2019-11-29 at 10.35 am.png

Lucas Fogolin November 28, 2019

Yes, I understand what you're saying, but I've checked the keys and they don t have this added there, no '\r'. I've  tried twice, following the setup here from scratch, but it generated the same results both times. Won't you try it from scratch with a new account just so you can see what I'm talking about?

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.
November 28, 2019

@Lucas Fogolin I've set it up from scratch like 6 times today ;) If you share your spreadsheet with iain@benkoboard.com I can take a look for you

Dima_D March 25, 2020

Dear Colleagues, when I try to Initialize utilities I have to give permissions to App, and then I receive notification "sign in with Google is temporarily disabled for that app. This ass has not yet been verified yes with Googe..." Same warning I receive when I publish script as an app.... 

Had anyone experienced that?

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.
March 25, 2020
Like Anne Docytou likes this
Rob Schaerer July 27, 2020

Hey @Iain Dooley , Google has changed the way that they send posts back because currently I'm unable to set up a webhook since GAS is not sending a proper response to the initial webhook initiation.  Is there any insight that you might be able to give on this? I know that the webhook is working b/c I have tested it in postman, and it's not that it's not a permissions issue -- it's just that it's not sending the proper response back.  I have literally tried about everything (almost everything, I'm hoping).  Any insight you might be able to give?

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.
July 27, 2020

@Rob Schaerer this has always been the case and is one of the reasons you need a buffer in between Trello and GAS. GAS doesn't respond to a HEAD request, so the buffer has this nginx config that will do it:

https://github.com/iaindooley/trellinator-buffer/blob/master/nginx_template.txt#L2

Rob Schaerer July 27, 2020

@Iain Dooley I have no idea how I had it set up at one time then -- I actually had it working directly to GAS somehow for a while and then it just stopped.  Thanks for that -- I've been playing around on AWS for a while now, might as well play a bit more.

Sam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 5, 2020

This tutorial is very clear. thanks. 

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.
October 5, 2020

@Sam cool thanks, you're the only one who has ever complimented this tutorial on its clarity ;)

aericio November 17, 2020

@Iain Dooley Hey, this looks really promising. I was looking for something to help me do things that Butler couldn't... like simply counting how many cards are in a list.

Slight issue however, this is what happened after this step:

Now choose “Tools > Script Editor”. Once the Script Editor opens choose “Publish > Deploy as web app”.

image_2020-11-17_013712.png

Any ideas? Would like to add that "Trellinator Utilities > Initialize" worked fine but that's probably unrelated.

Thank you!

Like Anne Docytou likes this
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.
November 17, 2020

@aericio did you see that after publishing the web app and then trying to open the published URL in a web browser? If so, try publishing again -- there seems to be something odd maybe to do with free accounts where the script ID changes the second time you publish it ... sometimes :S it doesn't seem to be consistent and may be a change that crept into GAS since I wrote this article. 

aericio November 18, 2020

@Iain Dooley Neither, that showed up right after I clicked on "Script Editor". Sorry about that, just realized the step I copied was misleading. I was never able to publish.

Here's a video of what happens https://streamable.com/3qr6qi

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.
November 18, 2020

@aericio weird :S Is Apps Script available in other spreadsheets? I'm afraid that's something that looks like a problem with your Google account rather than with Trellinator specifically 

aericio November 18, 2020

@Iain Dooley Yup, it shows up on other spreadsheets. If I click on "Script Editor" on the new sheet, I get the same error...

Anyways, I think I'll just give up and try again in the future. Thanks for your help!

Like Anne Docytou likes this
aericio November 18, 2020

Ah whoops, just realized "Script Editor" is a separate thing from AppSheet lol.

Looks like this is my exact issue. https://support.google.com/docs/thread/13014914?hl=en

aericio November 18, 2020

So I opened up another web browser with only one account signed in and now the "Script Editor" is able to open without any issues. 

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.
November 18, 2020

@aericio ah yes, I've seen that with quite a few of the cloud and drive URLs. For that reason, I never use Google's multiple login feature, I only ever keep separate accounts in entirely separate Google Chrome profiles.

Like Anne Docytou likes this
TAGS
AUG Leaders

Atlassian Community Events