# Connect Google: Calendar, Meet and Sheets

> Connect Google once to create Google Meet meetings, block time in Google Calendar, and read and add rows in Google Sheets, with what happens when Google fails.

Source: https://docs.theavoxai.com/connections/apps/google

One Google connection lets Avox put meetings and blocked time in your Google Calendar, create Google
Meet links, and read and add rows in Google Sheets. Sheets needs no second sign-in.

## What Avox can and cannot do with Google

Avox can create a meeting (an event in your main calendar with a Meet link, and Google sends the
guests its own invitation), reschedule or cancel it from Avox until it starts, block time with a
busy event, read rows from a sheet and add a row to it.

Avox cannot:

- Use any calendar except your main one.
- Check your free and busy times before it books. No automation step or screen uses them, so a
  meeting is created even if the time is taken.
- Remove blocked time from an automation. Remove it under **Meetings** in Avox, or in Google.
- Change or delete a row already in a sheet. It only adds rows.
- Browse your Google Drive. **Sheets** lists only spreadsheets Avox has read or added to.

## What you need

- A Google account that can open your calendar and sheets, with edit access to any sheet you add rows to.
- Room in your plan for another app. Google counts as one app, however many parts you use.
- The **Manage connected apps** permission (**Settings**, then **Switchboard**). Admins have it, and
  an Admin can give it to a Manager.

## Connect Google

**1. Open Google in Apps**

In the sidebar open **Apps**, then **Google**, and click **Connect**. Read what Avox will be allowed
to do, click **Continue**, then **Continue to Google**.

**2. Choose the account**

On Google's page, pick the account whose calendar and sheets you want to use.

**3. Allow the permissions**

Leave every permission ticked (see the table), then allow. You come back to Avox, which shows
Google as connected, with the account's email.

| Permission Avox asks for | What it allows |
| --- | --- |
| Create and change calendar events | Meetings and blocked time |
| See when you're free or busy | Reading free and busy times |
| Read and add rows in Google Sheets | Reading and adding sheet rows |

