Skip to content

Instantly share code, notes, and snippets.

View MacMillanSearch's full-sized avatar

Michael MacMillan MacMillanSearch

View GitHub Profile
@MacMillanSearch
MacMillanSearch / adding_stat_reports_to_google_sheets.js
Last active December 12, 2022 16:21
Adding Stat Reports to Google Sheets using App Scripts
//menu
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Manual Update')
.addItem('Import Keywords', 'importKws')//Copy to add additional functions
.addToUi();
}
var SEARCH_QUERY = "from:noreply@getstat.com subject:Download your STAT report: " //stat report email address and subject
var COMPANY_NAME = "MacMillan Search" //company name variable that we put in parentheses when we create the report in Stat
@MacMillanSearch
MacMillanSearch / gist:ee777120b8b76083b02e6d1adcf19c6a
Last active February 21, 2024 20:32
Automated SERP Info Updater for Google Sheets
// You must set SerpAPI private API Key
// https://serpapi.com/dashboard
var api_key = "YOUR_SERPAPI_KEY_HERE"; // Replace with your actual SerpAPI key
var fixedDomain = 'example.com'; // Replace with your domain
var fixedLocation = 'United States'; // Replace with your location
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Create a menu with a name (e.g., 'SERP Update')
@MacMillanSearch
MacMillanSearch / gist:0f69e4f835e235934e030c6e916cc086
Created February 27, 2024 15:02
Google Sheets Extract the Top 3 results Title
var api_key = "YOUR_SERPAPI_KEY_HERE"; // Replace with your actual SerpAPI key
var fixedLocation = 'United States'; // Replace with your location
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('SERP Update')
.addItem('Update SERP Info', 'updateSerpInfo')
.addToUi();
}