Google Apps Script in practice: triggers, lead scoring and integrations

Google Apps Script automates work in Google Sheets and connects spreadsheets with ClickUp and Make.com, with no separate infrastructure. We explain its trigger types and show how it works in lead scoring.

Lead scoring in a Google Sheets spreadsheet (opens the full-size image)

In marketing and sales processes with many steps, Google Apps Script automates tasks in Google Sheets, manages workflows in ClickUp and connects with tools such as Make.com, which saves the team time.

Why Google Apps Script?

Apps Script is simple and flexible. It runs inside the Google ecosystem, so there is no separate infrastructure to build and maintain. It has a wide range of built-in methods and can connect to external APIs, which makes it a good fit for:

  • secure web interfaces,
  • automating marketing activities (e.g. lead scoring),
  • managing data in spreadsheets,
  • creating notifications and scheduling tasks,
  • passing information between several tools.

Trigger types and what they are for

Google Apps Script has several types of triggers that run scripts automatically. A script can respond to specific spreadsheet events or run at fixed times.

1. Time-driven triggers

With a schedule (e.g. every 10 minutes, daily or weekly), a script can:

  • update data in spreadsheets,
  • send notifications to the team,
  • generate reports and email them automatically,
  • check at set intervals whether something has happened.

2. Change-driven triggers: onEdit

  • It fires only when a user changes a cell value in the browser.
  • It runs automatically as a simple trigger.
  • It does not detect added rows, columns or comments.

It works well when an Apps Script function should run after a user's action, for example to update records when the user changes a cell in an “Action” or “Status” column. This way specific rows can start Apps Script functions on demand.

3. Change-driven triggers: onChange

  • It has to be installed manually (it is an installable trigger).
  • It detects different types of changes, including:
    • EDIT (cell edit),
    • INSERT_ROW (row added),
    • INSERT_COLUMN (column added),
    • REMOVE_ROW (row removed),
    • REMOVE_COLUMN (column removed),
    • FORMAT (formatting change),
    • OTHER (other changes).

It is useful when actions should run automatically after a scenario in Make.com finishes or when another service updates the spreadsheet.

4. onOpen triggers

Menu in a Google Sheets spreadsheet (opens the full-size image)

When a user opens a spreadsheet, a script can automatically:

  • show a sidebar with important instructions,
  • refresh auxiliary data or metrics,
  • check the user's permissions,
  • run other functions.

Lead scoring in practice

Lead scoring is a good example of what Google Apps Script can do. It usually works like this:

  1. A new lead is added to a Google Sheets spreadsheet.
  2. A script sends the data to an analytics tool (e.g. an AI model) that calculates a lead score.
  3. The score is saved back to the spreadsheet, and the main details go to other systems, such as a CRM or a marketing automation tool.

With time-driven and change-driven triggers combined, the process is monitored all the time, and errors can be handled with automatic retries.

Connecting to other tools

Make.com scenario connecting a Google Sheets spreadsheet with other tools (opens the full-size image)

We don't limit ourselves to Google tools. A setup may also include:

  • ClickUp: project and task management,
  • Make.com: orchestrating workflows between platforms,
  • other tools that automate contact management and relationship building.

Apps Script is the “glue” that links Google Sheets to these systems and passes data between them. For example, when a new lead is added to the spreadsheet, a script can call Make.com, which creates a task in ClickUp and starts sending messages in an automation tool.

Security and reliability

Every automated process needs attention to security and stability. With Google Apps Script:

  • you can restrict access to specific spreadsheets and scripts to prevent unauthorised edits,
  • you can set up retries for when a script hits an error,
  • different triggers help make sure that essential tasks (e.g. updating lead databases) are not missed, even when the network or an API fails from time to time.

When Apps Script is worth it

Google Apps Script handles tasks such as lead scoring, reporting and communication, and it can also give users a graphical interface with room for many integrations and functions. It fits organisations that:

  • work in the Google ecosystem and want to automate specific tasks,
  • need integration with external services (CRMs, marketing tools or other platforms),
  • want easy deployment and low maintenance costs, with room for customisation.

It needs little infrastructure and has many built-in functions, so both developers and non-developers can work with it.

If you have questions or would like to know more, write to us at kontakt@proop.pl. We will share our experience and help you set up your own automation.

Contact

Let's start with a call to get to know you and your needs

On the first call, you tell us about your company's situation and we assess whether we can help.