Skip to main content

How to sync leads data to Google Sheets using offline sync

Updated over 2 weeks ago

Summary

This guide explains how to automatically sync lead information and conversation summaries from Astra to a Google Sheet after a conversation ends.

By enabling the Offline Sync feature, Astra updates the Google Sheet only after the conversation has finished and a lead is captured. This prevents the action from running during the live conversation and ensures that the lead details and summary are recorded automatically.

Instructions

Video walkthrough

Prefer a visual walkthrough? Watch this short demo to see how the Google Sheets Offline Sync integration works:

Before you get started

Before configuring Offline Sync, make sure Astra is connected to Google Sheets.

Connect Astra to Google Sheets

  • Log in to your Astra account.

  • Go to Action library.

  • Select Google Sheets – Update row.

  • Click Connect Google Sheets.

  • When prompted, sign in with your Google account.

  • Follow the remaining prompts and give required permissions to complete the connection.

Once the connection is complete, you should see a message showing connection was successful.

To enable offline sync to update your leads data in Google Sheets, follow these steps:

Step 1: Add the Google Sheets update row action

  • Log in to your Astra account.

  • Go to Action library.

  • Select Google Sheets – Update row.

This action will be used to update lead information in your Google Sheet.

Step 2: Enable Offline Sync

  • Under the Action Intent Configuration page for the Update row action - turn on the Offline Sync toggle.

  • Click on Confirm.

Tip: Give the action a clear name when saving it, such as Offline sync enabled update row.

You should see the Google account you signed in with.

  • Select the appropriate Drive - either My Drive or Shared Drive, depending on where your Google Sheet is stored.

  • Choose the spreadsheet you want to use.

Note: When Offline Sync is enabled, the action does not run during the conversation. Instead, Astra updates the Google Sheet automatically after the conversation ends and the lead is captured.

Step 3: Prepare your Google Sheet

Your Google Sheet must follow a specific format so Astra can correctly map the data.

Supported fields

The following fields can be updated:

  • Conversation ID

  • First name

  • Last name

  • Email

  • Phone

  • Company

  • Lead level (if lead qualification criteria is configured)

  • Lead score

  • Summary

  • Custom contact attributes defined in the agent instructions

Column formatting rules

Astra matches columns based on the header name.

  • Header matching is case-insensitive

  • Spaces, hyphens, underscores, and special characters are ignored

For example, the following column headers are treated the same:

  • First Name

  • first_name

  • FIRST-NAME

All of these will map to the first name field.

Step 4: Add the action to your agent instructions

Insert the Update Row action with Offline Sync enabled into your agent instructions.

You do not need to:

  • Define when the action should run

  • Configure additional actions such as Add Row

  • Configure actions like Search Row

Astra automatically handles the execution after the conversation ends.

Step 5: Install and run the agent

After installing the agent and making it available to users, the following process happens automatically:

  • A user starts a conversation with the agent.

  • When there is no interaction for 10 minutes, the conversation is considered ended.

  • Astra captures or updates the lead information.

  • The Google Sheet is updated with the lead details and conversation summary.

How rows are updated

When syncing data, Astra checks for existing rows using the following priority order:

  1. Conversation ID

  2. Email

  3. Phone

If a match is found, the existing row is updated.

If no match is found, a new row is created in the Google Sheet.

Using Offline Sync allows you to automatically capture leads and conversation summaries without interrupting the live conversation. Your Google Sheets stay updated in the background, giving your team an easy way to track and manage leads.

Did this answer your question?