The Return of the Low-Code Master

Building Powerful CRMs on Google Sheets

Fullstack CTO
3 min readApr 9, 2024

After a prolonged absence, I have returned with newfound knowledge and expertise in the field of low-code development. During this time, I’ve mastered Google Apps Script and its integration with Google Sheets. Using these tools, I’ve learned how to create full-fledged CRM systems right within spreadsheets.

My motivation to become a low-code master arose after experiencing several scary ischemic attacks. Realizing the fragility of our existence, I decided to share the knowledge and experience I’ve accumulated in a series of tutorial articles on developing CRM systems with Google Apps Script.

Low-code is a revolutionary approach to development that allows you to build powerful applications with minimal hand-coding. Google Apps Script is perfectly suited for this paradigm, offering a rich set of APIs and seamless integration across all Google Workspace products.

In upcoming articles, I’ll walk through step-by-step how to create full-blown CRM systems in Google Sheets using Apps Script. We’ll cover functionalities for contact management, deal tracking, customer interactions, and much more. Say goodbye to expensive CRM solutions — you’ll now be able to build your own powerful systems at minimal cost.

Join me on this exciting journey into the world of low-code development. Together we’ll unlock new horizons of productivity and efficiency in application building. Your feedback and questions are most welcome in the comments!

Here’s a continuation of the article discussing helpful utility functions related to notifications and dialog interactions in Google Apps Script:

In today’s article, I’ll share a few handy utility functions that I use across all my projects. These are focused on notifications and dialog interactions. I’ll demonstrate how to implement familiar frontend functions like alert, prompt, and similar ones.

One of the biggest advantages of building apps with Google Apps Script is the ability to create rich user interfaces and interactions directly within Google Sheets. While the platform may lack some traditional UI components found in frontend frameworks, it provides powerful methods for displaying modals, sidebars, and notifications.

Alert

Let’s start with a simple alert() utility:

function alert(message) {
SpreadsheetApp.getUi().alert(message);
}

This wraps the native Apps Script UI alert method, allowing you to trigger message alerts from any part of your code. You can display errors, warnings, or any information to the user.

Prompt

Next, let’s recreate the prompt() function for accepting user input:

function prompt(message) {
const ui = SpreadsheetApp.getUi();
const response = ui.prompt(message);
return response.getResponseText();
}

This utility prompts the user with the provided message and returns the text they entered. It’s great for taking input like new contact details in a CRM system.

Confirm

What about confirmations before destructive actions? We can build a confirm() utility:

function confirm(message) {
const ui = SpreadsheetApp.getUi();
const response = ui.alert(message, ui.ButtonSet.OK_CANCEL);
return response == ui.Button.OK;
}

This displays a message with OK and Cancel buttons. It returns true if the user clicked OK, allowing you to proceed with actions like deleting a record.

Toast alert

function toast(msg, caption) {
if (DEBUG) return Logger.log('toast: ' + msg)
SpreadsheetApp.getActive().toast(msg, caption)
}

Flash row

function flashRow(row, type="success") {
const sheet = SpreadsheetApp.getActive().getActiveSheet()
const range = sheet.getRange(row, 7, 1, 20) // change on your range
const initialColor = 'black'
let flashColor

switch (type) {
case 'err':
flashColor = 'red'
break
case 'warn':
flashColor = 'orange'
break
default:
flashColor = 'green'
}

range.setFontColor(flashColor)
SpreadsheetApp.flush()

Utilities.sleep(500)

range.setFontColor(initialColor)
}

Beyond these basic utilities, Apps Script offers powerful ways to build custom dialogs, sidebars, and other rich UI components using HTML, JavaScript, and CSS. We’ll cover those in upcoming articles.

For now, These simple utilities provide a solid foundation for creating interactive apps, mimicking many of the UI behaviors developers are accustomed to. Give them a try in your next Apps Script project!

--

--