Apps Script Code Examples and Youtube videos New 2023

Apps Script Coding Examples Google Apps Script is a scripting platform that lets you extend Google Workspace by adding custom functionality to your Google Sheets, Docs, Forms, and Gmail.  Google Apps Script is a cloud-based scripting language that provides easy ways to automate tasks across Google products and third-party services. Top Tips for Google Apps … Read more

Apps Script Coding Examples FREE PDF Guide Download Now

Bullet code copy example of how you can copy a bulleted list from one Google Document to another using Google Apps Script: // Function to copy the bulleted list from one document to another function copyBulletedList() {   // Get the source document   const sourceDoc = DocumentApp.getActiveDocument();   // Get the list items from the source document … Read more

Send Doc as HTML email or output to webapp

Send Doc as HTML email or output to webapp Send Doc as HTML email or output to webapp Use the document ID along with a fetch request to the URL to return the web contents as HTML. function getContent() {const url = ‘https://docs.google.com/feeds/download/documents/export/Export?id=’+DOCID+’&exportFormat=html’;const param = {method : ‘get’,headers : {‘Authorization’ : ‘Bearer ‘+ ScriptApp.getOAuthToken()},muteHttpExceptions: true};let … Read more

Google Apps Script PDF maker from Google Doc template.  Send PDFs as Emails

Google Apps Script PDF maker from Google Doc template. Send PDFs as Emails. Setup files and folders 1Add data and set up the template Doc 2Create the Script – Connect to Spreadsheet data 3Get the data from each row within the sheet data 4Select the Google Doc Template 6Populate the Doc with Sheet Data 6Set … Read more

Google Apps Script Coding Examples FREE PDF Downloadable GUIDE

Google Apps Script Quickstart Code Examples Create a Spreadsheet with rows and columns values from a loop 1Use array data to create a spreadsheet and populate the values 3Apps Script UrlFetchApp Get URL Data and output to Web App 3Populate Spreadsheet data from Web API 4How to send data to an endpoint UrlFetchApp POST JSON … Read more

Apps Script Lesson Select Emails using Regex on Doc Body text apply style for highlighting selection

Highlight emails in a Doc using Regex on Doc Body Contents Select all matching results from a Regex for email patterns.  Creates an array of the emails contained in the doc, then applies styling to the email.  Highlight the matching results with a yellow background and black text. function onOpen(){  DocumentApp.getUi()  .createMenu(’emails’)  .addItem(‘Highlight’,’highlighter’)  .addToUi() } … Read more

How to Copy All Images from Doc into your Google Drive apps script blob file creator

Copy All Images from Doc into your Google Drive Example will extract all the images from a Google Doc and make copies of them directly into your Google Drive. function onOpen(){  DocumentApp.getUi()  .createMenu(‘images’)  .addItem(‘creator’,’getImgs’)  .addToUi() } function getImgs(){  const doc = DocumentApp.getActiveDocument();  const body = doc.getBody();  const images = body.getImages();  const id = ‘1mW6Yh2X4wU8A-vQs1Z2RRVHIfHD_SI3u’;  const … Read more

How to Add Images from Drive and the web into Google Doc with Apps Script one click UI menu

Adding images from the web and Drive to Google Docs UI menu item to dynamically add images like logos and others. Press the menu button and add an image. Images can be from Google Drive or from the web. Preselected images within your Doc function onOpen() {  DocumentApp.getUi().createMenu(‘adder’)  .addItem(‘Logo’,’addLogo1′)  .addItem(‘Logo GDrive’,’addLogo2′)  .addItem(‘Svekis’,’addLogo3′)  .addToUi(); } function … Read more

Add Date into Google Doc at cursor Google Apps Script Lesson with Source Code

Add Date into Google Doc at cursor Document Apps Script Example function onOpen() {  const ui = DocumentApp.getUi();  ui.createMenu(‘Adv’)  .addItem(‘Add Date’,’adder’)  .addToUi() } function adder(){  const doc = DocumentApp.getActiveDocument();  const cur = doc.getCursor();  if(cur){    const val = new Date();    const temp = Utilities.formatDate(val,”GMT”, “yyyy-MM-dd”)    const ele = cur.insertText(temp);  } }