Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create Trello ticket from Webhook
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