Put an answer into a Google Sheet
write_to_sheetWrites an earlier answer into a Google Sheet without overwriting anything. Give run_id (every answer has one) to write its rows as new dated columns beside the rows they came from (matched by id; a row that now holds a different place is skipped and named), or as a table in a new tab; give job_id (a background job) to write each chunk beside its rows as it finishes, or the whole run when it is done. Each write adds a line to an "InstaMaps runs" tab. The sheet must be shared with the InstaMaps service account as Editor; if it isn't, the error names the address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | The tab. Default: the tab the rows came from. | |
| mode | No | beside: new columns next to the rows they came from (the default when the run came from this tab). new_tab: the rows as a table in a new tab (the default for any other sheet). | |
| sheet | No | A Google Sheets link. Default: the sheet the rows came from. | |
| job_id | No | Or a background job's job_id. | |
| run_id | No | The run_id from an answer (run.run_id), or from get_job when a job is done. | |
| columns | No | Which of the answer's fields to write, by name (e.g. "Latitude", "Confidence", "Nearest A&E", or geocode keys such as postcode or uprn). Default: the tool's usual columns. |