Google Sheets

Version: 2.0.0

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

  1. Navigate to Automations > Integrations.
  2. Search for Google Sheets.
  3. 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 Sheet.

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 NameDescriptionRequired
Google Sheets URLEnter the value for sheet url. Example: https://docs.google.com/spreadsheets/d/1nrsLE/edit#gid=0Required

Output

A JSON object containing multiple rows of result:

  • 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 Sheet.

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 NameDescriptionRequired
Google Sheets URLEnter the value for sheet url. Example: https://docs.google.com/spreadsheets/d/1nrsLE/edit#gid=0Required

Output

A JSON object containing multiple rows of result:

  • 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 Sheet.

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 NameDescriptionRequired
Google Sheets URLJinja-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 result:

  • 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 Sheet.

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 NameDescriptionRequired
Google Sheets URLJinja-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 result:

  • 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 NameDescriptionRequired
Google Sheets Source URLJinja-Templated text containing the value of source sheet url. Example: https://docs.google.com/spreadsheets/d/{{spreadsheetId}}/edit#gid={{gid}}.Required
Google Sheets Destination URLJinja-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 result:

{
	"result": "Sheet copied",
	"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 nameDescriptionRequired
Google Sheets TitleJinja-Templated text containing the value of sheet title. Example: InvoiceRequired

Output

A JSON object containing multiple rows of result:

{
	"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.0 - Updated architecture to support IO via filesystem

© 2017-2021 LogicHub®. All Rights Reserved.