The Google Data Operation The Google Data Operation

The Google Data Operation

Leo Ng Leo Ng

The Google Data Operation

The Google Data Operation is used to write and fetch data from Google Sheets. 

mceclip0.png

Use Cases

  • Send data from Airkit to a Google Spreadsheet
  • Fetch data from a Google Spreadsheet to display to an app user your Airkit app

Data Operation Properties

Operation

Selects the Google operation to perform. 

There are two operations available:

  • Append row
    For example, intake data from a form on Airkit to be saved into a Google Sheet
  • Fetch Cell Data
    For example, retrieve data from a Google Sheet to be displayed to an app user

Append row

Appends a row to a specified Google Sheet.

Drive (optional)

Selects the desired Google Drive to retrieve Sheets from.  If no value is selected, all Google Drives connected to the App will be available.

By checking "Use a custom expression", the cell becomes an expression editor and expects the Drive ID as a string.

Spreadsheet

Selects the Spreadsheet to work with. This dropdown is populated with all the Google Sheets from the Google Drive accounts that are connected to the app.

By checking "Use a custom expression", the cell becomes an expression editor and expects the spreadsheet ID as a string.

Worksheet

Selects the specified Worksheet to perform the Operation on. This dropdown is populated with the list of all the Worksheets within the specified Spreadsheet.

By checking "Use a custom expression", the cell becomes an expression editor and expects the worksheet ID as a string.

Record Values

Selects the desired column for the data to be appended to and the corresponding value.  This field expects an object with the keys of the index of the row column.  It is only possible to write to one row at a time and this operation will write to the first empty row in the sheet.

Example:
mceclip0.png
In Google Sheets, starting with an empty sheet, this input will look like this:
mceclip1.png

By checking expression icon on the right, the cell becomes an expression editor.

Value Input Option (optional)

Determines how the input data is interpreted.

The available operations are:

  • RAW 
  • USER_ENTERED

If the option RAW is used, the data or value passed will not be parsed or evaluated. For instance, if the value "SUM(1,2)" is entered, the String of  "SUM(1,2)" will be the input.

If the option of USER_ENTERED is selected, Google Sheets will attempt to evaluate the String where if the value of "SUM(1,2)" is entered, the value of 3 will be the input.

Run Results

Test runs the Operation. By default, Airkit creates a variable on the Connection called "Google" and can then be passed into subsequent operations.

Fetch Cell Values

Fetches data from Google Sheets that can be stored within a variable for use in subsequent Data Operation steps.

 

Spreadsheet

Selects the Spreadsheet to perform the Operation on. This dropdown is populated with the list of all the Google Spreadsheets associated with your username*?

By checking "Use a custom expression", the cell becomes an expression editor and expects the spreadsheet ID as a string.

Worksheet

Selects the specified Worksheet to perform the Operation on. This dropdown is populated with the list of all the Worksheets within the specified Spreadsheet.

By checking "Use a custom expression", the cell becomes an expression editor and expects the worksheet ID as a string.

Cell Range

Selects the specified Worksheet to perform the Operation on. This dropdown is populated with the list of all the Worksheets within the specified Spreadsheet. Expects an a1 style input such as "A1:B1"

Example, from the spreadsheet of these values:
mceclip1.png

The following Cell Range:
mceclip0.png

Returns the following:
mceclip1.png

Value Render Options

Determines how values should be rendered in the output.


Formatted Value
Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if A1 is 1.23 and A2 is =A1 and formatted as currency, then A2 would return "$1.23".

Unformatted Value

Values will be calculated, but not formatted in the reply. For example, if A1 is 1.23 and A2 is =A1 and formatted as currency, then A2 would return the number 1.23.

Formula:
Values will not be calculated. The reply will include the formulas. For example, if A1 is 1.23 and A2 is =A1 and formatted as currency, then A2 would return "=A1".

Run Results

Test runs the Operation. By default, Airkit creates a variable on the Connection called "Google" and can then be passed into subsequent operations.

Further Reading