Create a string / json after read Google Sheet

tl;dr Use Aggregate, Aggregate, Aggregate… :sweat_smile:

Hi, I’d like to know how to use the Google Sheet Read block to return all data at once instead of row by row.
I can't start by filtering the Google Spreadsheet, I need this data directly for my API call.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Welcome to the community @Robert_Work !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


You need to be more specific what aggregation should look like. If you want all the rows to be in a single array then it is a matter of using the expression {{ $input.all().map(i => i.json) }} as demostrated in the workflow below (just one of the solutions).

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.