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:
- A Google Cloud service account with Sheets API enabled (recommended)
- Use Julepâs shared service account (limited to spreadsheets shared with it)
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.
YAML Explanation
Basic Configuration
Basic Configuration
- 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.
Tool Configuration
Tool Configuration
- 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 rangewrite_values
: Write or update data in a rangeappend_values
: Append new rows to a sheetclear_values
: Clear data from a rangebatch_read
: Read from multiple ranges at oncebatch_write
: Write to multiple ranges at once
- setup: Authentication configuration (see Authentication Methods below).
- provider: Always
Authentication Methods
Authentication Methods
You have two options for authentication:Option 1: Your Own Service Account (Recommended)
- Full control over permissions
- 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
Method Arguments
Method Arguments
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â)
- 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.For more information, please refer to: