Automatically sync Salesforce with Google Sheets: alerts & webhooks

Scheduled auto refresh

Open Extensions → Data Integrator for Salesforce → Get Automation to refresh all saved pull templates on a schedule: hourly (every N hours), daily at a fixed hour, weekly or monthly. Each refresh honors the per-query refresh mode (overwrite, append, new sheet or smart merge). An optional event log sheet records every run, and success/error email notifications can include a link to — or an export of — the spreadsheet.

Workflows take this further: combine several pull and upload steps into one scheduled pipeline, including "since last execution" incremental pulls.

Snapshots to Google Drive

Enable Create new documents in the automation settings to copy the spreadsheet on every scheduled run, with a configurable name prefix and timestamp pattern, into a Google Drive folder of your choice (paste the folder URL or ID; leave empty for your Drive root). You can also take a one-off copy via Admin Tools → Create Snapshot Now. This builds a point-in-time archive of your Salesforce data — ideal for audits and month-end reporting.

Alerts: email, Slack and Chatter

In the automation dialog, add alerts that watch a cell after each refresh. When the condition matches (equals, greater/less than, contains, …), the add-on sends your message through any of:

  • Email — to the configured recipients;
  • Slack — paste an incoming-webhook URL to post the alert into a channel;
  • Salesforce Chatter — post the alert to your Chatter feed, visible to your whole team in CRM.

Example: alert when C2 (open-case count pulled from Salesforce) is greater than 50.

Inbound webhooks: refresh from outside

Admin Tools → Manage Webhooks generates a secret, token-protected URL for the spreadsheet. Call it from Salesforce Flows, Zapier, CI pipelines or curl to:

  • action=refresh — re-run all saved pull templates immediately (this is the default action);
  • action=pull — execute one specific saved template (requires the template's uuid and the sheetId — the gid value in the sheet's URL).

Rotate or revoke the token at any time from the same dialog. The URL becomes active after the spreadsheet's Apps Script is deployed as a web app (one-time step shown in the dialog).

Examples

Both GET and POST are supported; parameters can be passed in the query string or as a JSON body. Replace <deploymentId> and <token> with the values from the Manage Webhooks dialog.

Refresh all templates (curl, GET):

curl -L "https://script.google.com/macros/s/<deploymentId>/exec?token=<token>&action=refresh"

Refresh a single saved template (curl, POST with JSON body):

curl -L -X POST "https://script.google.com/macros/s/<deploymentId>/exec" -H "Content-Type: application/json" -d '{"token":"<token>","action":"pull","uuid":"<template-uuid>","sheetId":"<sheet-id>"}'

From a Salesforce Flow / Apex: add an HTTP callout (or an Apex Http request) to the same URL — for example in a record-triggered Flow, so the spreadsheet refreshes whenever an Opportunity closes:

Http h = new Http();
HttpRequest r = new HttpRequest();
r.setEndpoint('https://script.google.com/macros/s/<deploymentId>/exec?token=<token>');
r.setMethod('GET');
h.send(r);

From Zapier / Make: use the generic Webhooks action with the URL above — no authentication setup is needed beyond the token parameter.

The webhook answers with JSON: {"status":"ok","action":"refresh"} on success, or {"status":"error","message":"..."} when the token is invalid or a parameter is missing. Use -L with curl — Apps Script web apps reply through an HTTP 302 redirect.

Keep the URL secret: anyone who has the token can trigger refreshes. If it leaks, open Manage Webhooks and regenerate or revoke the token.

Transfer scheduled jobs to another user

Scheduled triggers run under the account that created them. When the owner changes (vacation, offboarding), use Admin Tools → Export Scheduled Jobs to export the whole automation configuration (schedule, notifications, alerts) as JSON. The new owner opens the same spreadsheet and runs Admin Tools → Import Scheduled Jobs: the configuration is applied to their account and the refresh trigger is re-created under their name — no manual re-setup.

Managing triggers

Manage Auto Refresh Process shows whether the background trigger is on and lets you switch it off for this spreadsheet — or globally for all spreadsheets using the add-on.