Last active
May 5, 2020 06:08
-
-
Save iaindooley/d5764a26468977f58c394be4fcf2f6ae to your computer and use it in GitHub Desktop.
Create Trello ticket from Webhook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createTrelloTicketFromWebhook(notification) | |
{ | |
var ret = false; | |
try | |
{ | |
//the "notification" here is the Google Apps Script event object: | |
//https://developers.google.com/apps-script/guides/web | |
var msg = JSON.parse(notification.postData.contents); | |
//DO WHATEVER YOU WANT WITH YOUR CODE HERE | |
Card.create(new Trellinator().board("My Jira Synch").findOrCreateList("Inbox from Jira"),msg.name) | |
.setDescription(redactSensitiveContent(msg.description)); | |
} | |
catch(e) | |
{ | |
Trellinator.log("Not for us"); | |
} | |
//RETURN TRUE IF WE PROCESSED THIS, FALSE IF WE DIDN'T | |
//MEANING SOMETHING ELSE SHOULD PROCESS IT | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment