Skip to content

Steps

Google Sheets

Add, find, update and read rows in a Google Sheet while the chat runs, for example to log leads or look up a customer.

What it does#

The Google Sheets step works on a spreadsheet in your Google account, in the background: the customer doesn't see it. One step does one action:

ActionWhat it doesSaved as
Add a rowAdds one row at the bottom of the tab, with a value per column.sheet_row
Find rowsFinds the rows where a column has a value, for example the lead with this phone. Saves the list and the first match.rows
Update a rowChanges cells of one row, found by a value or by its row number. Columns left empty keep their value.sheet_row
Read rowsReads rows of the tab (or a range) so later steps can use them.rows
Clear cellsEmpties the cells of a range. The rows stay; only their values are removed.sheet
Add a tabAdds a new tab to the spreadsheet, for example one per month.sheet
The Google Sheets step

Log a lead to a sheet#

Prepare the sheet first: put column names in row 1, for example Name, Phone, Interest, Date.

  1. 1

    Drag Google Sheets onto the canvas

    It's in the Google group of the step list. Connect it after the steps that collect the answers, then click it.

  2. 2

    Connect your Google account

    Under Google account, click Connect Google and allow Officely in Google's window. Already connected? Pick the account in Choose an account.

  3. 3

    Pick the action

    Under Action, choose Add a row.

  4. 4

    Choose the spreadsheet

    Click Choose spreadsheet and pick the file in Google's picker. If the picker doesn't open, click Paste a link, paste the spreadsheet's address from your browser and click Use.

  5. 5

    Choose the tab

    Pick it in Tab. The columns from row 1 load for you. Changed the sheet? Click Reload tabs and columns.

  6. 6

    Fill the row values

    Under Row values, give each column a value. Use variables for the customer's answers, for example {{@full_name}} for Name and {{#cphone}} for Phone.

  7. 7

    Connect both outputs

    Connect Success to the next step and Error to a fallback, for example a message that a team member will follow up.

  8. 8

    Try it

    Under Try it, fill in sample values and click Try it. Because this adds a real row, Officely asks "Run it for real?" first.

Find, update and read#

  • Find rows: under Find, choose the Column, the value it Equals (for example {{#cphone}}) and How to compare: Is exactly or Contains. Up to (rows) limits how many come back.
  • Update a row: under Which row, find it By a value (a column and a value) or By row number, for example {{#rows.first.rowNumber}} from an earlier Find rows step. Under New values, only the columns you fill change.
  • Read rows: leave Range (optional) empty to read the whole tab, or write a range such as A2:D50.
  • Clear cells: write the Range, for example A2:F100.
  • Add a tab: write the Tab name, for example Leads {{#now}}. If a tab with that name already exists, the step uses it and doesn't fail.

Use the result#

The result is saved under the name in Result > Save as. The step shows examples for the action you picked:

ActionExamples
Add a row, Update a row{{#sheet_row.rowNumber}}, {{#sheet_row.range}}
Find rows{{#rows.count}}, {{#rows.first.Phone}}, {{#rows.rows[0].rowNumber}}, {{#rows.text}}
Read rows{{#rows.count}}, {{#rows.rows[0].Name}}, {{#rows.text}}
Add a tab{{#sheet.title}}, {{#sheet.sheetId}}

Columns are read by their name in row 1, so first.Phone is the Phone column of the first match. To give a field a short name, open Copy fields to their own variables and add, for example, first.Phone as leadPhone.

Use a Filter on {{#rows.count}} to branch on whether a customer was found.

When Google fails#

If Google fails, the chat continues on the Error output. There, {{#google_error.message}} says what happened and {{#google_error.code}} is a short code. If Error isn't connected, the chat stops at this step and you get an alert.

Common mistakes#

ProblemFix
"The tab has no header row."Add column names in row 1, or add columns by name with Add column.
"Officely can't open this spreadsheet."Choose it again with Choose spreadsheet so Google lets Officely use it. A pasted link to a file Officely wasn't given can't be opened.
"That isn't a Google Sheets link."Copy the address from the browser while the spreadsheet is open.
The account shows (sign in again).Google stopped accepting Officely for it (password change, removed access or 6 months unused). Click Reconnect. Until then, steps using it take their Error output.
"Fill at least one column."Give at least one column a value under Row values.