> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Google Drive in Agents

> Learn how to read and write Google Docs, Google Sheets, and Google Slides with Agent nodes

After you [connect your Google account](/integrations/google-drive/connect-google-drive-to-profound), the following nodes become available in Profound Agents. Find them in the Agent builder under **Google Suite**: the **Google Docs** and **Google Sheets** groups, and the **Google Slides** node.

Every node runs as the Google account you select under **Google Account**. It can only reach the files you added through Google's file picker and the files Profound created, so [add the files](/integrations/google-drive/connect-google-drive-to-profound#step-3) before you build with them.

<Note>
  New to Agents? See [Getting started with Agents](https://help.tryprofound.com/articles/2212787792-create-an-agent) in the Profound Help Center.
</Note>

## Available nodes

<Tabs>
  <Tab title="Create Document" icon="file-plus">
    ### Create Document

    Creates a Google Doc.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Document Title** — The title of the new document

    #### Optional inputs

    | Input | Default | Description |
    | - | - | - |
    | **Content format** | **Plain Text** | How to read **Initial Content**: **Plain Text**, **Markdown**, or **HTML**. Use the format of the content you paste or reference. |
    | **Initial Content** | - | The content of the new document. Markdown and HTML are converted to formatted text by Google. HTML must contain tags, such as `<p>...</p>`. |
    | **Destination folder** | **My Drive** | The Drive folder to create the document in. Select a folder you added through the picker, or select **Add a folder from Google Drive** to add one. The folder can be in a shared drive. Accepts a variable that holds a folder ID. |

    #### Output

    A JSON object with the new document's `documentId`, `document_url`, and `title`.

    <Note>
      If Profound can't write the content into a document it just created in a folder, it moves the empty document to the trash so the folder doesn't collect blank files.
    </Note>
  </Tab>

  <Tab title="Get Document" icon="file">
    ### Get Document

    Reads the content of a Google Doc.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Document** — Search the documents you added and select one, or paste the document's URL. Also accepts a document ID or a variable from a previous node's output

    #### Optional inputs

    * **Export format** — **Plain text** (default), **HTML**, **Markdown**, or **Raw (Docs API JSON)**. Raw returns Google's full document JSON, including every tab.

    #### Output

    The document content in the selected format, as text.

    Documents whose export exceeds 5 MB aren't returned and the node reports that the document is too large.
  </Tab>

  <Tab title="Create Spreadsheet" icon="table">
    ### Create Spreadsheet

    Creates a spreadsheet and fills its first sheet with rows, or adds a new sheet with rows to an existing spreadsheet.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Title** — The title of the new spreadsheet, or of the new sheet when you add to an existing spreadsheet
    * **Rows** — The data to write, in the format selected under **Input format**
    * **Input format** — **CSV** (selected by default when you add the node), **TSV (tab-separated)**, **Markdown table**, **HTML table**, or **JSON**. JSON accepts an array of objects, whose keys become the header row, an object of arrays keyed by column, or an array of arrays. A code fence around the content is removed before parsing

    #### Optional inputs

    | Input | Default | Description |
    | - | - | - |
    | **Add to Existing Spreadsheet** | - | Leave empty to create a new spreadsheet. Select an existing spreadsheet, or paste its URL, to add a new sheet tab named **Title** instead. |
    | **Value input option** (under advanced settings) | **Formula / number (interpret as typed)** | How Google reads the written values. **Formula / number** interprets formulas and numbers as if you typed them into a cell, for example `=SUM(A1:B1)`. **Plain text (no parsing)** stores them as text. |

    #### Output

    For a new spreadsheet, a JSON object with `spreadsheetId`, `spreadsheet_url`, and `title`. For a new sheet, a JSON object with `spreadsheetId`, `spreadsheet_url`, `sheetId`, and `sheet_title`.

    <Tip>
      To copy data between sheets, set **Input format** to the **Output format** you used in [**Get Sheet Values**](#get-sheet-values). CSV, TSV, HTML, Markdown, and the JSON shapes round-trip.
    </Tip>
  </Tab>

  <Tab title="Get Row" icon="table-list">
    ### Get Row

    Reads one row from a sheet.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Spreadsheet** — Search the spreadsheets you added and select one, or paste its URL
    * **Row selection** — **Specific row**, **First row**, or **Last row**
    * **Row number** — The row to read when **Row selection** is **Specific row**. Matches the row numbers in the spreadsheet

    #### Optional inputs

    * **Sheet name** — The sheet tab to read. If omitted, the first sheet is used

    #### Output

    A JSON object with `row_number`, `values` (the cell values in order), and `record`. `record` maps the header names in row 1 to the row's values, and is `null` when the row you read is row 1 or the sheet is empty.
  </Tab>

  <Tab title="Get Sheet Values" icon="table-cells">
    ### Get Sheet Values

    Reads a range of cells.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Spreadsheet** — Search the spreadsheets you added and select one, or paste its URL

    #### Optional inputs

    | Input | Default | Description |
    | - | - | - |
    | **Sheet name** | First sheet | The sheet tab to read. |
    | **Range** | Whole sheet | An A1 range within the sheet, for example `A1:D10`. |
    | **Value render option** (under advanced settings) | **Formatted value** | **Formatted value** returns values as they're displayed, **Unformatted value** returns the underlying values, and **Formula** returns formulas instead of their results. |
    | **Output format** (under advanced settings) | **Rows (2D array)** | The shape of the output: **Rows (2D array)**, **Records (list of dicts)**, **Columns (dict of lists)**, **CSV (string)**, **TSV (tab-separated)**, **HTML table**, **Markdown table**, or **Raw (full API response)**. Records, Columns, CSV, TSV, HTML, and Markdown treat the first row of the range as the header. |

    #### Output

    A JSON object with the data under `values`, in the selected shape. **Raw** returns Google's full response instead, with `values` and `majorDimension`.

    <Note>
      **Records** and **Columns** need unique header names. If two columns share a name, rename one in the spreadsheet or pick another format.
    </Note>
  </Tab>

  <Tab title="Update Cell" icon="pen-to-square">
    ### Update Cell

    Writes one value to one cell.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Spreadsheet** — Search the spreadsheets you added and select one, or paste its URL
    * **Cell** — The cell in A1 notation, for example `A1`
    * **Value** — The value to write, as a string, number, or boolean

    #### Optional inputs

    * **Sheet name** — The sheet tab to write to. If omitted, the first sheet is used
    * **Value input option** (under advanced settings) — **Formula / number (interpret as typed)** (default) or **Plain text (no parsing)**

    #### Output

    Google's update response, including the updated range.
  </Tab>

  <Tab title="Write Row" icon="plus">
    ### Write Row

    Appends one row to a sheet, or overwrites one existing row.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Spreadsheet** — Search the spreadsheets you added and select one, or paste its URL
    * **Values** — A JSON array of cell values that map to columns in order, for example `["Alice", "alice@example.com", 42, true]`
    * **Write mode** — **Append to end** (default) adds the row after the last row with data. **Overwrite specific row** replaces the row you set under **Row number**
    * **Row number** — The row to overwrite when **Write mode** is **Overwrite specific row**

    #### Optional inputs

    * **Sheet name** — The sheet tab to write to. If omitted, the first sheet is used
    * **Value input option** (under advanced settings) — **Formula / number (interpret as typed)** (default) or **Plain text (no parsing)**
    * **Start column** (under advanced settings) — The column letter to start the row at, for example `A` or `E`. If empty, Google detects where the table is when appending, and overwriting starts at column `A`

    #### Output

    A JSON object with `updated_range` and the `row_number` that was written.
  </Tab>

  <Tab title="Write Rows" icon="list">
    ### Write Rows

    Appends several rows to a sheet, or updates several existing rows, in one run.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Spreadsheet** — Search the spreadsheets you added and select one, or paste its URL
    * **Mode** — **Add rows** (default) appends after the last row with data. **Update rows** overwrites the rows you name
    * **Row Data Format** — **Arrays** (default) or **JSON Objects**
    * **Row Data** — A JSON array with one entry per row. Its shape depends on **Mode** and **Row Data Format**:

    | Mode | Arrays | JSON Objects |
    | - | - | - |
    | **Add rows** | Each inner array is one row, mapped to columns in order: `[["Alice", "alice@example.com", 90], ["Bob", "bob@example.com", 85]]` | Keys are column letters: `[{"A": "Alice", "B": "alice@example.com", "C": 90}]` |
    | **Update rows** | The first element of each row is the row number to update: `[[1, "Alice", "alice@example.com", 95], [3, "Charlie", "charlie@example.com", 88]]` | Each object includes a `row_number` key: `[{"row_number": 1, "A": "Alice", "B": "alice@example.com"}]` |

    #### Optional inputs

    * **Sheet name** — The sheet tab to write to. If omitted, the first sheet is used
    * **Value input option** (under advanced settings) — **Formula / number (interpret as typed)** (default) or **Plain text (no parsing)**
    * **Start column** (under advanced settings) — The column letter to start rows at, for example `A` or `E`. If empty, Google detects where the table is when adding rows, and updates start at column `A`

    #### Output

    A JSON object with `rows_created`, `rows_updated`, and `updated_range`.
  </Tab>

  <Tab title="Google Slides" icon="display">
    ### Google Slides

    Reads the text content of a Google Slides presentation.

    #### Required inputs

    * **Google Account** — Select a connected account from the dropdown
    * **Presentation** — Search the presentations you added and select one, or paste its URL

    #### Output

    The presentation's text as plain text.

    Presentations whose export exceeds 5 MB aren't returned and the node reports that the presentation exceeds the maximum size.
  </Tab>
</Tabs>

***

## Key concepts

### Files Profound can reach

Profound holds Google's `drive.file` permission, which covers only the files you selected in Google's file picker and the files Profound created. Each file dropdown lists those files for the selected account, and the **Add files from Google Drive** action at the bottom of the dropdown opens the picker so you can add more.

Files that Profound creates with **Create Document** and **Create Spreadsheet** are available to later nodes without adding them.

### Selecting a file

The **Document**, **Spreadsheet**, and **Presentation** inputs accept:

* A file selected from the dropdown
* The file's URL, such as `https://docs.google.com/document/d/<FILE_ID>/edit` or `https://drive.google.com/open?id=<FILE_ID>`
* The file's ID
* A variable from a previous node's output, for example the `documentId` returned by **Create Document**

If the value is neither an ID nor a URL, Profound treats it as the file name and looks for an exact match, ignoring case, among the files it can reach. The node stops with an error when no file matches or when more than one does. Use the ID or URL in that case.

### Sheets, ranges, and values

* **Sheet name** is the name of a tab in the spreadsheet. Leave it empty to work with the first tab.
* **Range** and **Cell** use A1 notation, for example `A1:D10` or `B2`. Leave **Range** empty to read the whole sheet.
* **Value input option** decides how Google stores what you write. **Formula / number (interpret as typed)** treats `=SUM(A1:B1)` as a formula and `42` as a number, as if you typed them into the cell. **Plain text (no parsing)** stores them as text.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="The file dropdown is disabled or says no files are granted yet">
    * Select a **Google Account** first. The dropdown stays disabled until you do.
    * If the dropdown reads **No files granted yet**, Profound can't reach any file for this account yet. Select **Add files from Google Drive** and pick the files in Google's picker.
    * Changing the **Google Account** clears the selected file, because the files each account can reach differ.
  </Accordion>

  <Accordion title="A node reports that the document, spreadsheet, or presentation isn't found">
    Profound can only open files you added through the picker or files it created. Check that the file is one of them and still exists in Drive. If you pasted a URL or ID, confirm that it belongs to the same Google account you selected.
  </Accordion>

  <Accordion title="A node reports that no file, or more than one file, matches a name">
    The value you entered isn't an ID or URL, so Profound searched by name. Select the file from the dropdown, or paste its URL or ID.
  </Accordion>

  <Accordion title="A Sheets node reports that a worksheet isn't found">
    **Sheet name** must match the tab name in the spreadsheet exactly. Copy it from the spreadsheet, or leave the field empty to use the first tab.
  </Accordion>

  <Accordion title="A Sheets node reports that the range is outside the sheet">
    The error tells you how many rows and columns the sheet has. Use a range within those bounds, or add rows and columns to the sheet first.
  </Accordion>

  <Accordion title="Get Sheet Values reports duplicate header names">
    **Records** and **Columns** output formats use the first row as keys, so every header must be unique. Rename the duplicate columns in the spreadsheet, or switch **Output format** to **Rows**, **CSV**, or another format.
  </Accordion>

  <Accordion title="Create Spreadsheet reports that the content appears to be a different format">
    **Input format** must match the data under **Rows**. For example, JSON data with **Input format** set to **CSV** is rejected. Change **Input format** to the format of your data.
  </Accordion>

  <Accordion title="Create Document reports that the HTML content has no tags">
    With **Content format** set to **HTML**, **Initial Content** must contain HTML tags, such as `<p>...</p>`. Wrap the text in tags or switch **Content format** to **Plain Text** or **Markdown**.
  </Accordion>

  <Accordion title="Create Document can't find or access the destination folder">
    * If Profound can't find the folder, select it again through **Add a folder from Google Drive**.
    * If Profound doesn't have access to the folder, select a folder where the connected Google account can add files.
    * For a folder in a shared drive, the connected account must be a member of the shared drive, and your Google Workspace rules must allow it to add files there.
    * If the drive or folder is full, free up space or select a folder in another drive.
  </Accordion>

  <Accordion title="A node reports that the document or presentation is too large">
    Profound exports up to 5 MB per document or presentation. Split the file, or read a smaller document.
  </Accordion>

  <Accordion title="A node reports that you don't have permission to edit">
    The connected Google account has view-only access to the file. Ask the file's owner for Editor access, then run the node again.
  </Accordion>

  <Accordion title="A node reports that Google's rate limit or quota was exceeded">
    Google limits how many requests it accepts in a period of time. Wait, then run the Agent again. If this keeps happening, ask your Google Workspace administrator to review the API quota.
  </Accordion>

  <Accordion title="A node reports that the integration needs to be re-authorized">
    Google no longer accepts Profound's token for the account. In **Settings** > **Integrations** > **Google Drive**, revoke the connection and [connect the account again](/integrations/google-drive/connect-google-drive-to-profound#step-2).
  </Accordion>
</AccordionGroup>
