Skip to content

Instantly share code, notes, and snippets.

View prasanthmj's full-sized avatar

Prasanth Janardhanan prasanthmj

View GitHub Profile
@prasanthmj
prasanthmj / entry-client.js
Last active August 12, 2019 11:48
Simple Vue SSR without Vuex and Router.
import Vue from 'vue';
import { createApp } from './main.js';
const app = createApp();
app.$mount('#app');
@prasanthmj
prasanthmj / messages.html
Last active January 29, 2024 17:50
Parse and extract data from Gmail to Google Sheet. Read full article here: http://blog.gsmart.in/parse-and-extract-data-from-gmail-to-google-sheets/
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<title>Message Display Test</title>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<body style="padding:3em;">
<h1>Messages</h1>
<ul>
@prasanthmj
prasanthmj / apps-script-form-example.js
Created May 9, 2019 10:38
Show a form in Google Sheet and collect input from the form. Read full article here: http://blog.gsmart.in/google-apps-script-html-form/
function onOpen()
{
var ui = SpreadsheetApp.getUi();
ui.createMenu('Form')
.addItem('add Item', 'addItem')
.addToUi();
}
function addItem()
{
@prasanthmj
prasanthmj / google-apps-script-send-email-attachment.js
Created May 9, 2019 08:38
Send emails with attachment from a Google Sheet using Google Apps Script. Read full article here: http://blog.gsmart.in/google-apps-script-send-email-with-attachment/
function onOpen()
{
var ui = SpreadsheetApp.getUi();
ui.createMenu('Automation')
.addItem('send PDF Form', 'sendPDFForm')
.addItem('send to all', 'sendFormToAll')
.addToUi();
}
function sendPDFForm()
@prasanthmj
prasanthmj / google-sheets-send-email-based-on-date.js
Created May 4, 2019 07:29
Send emails from a google sheet when a due date is crossed (overdue invoices for example) article: http://blog.gsmart.in/google-sheets-send-email-based-on-date/
function onOpen()
{
var ui = SpreadsheetApp.getUi();
ui.createMenu('Invoice')
.addItem('mark Overdue', 'doOverdueCheck')
.addItem('show Overdue Info', 'showOverDueInfo')
.addItem('send Emails', 'sendOverdueEmails')
.addToUi();
}
function onOpen()
{
var ui = SpreadsheetApp.getUi();
ui.createMenu('Process')
.addItem('Approve', 'doApprove')
.addToUi();
}
function doApprove()
{
@prasanthmj
prasanthmj / get-cell-value.js
Created April 27, 2019 05:28
How to get cell value in Google Sheets using apps script. See article here: http://blog.gsmart.in/google-sheet-script-get-cell-value/
function onOpen()
{
var ui = SpreadsheetApp.getUi();
ui.createMenu('GetValues')
.addItem('get current', 'getCurrentCellValue')
.addItem('get by row col', 'getByRowAndColumn')
.addItem('get by address a1', 'getByCellAddressA1Notation')
.addToUi();
@prasanthmj
prasanthmj / addcontacts.js
Last active December 23, 2019 01:15
Apps script sample adding contacts from google sheets
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Contacts')
.addItem('add Contacts', 'addContact')
.addToUi();
}
function addContact()
{
var sheet = SpreadsheetApp.getActiveSheet();