Skip to content

Instantly share code, notes, and snippets.

View Jasonhowling's full-sized avatar

Jason Howling Jasonhowling

  • United Kingdom
View GitHub Profile
@Jasonhowling
Jasonhowling / EmailSubjectsToSheets.js
Last active July 1, 2019 15:39
Gmail subject line export to Google Sheets
// This script is used to pull the subject line (ONLY) from Gmail messages into sheets.
// This is handy if you want to count of the amount of emails a set label/filter/search results receives or to gather data from the filter.
// Prerequisites
// 1. You will need to apply a label to the emails within Gmail. You can do this manually or apply a filter. Gmail Advanced search https://support.google.com/mail/answer/7190
// 2. You will need to create a spreadsheet using Google Sheets
// Set the items you are going to use within the script
var SHEET_ID = "PUT THE ID HERE"; // The ID of the sheet - You can get this from the URL
var SHEET_NAME = "PUT THE SHEET NAME HERE"; // The name of the sheet you wish the data to go into
@Jasonhowling
Jasonhowling / SendPDFReport.js
Last active December 8, 2020 06:32
Google Apps Script to email a single sheet as PDF
// Google Apps Script to email a single sheet as PDF
// Primary Function SendReportPDF = Generate and send PDF from a single Google sheet. Build the email body, recipiant list & subject.
// Secondary = Add the Primary function to the Google Sheets Menu.
//----------------------------------------------------------------------------------------\\
// Secondary
// Add a menu option in the Google Sheets GUID called "Reports" with a submenu item called "Send Status"
// When you click on "Send Status" it will run the Primary function SendReportPDF
function onOpen(e) {