Skip to content

Instantly share code, notes, and snippets.

@acurtis517
acurtis517 / cbl.js
Created June 18, 2025 14:58 — forked from patt0/cbl.js
ContinuousBatchLibrary is a Google Apps Script library that manages large batches and works around the 5 minute limitation of GAS execution. It does this by setting time based triggers in the future as well as memorising the last processed key in the batch in order to restart from the correct position. At the end of the batch a cleanup function …
/**
* --- Continous Execution Library ---
*
* Copyright (c) 2013 Patrick Martinent
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@acurtis517
acurtis517 / submit.md
Created May 15, 2025 12:47 — forked from tanaikech/submit.md
Uploading Multiple Files From Local To Google Drive using Google Apps Script

Uploading Multiple Files From Local To Google Drive using Google Apps Script

This is a sample script for uploading multiple files from local PC to Google Drive using Google Apps Script. The dialog, sidebar and Web Apps can be used as the GUI interface.

Sample 1

In this sample, the following flow is run.

  1. Select files at browser.
  2. Upload the files every file.
  3. Save each file in Google Drive.
@acurtis517
acurtis517 / appsScript_ListFilesFolders_ver.2.js
Created April 21, 2025 00:16 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tanaikech
tanaikech / submit.md
Last active October 22, 2025 11:44
Executing Google Apps Script with Service Account

Executing Google Apps Script with Service Account

Abstract

One day, you might have a situation where it is required to run Google Apps Script using the service account. Unfortunately, in the current stage, Google Apps Script cannot be directly run with the service account because of the current specification. So, this report introduces a workaround for executing Google Apps Script using the service account.

Introduction

@mhawksey
mhawksey / Method1.gs
Created February 17, 2023 09:07
Google Apps Script methods for generating Google My Drive report.
// @OnlyCurrentDoc
const FOLDER_ID = 'YOUR_FOLDER_ID'; // OR 'root' if you want your entire My Drive
/**
* Method One: Using built-in DriveApp / file iterator
*/
function generateFolderFilesDriveApp() {
try {
const folderId = FOLDER_ID;
const parentFolder = (folderId === 'root') ? DriveApp.getRootFolder() : DriveApp.getFolderById(folderId);
@unrevised6419
unrevised6419 / bookmarks-to-notion.js
Last active March 26, 2025 04:06
Export bookmarks to Notion as a Database
(function bookmarksExportToCsv() {
/**
* 1. Export bookmarks from browser (supported any Chromium based browsers and Safari) (chrome://bookmarks)
* 2. Open exported html file again in the browser
* 3. Copy paste this entire file in console, and execute it (hit enter)
* 4. You will be prompted to save a CSV file. Save it.
* 5. Open Notion. Click Import -> CSV
* 6. Select saved CSV file. Wait for import
* 7. You have a new database with all your bookmarks
*/
@brucebentley
brucebentley / Userscript Utilities.md
Last active August 9, 2025 15:18
Utilities used by my ever growing library of userscripts.
@alquanna
alquanna / CopyPaste-GoogleAppsScript
Created April 11, 2020 13:56
A Google Apps script for copy-pasting. Copy the contents of all sheets (tabs) inside one Google Sheets file, then paste them all in one sheet. Useful for consolidating the contents of different tabs.
/**
A Google Apps script for consolidating data from different sheets
Basically, this scripts copies the contents from all sheets/tabs in a Google Sheet file, then consolidates all data in one tab: CombinedShet
Created by Clara - claracommutes.com :)
Important note:
1. Before using this Google Apps script, make sure that you have a sheet named CombinedSheet in your Google Sheet. This is where the script will consolidate all the data from all the other sheets.
2. CombinedSheet should be the last/rightmost tab in your Google Sheet file.
@dsottimano
dsottimano / gist:b7432b226187a953734c318db3742fa1
Last active April 27, 2025 05:09
URL Parser for Apps Script
//functions to parse URLs adapted for easy usage in apps script
//past the code below in the tools > script editor of any google sheet
//call the PARSE_URI() formula directly from a cell
// PARSE_URI 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
//adapted for apps script by @dsottimano
@konard
konard / duplicates-remove.js
Created April 24, 2019 18:07
Duplicates removal script for "Bookmarks clean up" chrome extension
var duplicates = document.querySelectorAll("div.duplicate");
var i = 0;
setInterval(function() {
if(i < duplicates.length)
{
var firstButton = duplicates[i].children[1].children[0].children[0].children[0];
var deleteButton = duplicates[i].children[0].children[1];
firstButton.click();