Hello folks! I recently set up a nice little system for having internal users submit feature requests using a Google Form, which would automatically create a card in Trello in a triage column, with a label on it. I used this tutorial to build that workflow, and it worked really well...for about a month. Then, without any change on my end, it stopped working. I had my Google Form's script send me daily error reports for anything that failed, and this is what it started sending me:
Request failed for https://api.trello.com/1/cards?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX returned code 401. Truncated server response: invalid token (use muteHttpExceptions option to examine full response) (line 74, file "Code")
(key and token have been redacted, key is 32 characters, token is 64 characters)
It seems very odd that this would be confirmed as working for a month (I submitted at least 10 times, and cards were generated each time), and then suddenly stopped working. I thought perhaps the token expired or something, so I re-generated a new token, but no luck there, it doesn't ever generate a card now.
Any thoughts? I'm stumped! Thanks in advance!
My guess would be that one of the following occurred:
1. The token expired. Do you remember setting "expiration=never" when generating the token?
2. The token was revoked. You can check this by looking at https://trello.com/me/account as the Trello member who you generated the token as. Is the app still there?
3. The member you generated the token as no longer has write access to the board you are trying to create cards on. Perhaps they left or were removed from that board?
If it is either of the first two, the fix will be to create yourself a new token. If it is the third, make sure that member gets added back to the board so they can create cards on it.
Hey Matt, thanks so much for the ideas!
So I checked each of the items that you listed, here's what I came up with:
So...I'm at a loss as to why this isn't working, because it looks like everything is set up properly. The Google Form commits information, it kicks off an e-mail confirming there is a new item, no card is created in Trello, and then I get the error message at the end of the day that I posted above. As far as I can tell, I'm using the write token/key, and they're listed as being active. I also generated a new key and set it to "Never Expire", which I can confirm it is now listed as in my account.
Anything else worth trying? This is a huge savings to my workflow, as otherwise I'm having to manually create cards and then copy over a bunch of data into the details of each card. :(
@Kelly Rush Hmm, I took a second look at the sample app script code, which appears fine.
I'm not terribly familiar with Google Appscript and what the update / deployment process is. Are you sure that any changes you made to update the token were actually deployed and being used? Perhaps those changes haven't been deployed so it is still using the old expired token?
I may be able to help a bit with the above if you can provide me with the app key that you are using (just the key, not the token).
If you had to thrive a new habit during a lockdown, what would it be? Trello
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event