Google Sheet Input Node

Google Sheet Input Node reads data from Google Sheets and is a data input node. It automatically handles data retrieval and format conversion, passing tabular data to downstream nodes for processing.


Node Information

Property
Value

Node Type

gsheet_input_node

Display Name

Google Sheet Input

Node Category

Input

Icon

πŸ“Š Sheet icon (purple)

Handle Color

Emerald (green)


Functionality

Google Sheet Input Node reads data from Google Sheets and converts it to standard JSON format for downstream nodes.

Primary Use Cases:

  • Read data from Google Sheets

  • Import historical data for analysis

  • Load configuration data

  • Read trading records

  • Fetch external datasets

Key Features:

  • πŸ“Š Google Sheets Integration: Direct access to Google Sheets data

  • πŸ”„ Auto Formatting: Converts tabular data to JSON format

  • πŸ“‹ Header Support: Automatic header row detection and processing

  • πŸ”— URL Support: Accepts full URL or Sheet ID


Input Parameters

Parameter List

Parameter
Type
Required
Default
Description

doc_link

text

No

-

Google Sheets URL or ID

Supported Formats:

  1. Full URL:

  1. Sheet ID:

  1. Simplified URL:

ID Extraction:

  • The node automatically extracts Sheet ID from URLs

  • No need to manually copy the ID


Output Parameters

Output List

Output ID
Display Name
Data Type
Description

data

Data

object

Retrieved data

data Output

Data Type: object

Data Structure:

Example Output:


Usage Examples

Example 1: Reading Price Data

Scenario: Read historical price data from Google Sheets for analysis.

Google Sheets Content:

Workflow Structure:

Node Configuration:


Example 2: Loading Strategy Configuration

Scenario: Read trading strategy configuration from Google Sheets.

Workflow Structure:


Google Sheets Configuration

1. Create Service Account

  1. Create a new project or select an existing one

  2. Enable Google Sheets API

  3. Create a Service Account

  4. Download the JSON credentials file

2. Share Google Sheets

  1. Open your Google Sheets

  2. Click the "Share" button in the top right

  3. Add the Service Account email address

  4. Grant "Viewer" permission

3. Configure Credentials

Environment Variable (Recommended):


Best Practices

1. Header Design

Recommended:

Avoid:

2. Data Format

In Google Sheets:

  • Dates: Use ISO format YYYY-MM-DD

  • Numbers: Avoid comma separators

  • Booleans: Use TRUE/FALSE or 1/0

  • Empty values: Leave blank, don't use null or N/A


Important Notes

  1. Google API Quota

    • Daily read limits apply

    • Avoid frequent reads in loops

    • Consider caching data

  2. Credentials Security

    • Don't commit credentials to Git

    • Use environment variables for paths

    • Limit Service Account permissions

  3. Data Types

    • All data is read as strings

    • Type conversion needed in Code Node


Troubleshooting

Q: "Google Sheets credentials file not found"?

A:

  1. Verify credentials file path is correct

  2. Check GOOGLE_CREDENTIALS_PATH environment variable

  3. Ensure credentials file is readable


Q: "Spreadsheet not found"?

A:

  1. Confirm Sheet ID is correct

  2. Check if Service Account has access

  3. Verify Google Sheets is shared


Q: Retrieved data is empty?

A:

  1. Confirm the sheet contains data

  2. Check Google Sheets sharing settings

  3. Verify credentials are correct


Technical Specifications

Specification
Value

Node Version

0.1.0

Data Source

Google Sheets

API

Google Sheets API v4

Credential Type

Service Account

Permission Required

Viewer

Timeout

60 seconds


  • Google Sheet Output Node - Write data to Google Sheets

  • Code Node - Process retrieved data

  • AI Model Node - Analyze datasets


Related Documentation:

Last updated