Writing Data to Spreadsheets Automatically

Updated: 2026-08-27Reading time: 5 min

Append rows, read ranges, and batch-update cells in Google Sheets and Excel Online from Cotonity workflows, with guidance on column mapping and efficient quota usage.

Choosing Between Google Sheets and Excel

Cotonity supports both Google Sheets (via the Google Workspace connection) and Microsoft Excel Online (via the Microsoft 365 connection). The right choice depends on where your team already works. Google Sheets is generally easier to set up and shares well across organisations without Microsoft licenses. Excel Online is the right choice if your organisation is standardised on Microsoft 365, your finance team needs native Excel formulas, or you have existing Excel files with complex pivot tables or macros that would be painful to rebuild in Sheets. Both integrations support the core operations — appending rows, reading ranges, and updating specific cells — that cover the vast majority of automation use cases. Advanced Excel features like running VBA macros are not supported through Cotonity's integration.

Appending Rows to a Sheet

The most common spreadsheet automation is appending a new row each time a workflow executes — for instance, logging every form submission, recording each AI agent task completion, or writing a daily metric snapshot. Add a Google Sheets: Append Row step, select your spreadsheet and the target sheet tab by name, and map the column values from your workflow's data context. Cotonity maps values to columns in order from left to right; make sure the header row in your sheet is in the same order as the fields you are mapping. For date and timestamp values, use Cotonity's 'date.toISOString()' helper to produce a consistent format, as spreadsheets can interpret numeric timestamps or ambiguous date strings unexpectedly. Enable the 'Include headers' toggle on first setup to have Cotonity automatically create a header row using your field names.

Reading Data for Downstream Processing

Workflows can also read from spreadsheets to drive logic — for example, maintaining a blocklist in a Sheet and querying it at the start of a workflow to skip processing for known bad actors, or reading a configuration table that controls the behaviour of an automation without needing to redeploy it. The Google Sheets: Get Range step returns a two-dimensional array of cell values for the specified A1 notation range (for example, 'Sheet1!A2:D100'). Follow it with a Data Transform step to convert the array into a structured object array keyed by header names, which makes downstream steps much easier to configure. To avoid reading stale cached data, use the 'Force refresh' option on the step when your workflow runs more frequently than once per minute.

Updating Existing Cells and Batch Writes

When you need to update a specific cell rather than append a new row — for example, marking a row as 'Processed' after your workflow handles it, or updating a summary dashboard cell with a new metric value — use the Google Sheets: Update Cell step. Provide the target cell address in A1 notation and the new value. For workflows that need to write many cells at once, use the Batch Update step, which accepts an array of cell address-value pairs and executes all writes in a single API call. Batch updates are significantly more efficient than chaining multiple individual update steps and dramatically reduce the number of API quota units consumed. This matters especially in loops that process hundreds of rows and update a status cell for each one.