If you untick one, Avox still connects and the rest works. **Overview** lists what is missing, and a
step that needs it is refused with [AVX-3690](https://docs.theavoxai.com/error-codes/avx-3690) until you click **Reconnect** and
tick it.

> **Note**
>
> **Coming soon** means Avox's Google sign-in is not switched on yet ([AVX-3682](https://docs.theavoxai.com/error-codes/avx-3682)). A greyed-out **Connect** can also mean your role lacks the permission ([AVX-3707](https://docs.theavoxai.com/error-codes/avx-3707)), the Switchboard has no plan ([AVX-3706](https://docs.theavoxai.com/error-codes/avx-3706)), or your plan's apps are all connected ([AVX-3683](https://docs.theavoxai.com/error-codes/avx-3683)).

## What you see in Avox afterwards

Open **Apps**, then **Google**. The menu (tabs along the top on a phone) has **Overview**,
**Meetings**, **Sheets** and **Activity**.

- **Overview**: the status (**Connected**, **Needs reconnecting** or **Having trouble**), the
  account, when it last worked, the last problem with its code, permissions not allowed, and **Used
  for** (what uses Google). **Test connection** asks Google whether it still accepts Avox's access.
  It does not check each permission.
- **Meetings**: **Sent by Avox** lists meetings and blocked time Avox made. **In Google** lists your
  main calendar from an hour ago onward. Open one for its time, guests, Meet link and notes.
  **Reschedule** and **Cancel meeting** work until it starts.
- **Sheets**: spreadsheets Avox has used, with tabs and first rows. Read only.
- **Activity**: **Usage** and **Log** of every call Avox made.

## Using Google in Avox

In an automation add **Use a connected app**, pick **What to do**, then pick Google under **With**.

| Step | What it does | Values it gives back |
| --- | --- | --- |
| Create a video meeting | A Meet meeting in your main calendar, up to 20 guests | `{{meeting.join_url}}`, `{{meeting.id}}` |
| Block time in a calendar | A busy event | `{{calendar.event_id}}` |
| Find a row in a sheet | Finds the first matching row | `{{sheet.found}}`, `{{sheet.count}}`, `{{sheet.list}}`, and each column by name, like `{{sheet.first_name}}` |
| Add a row to a sheet | Adds one row after the last filled row | `{{sheet_row.range}}`, `{{sheet_row.rows}}` |

You can rename the values in the step. See [Tables and Flows](https://docs.theavoxai.com/automation/tables) for how they work.

**Flows.** A Flow does not call Google itself. An automation that starts with **Flow submitted** can
use these steps with the customer's answers, like `{{flow.email}}`. The premade appointment booking
Flow keeps bookings in Avox tables; to also put them in Google Calendar, add an automation with the
**Booking made** trigger on Appointments.

**Times.** **Starts** needs a full date and time, with the year, month and day. Avox turns it into
one exact moment, so the meeting happens at the same time wherever you or your customer are. An
optional **Time zone** (like `Asia/Kolkata`) sets how the event shows in Calendar. A meeting is 5 to
720 minutes long. If Avox cannot read the date and time, the step fails before anything is sent.

> **Tip**
>
> After the first run, open the meeting in Google and check its time.

**Sheets.** Paste the spreadsheet's link and type the tab's name, like `Sheet1`. Click **Read the
column names** to line your values up with the sheet.

- **Find a row** treats the first row as column names and ignores capital letters when matching. It
  reads the first 500 rows (the column names count as one) and 50 cells across.
- **Add a row** adds up to 50 cells, saved exactly as written. A value that starts with `=` stays
  plain text and is never run as a formula.

**Example (made up).** The premade **Add new leads to Google Sheets** adds a row to your sheet
whenever a lead is added to your Leads table. Pick Google in the step and paste your sheet's link.

## Limits

- 120 calls a minute per Switchboard to Google. Past that, calls are refused with
  [AVX-3695](https://docs.theavoxai.com/error-codes/avx-3695) until the minute passes.
- Each call gives up after 10 seconds.
- Reading a sheet returns at most 500 rows of 50 cells, each cell cut at 1,000 characters.
- A rescheduled start must be a minute to a year ahead ([AVX-3722](https://docs.theavoxai.com/error-codes/avx-3722)).

## When Google fails or says no

1. **Avox tries again when that is safe.** Reads, moves and cancels are tried up to two more times
   (after about 0.4 seconds, then 1.2 seconds) if Google is busy or cannot be reached. If Google
   says how long to wait, Avox waits up to 5 seconds. Creating a meeting, blocking time and adding a
   row are **not** retried, because a repeat could make a second copy. If one fails with a timeout,
   check your calendar or sheet before running it again: Google may have saved it just as the answer
   got lost.
2. **The status changes only when it should.** If Google stops accepting Avox's access, the status
   becomes **Needs reconnecting** at once. Five failed calls in a row on Google's side make it
   **Having trouble**. One good call, or a passing **Test connection**, brings it back to
   **Connected** by itself. A bad detail in a step, an unticked permission, Avox's own 120 a minute
   brake and a paused Switchboard do not count against it.
3. **The call is logged.** **Activity** keeps the time, action, source, result, number of tries and
   Google's reason. Emails and phone numbers are masked and sign-in details are never kept. A log
   entry for reading a sheet can show a few of the rows read, so give **See connected apps** only to
   people you would trust with that sheet.
4. **Your automation follows your choice.** Each step has **If it can't be done**: **Stop the run**
   or **Carry on with the next step**. While Google **Needs reconnecting**, or the Switchboard is
   paused, Avox does not call Google. The step ends as "the app isn't connected"
   ([AVX-3596](https://docs.theavoxai.com/error-codes/avx-3596)) and follows the same choice. Everything else carries on.
5. **Pages show what Avox saved.** If Google cannot be read, **Meetings** and **Sheets** show what
   Avox saved ([AVX-3717](https://docs.theavoxai.com/error-codes/avx-3717)) with the reason's code. Click **Refresh** later.

**What happens to a meeting, a block or a row.** When Google confirms, Avox saves a record (title,
time, guest count, Meet link without its passcode) under **Sent by Avox**. When a call fails,
nothing is saved. Avox does not retry a create, so one failed attempt never becomes two meetings. A
meeting that exists stays in Google even if Google fails later or you disconnect. If a reschedule
or cancel fails, the event is unchanged.

| Code | What it means here |
| --- | --- |
| [AVX-3692](https://docs.theavoxai.com/error-codes/avx-3692) | Google's access was removed or ran out. Click **Reconnect**. |
| [AVX-3690](https://docs.theavoxai.com/error-codes/avx-3690) | A permission was not allowed. Reconnect and tick it. |
| [AVX-3694](https://docs.theavoxai.com/error-codes/avx-3694) | Google is not answering. Avox already retried where it could. |
| [AVX-3695](https://docs.theavoxai.com/error-codes/avx-3695) | Google or Avox asked for a slower pace. Try again in a minute. |
| [AVX-3713](https://docs.theavoxai.com/error-codes/avx-3713) | Google refused the request. The log has its reason. |
| [AVX-3705](https://docs.theavoxai.com/error-codes/avx-3705) | A detail is missing or not valid, like the spreadsheet or tab. |
| [AVX-3721](https://docs.theavoxai.com/error-codes/avx-3721) | The meeting cannot be cancelled or moved now, for example it started. |
| [AVX-3711](https://docs.theavoxai.com/error-codes/avx-3711) | The Switchboard is paused. |

A detail Google calls invalid or cannot find does not count against the status. Other refusals do.

## Disconnect Google

Open **Google**, then **Disconnect**. Avox lists what uses Google first: those steps stop until you
connect again ([AVX-3708](https://docs.theavoxai.com/error-codes/avx-3708)). Confirm with **Disconnect**, or click **Keep it
connected**.

- Avox asks Google to remove its access and deletes the sign-in it saved.
- The log and usage stay for your retention period. Meetings and rows already in Google stay too.
- Check **Third-party connections** in your Google account. If Avox shows
  [AVX-3697](https://docs.theavoxai.com/error-codes/avx-3697), Google did not confirm, so remove Avox there yourself.

## Common questions

**Can I connect two Google accounts?**

One account per Switchboard. Signing in with a different account while reconnecting is refused
([AVX-3703](https://docs.theavoxai.com/error-codes/avx-3703)). Disconnect first to switch.

**Does Avox message my customer the meeting link?**

Not by itself. Google emails guests its own invitation. To send the link on WhatsApp, add a message
step after **Create a video meeting** and use `{{meeting.join_url}}`.

## Related
