Attio Export to Google Sheets

Attio Logo
Google Sheets Logo
Available

We've built a Google Apps Script to make it easy to export your Attio data directly into Google Sheets on a recurring basis (no paid tools, connectors, or middleware required.) Whether you want to build internal dashboards, share clean reports with non-Attio users, or just automate a regular export of lists and objects, this script gives you full control.

You configure what gets exported (objects, lists, or workspace members) and where it gets written (which sheet tab), all within the script itself. It intelligently flattens and formats complex Attio records into structured, readable spreadsheets - complete with field mapping, timestamp formatting, and batching.

Attio to Google Sheets Export Script

This Google Apps Script lets you sync data from Attio directly into Google Sheets - without needing paid tools, connectors, or middleware.

It’s fast, flexible, and designed to be configured entirely in the script. Great for internal dashboards, backups, reporting, or sharing with non-Attio users.

What It Does

  • Exports records from Attio Objects, Lists, or Workspace Members
  • Transforms complex nested data into flat, readable headers
  • Automatically maps and formats:
    • Dates and timestamps
    • Locations
    • Status values
    • Multiselect and structured attributes
  • Writes each dataset to a specified tab in your Google Sheet
  • Supports batching, pagination, and retries for large workspaces
    Google Apps Script
    Google Sheets Export

Benefits

  • Free – No need to pay for custom ETL integrations
  • Flexible – Configure what you want to sync, either Lists or Objects or Workspace Users.
  • Readable – Exports structured, flattened, timestamped data with clean headers
  • Secure – Uses Google Apps Script's built-in ScriptProperties to store API keys

Setup Instructions

To get access to the script, please reach out via the Contact Us form. We will respond via email with access instructions. From there, please follow these setup instructions:

1. Get Your Attio API Key

  • Go to the Developer tab in your workspace
  • Generate a personal access token
  • In your Apps Script project, go to Project Settings → Script Properties and set the API key as an environment variable named ATTIO_API_KEY

2. Configure Your Sheet

  • Create a Google Spreadsheet
  • Get the Spreadsheet ID from the URL and set it in the script:
const SHEET_ID = "your_sheet_id_here";

3. Configure What to Export

In the script, define what Attio data to write into which tab:

const WRITER_OBJECT = [
  {
    target: "objects",
    object_name: "companies",
    sheet_name: "Companies"
  },
  {
    target: "lists",
    object_name: "abc123-list-id",
    sheet_name: "Qualified Leads"
  },
  {
    target: "workspace_members",
    sheet_name: "Team Members"
  }
];

Notes on Configuration

Object Targets

Target Description
objects Export standard objects (e.g., companies, people)
lists Export custom lists via their ID
workspace_members Export users on the workspace (no object_name needed)

object_name Rules

  • For objects, use the object slug from the URL (e.g., companies, people)
  • For lists, use the full UUID list ID from the URL
  • For workspace_members, omit object_name

Date & Time Formatting

All timestamps are standardized using the DATE_FORMAT constant in the script:

const DATE_FORMAT = "yyyy-MM-dd";

You can change this to:

Output Example

Sheet tabs are named as defined in WRITER_OBJECT, and each row corresponds to one record. Field names are automatically expanded, e.g.:

id name created_at status__title email__email_address
rec_123 Acme Inc. 2025-01-01 Active hello@acme.com

Run the Script

From the Apps Script UI:

  1. Open writeRecordsToSheet
  2. Run it manually or set up a time-based trigger

Functions of Note

Function Purpose
writeRecordsToSheet() Main runner. Iterates through your WRITER_OBJECT array
fetchAndTransformAttioRecords() Gets and flattens Attio records
writeListsAndObjectToSheet() Writes records from objects or lists
writeWorkspaceUserDataToSheet() Writes users from your Attio workspace
formatTimestamp() Formats UNIX timestamps using DATE_FORMAT

Security

Your API token is stored securely using ScriptProperties. Never hardcode secrets.

Support

This script is provided as-is for free use. For help with customization or professional support, reach out via the Contact Us form.

Published: July 21, 2025