JSON to Google Sheet
Action ID: json_to_google_sheet
Description
Create a new Google Sheet from JSON data and configure sharing permissions automatically.
Input Parameters
title
string
✓
-
Title of the Google Sheet to be created
data
string
✓
-
Data in JSON format to insert into the sheet. Can be a list of JSON objects or a single JSON object
share_with
array
-
null
Email addresses to share the sheet with. If not provided, the sheet will be shared with anyone
role
string
-
reader
Role of the users to share with. Fixed value: reader
prem_type
dropdown
-
anyone
The account type to share with. Available options: user, group, domain, anyone
Output Parameters
sheet_url
string
The URL of the created Google Sheet
sheet_id
string
The unique ID of the Google Sheet
How It Works
This node takes JSON data and creates a new Google Sheet with the specified title. It parses the JSON data structure, converts it into rows and columns, creates the spreadsheet in your Google Drive, and configures sharing permissions based on your specifications. If the data is an array of objects, each object becomes a row with keys as column headers. The node returns both the sheet URL for direct access and the sheet ID for programmatic operations.
Usage Examples
Example 1: Create Sheet from Array of Objects
Input:
title: "Customer List"
data: '[
{"name": "John Doe", "email": "[email protected]", "status": "active"},
{"name": "Jane Smith", "email": "[email protected]", "status": "inactive"}
]'
share_with: ["[email protected]"]
prem_type: "user"Output:
sheet_url: "https://docs.google.com/spreadsheets/d/abc123xyz/edit"
sheet_id: "abc123xyz"Example 2: Create Public Report Sheet
Input:
title: "Monthly Sales Report"
data: '{
"total_sales": 150000,
"units_sold": 1500,
"average_price": 100,
"top_product": "Widget A"
}'
share_with: null
prem_type: "anyone"Output:
sheet_url: "https://docs.google.com/spreadsheets/d/def456uvw/edit"
sheet_id: "def456uvw"Example 3: Create Team Collaboration Sheet
Input:
title: "Project Tasks"
data: '[
{"task": "Design mockups", "assigned_to": "Alice", "status": "In Progress"},
{"task": "Write documentation", "assigned_to": "Bob", "status": "Pending"},
{"task": "Code review", "assigned_to": "Charlie", "status": "Complete"}
]'
share_with: ["[email protected]", "[email protected]", "[email protected]"]
prem_type: "user"Output:
sheet_url: "https://docs.google.com/spreadsheets/d/ghi789rst/edit"
sheet_id: "ghi789rst"Common Use Cases
Report Generation: Automatically create shareable reports from workflow data
Data Export: Export workflow results to Google Sheets for analysis and visualization
Team Collaboration: Share data with team members for collaborative review and editing
Data Backup: Create Google Sheets backups of important workflow data
API Response Storage: Store API responses in structured spreadsheet format
Dashboard Data: Generate data sheets for Google Sheets-based dashboards
Audit Trails: Create timestamped records of workflow executions and results
Error Handling
Authentication Error
Google account credentials are invalid or expired
Re-authenticate your Google connection in AgenticFlow
Invalid JSON
Data parameter contains malformed JSON
Validate and fix the JSON syntax before passing to the node
Permission Denied
Insufficient permissions to create sheets or share
Check Google Drive permissions and OAuth scopes
Invalid Email
Email address in share_with is invalid
Verify all email addresses are properly formatted
Quota Exceeded
Google Sheets API quota limit reached
Wait for quota reset or request quota increase
Empty Data
Data parameter is empty or null
Ensure data contains valid JSON content
Notes
JSON Format: The data must be valid JSON. Arrays of objects create multi-row sheets; single objects create key-value pairs.
Column Headers: When using an array of objects, the keys of the first object become column headers.
Sharing Options: Setting prem_type to "anyone" makes the sheet publicly accessible with the link.
Default Role: Users are always shared with "reader" role. For edit access, modify permissions in Google Sheets directly.
Google Drive Storage: Created sheets are stored in your Google Drive and count toward your storage quota.
Sheet Limits: Google Sheets has limits on cells (10 million) and columns (18,278). Large datasets may need splitting.
Last updated
Was this helpful?