Google Sheets
Version: 2.0.9
Google Sheets is a spreadsheet program included as part of the free, web-based Google Docs Editors suite offered by Google.
Connect Google Sheets with LogicHub
- Navigate to Automations > Integrations.
 - Search for Google Sheets.
 - Click Details, then the + icon. Enter the required information in the following fields.
- Label: Enter a connection name.
 - Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
 - Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
 - Remote Agent: Run this integration using the LogicHub Remote Agent.
 - Keys File: JSON File containing service account keys and other details. Details about config file.
 
 
The sheet must be shared with a service account and follow here to create a service account.
Actions for Google Sheets
Read Sheet
Reads data from Google Sheets.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input Name | Description | Required | 
|---|---|---|
| Google Sheets URL | Enter the value for sheet url. Example: https://docs.google.com/spreadsheets/d/1nrsLE/edit#gid=0 | Required | 
Output
A JSON object containing multiple rows of results:
- has_error: True/False
 - error: message/null
 - result: Sheet Value
 
{
  "error": null,
  "has_error": false,
  "result": [
    "column1",
    "column2"
  ]
}
Write Sheet
Writes table data into Google Sheets.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input Name | Description | Required | 
|---|---|---|
| Google Sheets URL | Enter the value for the sheet URL. Example: https://docs.google.com/spreadsheets/d/1nrsLE/edit#gid=0 | Required | 
| Overwrite the existing sheet. | Overwrite the existing sheet and then write the input rows. (Default is No) | Optional | 
Output
A JSON object containing multiple rows of results:
- has_error: True/False
 - error: message/null
 - result: Success/Failure message
 
{
  "result": "Sheet updated",
  "error": null,
  "has_error": false
}
Read Sheet (Dynamic URL)
Reads data from Google Sheets.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input Name | Description | Required | 
|---|---|---|
| Google Sheets URL | Jinja-templated containing the value of sheet url. Example: https://docs.google.com/spreadsheets/d/{{spreadsheetId}}/edit#gid={{gid}}  | Required | 
Output
A JSON object containing multiple rows of results:
- has_error: True/False
 - error: message/null
 - result: Sheet Value
 
{
  "error": null,
  "has_error": false,
  "result": [
    "column1",
    "column2"
  ]
}
Write Sheet (Dynamic URL)
Writes table data into Google Sheets.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input Name | Description | Required | 
|---|---|---|
| Google Sheets URL | Jinja-templated containing the value of sheet url. Example: https://docs.google.com/spreadsheets/d/{{spreadsheetId}}/edit#gid={{gid}}  | Required | 
Output
A JSON object containing multiple rows of results:
- has_error: True/False
 - error: message/null
 - result: Success/Failure message
 
{
  "result": "Sheet updated",
  "error": null,
  "has_error": false
}
Copy Sheet
Copy sheet from one Spreadsheet to another
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input Name | Description | Required | 
|---|---|---|
| Google Sheets Source URL | Jinja-Templated text containing the value of source sheet url. Example: https://docs.google.com/spreadsheets/d/{{spreadsheetId}}/edit#gid={{gid}}. | Required | 
| Google Sheets Destination URL | Jinja-Templated text containing the value of destination sheet url. Example: https://docs.google.com/spreadsheets/d/{{spreadsheetId}}/edit#gid={{gid}}. | Required | 
Output
A JSON object containing multiple rows of results:
{
  "result":"Sheet copied",
  "Copied Sheet":{
    "sheetId":557468380,
    "title":"Copy of Sheet1 1",
    "index":2,
    "sheetType":"GRID",
    "gridProperties":{
      "rowCount":1000,
      "columnCount":26
    }
  },
  "error":null,
  "has_error":false
}
Create Sheet
Create Blank Spreadsheet
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
| Input name | Description | Required | 
|---|---|---|
| Google Sheets Title | Jinja-Templated text containing the value of sheet title. Example: Invoice | Required | 
Output
A JSON object containing multiple rows of results:
{
	"result": "",
	"error": null,
	"has_error": false
}
Additional Information
The created sheet will be accessible only to the user(service account) who has created the sheet.
Release Notes
v2.0.9- AddedOverwrite sheetoption inwrite sheetaction and added more stats regardingcopy sheetaction.v2.0.0- Updated architecture to support IO via filesystem
Updated over 1 year ago