Reading values from request and saving into excel

I am new in n8n and I am trying to add into Excel, some values that I am reading from an API.
The API is a public API of Chuck Norris sentences: “
And the flow is the next:

The connection with Excel runs properly but I cannot add the results of API into the excel file.
How is the correct way?
The error when I execute the flow is the next:
My goal is to create a new excel file with the name that I want and save in the first sheet the values that come from the API.
Thank you very much for your time!

Hi @franchogarcia, welcome to the community! Now that’s an API I can get behind :smiley:

So assuming you want to post this to an Excel file stored on OneDrive, you’re on the right track here. To insert data into an Excel worksheet using the n8n node, you’d first need to define a table in the respective worksheet. This is how it looks in the German web version of Excel (I haven’t figured out how to change it to English, but it’s hopefully still helpful):

Next, your table would need to have column headers matching the field names in n8n. In n8n, you can for example define the exact data structure using the Set node and expressions for each field:

. Of course you could alternatively adjust your Excel table column headers accordingly.

In the Excel node you’d then need to make sure to select the correct Workbook, Worksheet and Table:

Afterwards, your workflow should run as expected. Here’s my example flow for reference (when copying it into your n8n canvas, you’d of course need to update each of the fields above to match your data):

Example Workflow

As a simpler alternative, you could also consider using the Spreadsheet File node. This allows creating spreadsheet files without the need for a connection with the online version of Microsoft Excel.

1 Like

Thank you very much for your suppor!! It is running properly!!
Thanks a lot!

1 Like

Awesome, glad to hear and many thanks for confirming!

1 Like