Skip to main content

Overview

Welcome to the Google Sheets integration guide for Julep! This integration allows you to read, write, and manage data in Google Sheets spreadsheets, enabling you to build workflows that leverage structured data storage and manipulation. Whether you’re tracking metrics, managing inventories, or processing data tables, this guide will walk you through the setup and usage.

Prerequisites

To use the Google Sheets integration, you need either:
  1. A Google Cloud service account with Sheets API enabled (recommended)
  2. Use Julep’s shared service account (limited to spreadsheets shared with it)
For your own service account, follow the Google Get Started guide to create credentials.

How to Use the Integration

To get started with the Google Sheets integration, follow these steps to configure and create a task:
1

Configure Your Authentication

Choose between using your own service account or Julep’s shared service. For your own service account, base64 encode your JSON credentials file.
2

Create Task Definition

Use the following YAML configuration examples for different operations:

Read Values Example

Read Values

Write Values Example

Write Values

Append Values Example

Append Values

Clear Values Example

Clear Values

Batch Read Example

Batch Read

Batch Write Example

Batch Write

YAML Explanation

  • name: A descriptive name for the task (e.g., “Google Sheets Read Task”).
  • tools: This section lists the tools or integrations being used. Each tool has a unique name for reference.
  • type: Specifies the type of tool, which is integration in this context.
  • integration: Details the provider and setup for the integration.
    • provider: Always google_sheets for Google Sheets integration.
    • method: The operation to perform. Available methods:
      • read_values: Read data from a range
      • write_values: Write or update data in a range
      • append_values: Append new rows to a sheet
      • clear_values: Clear data from a range
      • batch_read: Read from multiple ranges at once
      • batch_write: Write to multiple ranges at once
    • setup: Authentication configuration (see Authentication Methods below).
You have two options for authentication:Option 1: Your Own Service Account (Recommended)
  • Full control over permissions
Option 2: Julep’s Shared Service (Testing Only)
  • No setup required
  • Limited to spreadsheets explicitly shared with Julep’s service account
  • Recommended for testing only - Use your own service account in production to manage Google API quotas and constraints
Common Arguments:
  • spreadsheet_id: The ID of the Google Sheets spreadsheet (found in the URL)
  • range: The A1 notation range (e.g., “Sheet1!A1:C10”)
Method-Specific Arguments:
  • values (write/append): 2D array of data to write
  • ranges (batch_read): Array of ranges to read
  • data (batch_write): Array of range-value pairs to write

Important Notes

  • Spreadsheet ID: Found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit
  • Range Notation: Use A1 notation like “Sheet1!A1:C10” or “A:A” for entire columns
  • Service Account Setup: Your service account needs the Google Sheets API enabled in the Google Cloud Console
  • Sharing Requirements: When using use_julep_service, share your spreadsheet with Julep’s service account email: julep-sheets-assistant@julep-471013.iam.gserviceaccount.com
  • Base64 Encoding: Encode your service account JSON with: base64 -i service-account.json

Conclusion

With the Google Sheets integration, you can efficiently manage spreadsheet data within your Julep workflows. This integration provides robust data management capabilities, from simple reads and writes to complex batch operations, enhancing your workflow’s ability to work with structured data.