Skip to content

Instantly share code, notes, and snippets.

View jmcmurry's full-sized avatar
🛎️

Julie McMurry jmcmurry

🛎️
View GitHub Profile
@jceresearch
jceresearch / gist:5755030
Last active July 6, 2020 06:51
Google Apps Script to create a digest from a set of messages in Gmail. It does a bit more than that, filters by time, strips the html, trims legalese (or whatever) and tags messages so they are not processed again. Ideal to schedule it in gmail.
function GenerateDigest() {
//Function that goes through a search query based on time and optional label in gmail, strips html, collates into a single email, sends it to a desired address and then labels the emails as processed.
// Where the digest email is going
var to_emailAddress = "[email protected]";
//We calculate the 24 hour range, I plan to run this every day at 9:00 to get last 24 hours of emails
var month = new Date().getMonth();
@mogsdad
mogsdad / Apps Script pdfToText utility.md
Last active August 8, 2024 15:21
For http://stackoverflow.com/questions/26613809, a question about getting pdf attachments in gmail as text. I got a little carried away - this does much more than asked.

Google Apps Script pdfToText Utility#

This is a helper function that will convert a given PDF file blob into text, as well as offering options to save the original PDF, intermediate Google Doc, and/or final plain text files. Additionally, the language used for Optical Character Recognition (OCR) may be specified, defaulting to 'en' (English).

Note: Updated 12 May 2015 due to deprecation of DocsList. Thanks to Bruce McPherson for the getDriveFolderFromPath() utility.

    // Start with a Blob object
    var blob = gmailAttchment.getAs(MimeType.PDF);
    
@pierandrea
pierandrea / Apps Script Code - Copy the edit response link from Google Forms entries into a Google Sheet
Last active September 9, 2024 06:46
Google Apps Script code to add Google Form edit response links to spreadsheet
@patrickkunka
patrickkunka / configuration-1.js
Last active November 17, 2022 02:15
Configuration Patterns
/**
* Configuration #1: Basic Configuration Class
*
* A basic example utilising a sealed instance of a configuration
* class, with user-provided options merged in upon instantation
* of the implementation.
*/
class Config {
constructor() {