Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created August 27, 2020 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/8bb2658201b23f43ac58efa143fe7c18 to your computer and use it in GitHub Desktop.
Save iaindooley/8bb2658201b23f43ac58efa143fe7c18 to your computer and use it in GitHub Desktop.
Add image to word doc
function addImageToWordDocument(notification)
{
var moved = new Notification(notification).movedCard("Choose Image");
var current = moved.board().currentDocument().attachments().first().link();//link to a Google Doc
addImageToGoogleDoc(moved,current)
}
function addImageToGoogleDoc(from_card,doclink)
{
var doc = Trellinator.getFileByURL(doclink);
//not sure of this exact syntax, but something like this
doc.getBody().appendImage(Trellinator.downloadFileToGoogleDrive(from_card.attachments().first().link()).getBlob());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment