How to use the Gmail API, OAuth2 for Apps Script, and Domain-Wide Delegation to set email signatures for users in a G Suite domain

This method uses the Gmail API, the OAuth2 for Apps Script library, and “Domain-wide Delegation of Authority”, which is a way for G Suite admins to make API calls on behalf of users within their domain. Step 1: Make sure the OAuth2 For Apps Script library is added to your project. Step 2: Set up … Read more

A Script to Simplify Creating a SO Table

This code allows you to copy data from your spreadsheet, redact it, align each column independently and then post it in to SO with the appropriate markdown to make a nice looking table. The Code: redact.gs: function onOpen() { menu(); } function menu() { SpreadsheetApp.getUi().createMenu(‘My Tools’) .addItem(‘Authenticate’,’authenticate’) .addItem(‘Redactable Table’,’showRedactTableDialog’) .addToUi(); } function authenticate() { //no … Read more

How do I communicate a page(modal dialog) with its sibling (sidebar)?

Perhaps it’s not really its parent and that’s the reason for it not working. Right – there isn’t actually a DOM parent / child relationship in play here. Both the sidebar and the modal dialog were launched from server-side scripts, and are independent. They can both communicate with the server, though, so you can use … Read more