Google Sheet Writer
Google Sheet Writer writes the data it receives from the flow to a Google spreadsheet. Each item becomes a row, and each field of the item, a column.
It can add the rows at the end of the tab, or empty it and write it again with a first header row carrying the name of each field.
When to use it
- Logging in a sheet the orders or contacts a form collects.
- Dumping an updated list of incidents every week.
- Saving in a sheet the data an agent extracts from emails or documents.
Configuration
This component needs the credential of the Google Sheets service. In the Credential field (required), pick one with Choose an option or create one with Add new credential. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The credential of your Google account. |
| Select Google Sheet (optional) | The spreadsheet to write to. Pick it in the selector. Leave it empty to create a new spreadsheet in your Drive. |
| Sheet Name | The tab of the spreadsheet to write to. The list loads with the tabs of the chosen spreadsheet; press the refresh button if they do not appear. If the tab does not exist it is created; left empty, the first tab is used. |
| New Sheet Title (if creating) | The title of the new spreadsheet created when Select Google Sheet is empty. Default: NappAI Sheet. |
| Write Mode | append adds the rows at the end of the tab. overwrite clears the tab and writes a header row with the field names and the data below it. With append, the header row is also written when the tab is empty. Default: append. |
| Input Data | The data to write. Connect a list of data or a message; each item is a row. |
Using it as an agent tool
You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.
Output
Result returns the same data that was written to the sheet.
Example
A real estate agency logs the contacts that come in from its website:
- A web form starts the flow with the name, phone number and property of interest.
- A data component puts those fields in order.
- Google Sheet Writer, with the
Web contactsspreadsheet, theOctobertab and Write Mode set to append, adds one row per contact.
Good practices
- Every row follows the order of the fields as they first appear in the data; an item without a field leaves that cell empty. When appending to a tab that already has rows, send the fields in the order of its columns.
- Use overwrite only when you want the tab to show just the latest batch, because it clears what was there.
- For new flows, Spread Sheet and Sheet Cells offer more actions on your sheets.
Related components
- Spread Sheet: works with Google spreadsheets.
- Sheet Cells: reads, adds, changes and deletes rows of a tab.