New Trello map created / modified for google sheets

Trello provides an api that can be integrated into google scripts so that if something happens in the spreadsheet we can create / modify cards in the respective boards. Also zapier provides similar integration.

But is the opposite possible? that is, if any new map is created or modified, it will be pushed to the google page.

I couldn't find them in the api if they have some kind of listener listening on the created / modified map event (please correct me if I'm wrong). So thought alternative ways to do the same.

+3


source to share


2 answers


Here's a workaround:



  • In the Script Application Editor, open the Publish menu and select Deploy As Web Application.
  • Install Who has access to the application to anyone (this restricts it to those who are logged in, i.e. Trello is not logged in).
  • Add webhook (it will be successful now).
  • Go back to step 2 and this time install it to everyone, even anonymous
+2


source


Google Apps scripts can be published as webapps. You can use the built-in functions doGet () and doPost () to receive GET and POST events to your webapp. I haven't set up Trello specifically, but I am using this to set up a webhook for github.

Below are the docs on publishing your script as a web app
https://developers.google.com/apps-script/guides/web

The docs state that you should return an htmlService or contentService object from doPost () or doGet (). Most web sites look for a response code, you can simply return 200; This works great.



Note. Lack of access to the message body in documents.

function doPost(e){
 var postBody = e.postData.getDataAsString();
 // Do something with the postBody Data
 return 200;
}

      

0


source







All Articles