413 error code

Describe the problem/error/question

I have a 413 error code. I have 3896 items from an API call and need to save them to my google sheets. Is there anyway for me to keep this data as I will lose all my credits for the API use? Already done two calls that wasted them.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

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:

@spencerbf , what API produces this error? The HTTP code 413 normally indicates that the content is too large. You might need to break it down into smaller payloads.

Hey @spencerbf,

How do you have n8n deployed? If it is self hosted you can try tweaking the payload max size environment option but the best option would be to work with smaller chunks of data.

@spencerbf , I actually encountered this error when running a node in the workflow that has some other nodes pinned. Once I unpinned the nodes that node starts to work. See if you have any node pinned too.

@Jon @ihortom I am running in the cloud and I have no pinned nodes. I am guessing the response is too big, but lost the data now.

@Jon @ihortom is there any easy way in n8n.io to allow only x amount and the update my google sheet and call the api again? does http request node allow this?

@spencerbf , yes, the HTTP Request node does provide means to control the payload, but this feature depends on whether the API you are using allows you to specify the number of items you want to receive.

In other words, check the API documentation how the payload could be controlled (if possible at all). If the API provides the means for that then the HTTP Request node can be configured to do that for you.

Having said that, you mentioned that you already managed to receive 3896 items from the API. Then it is just a matter of batching the items with the Loop node to populate your spreadsheet with the smaller number of items repeatedly until all recorded.

You also asked

Is there anyway for me to keep this data?

Yes, there is. You can save the result of executions, which is enabled in workflow Settings, and then reuse the saved data to update and test your workflow without engaging the API again.

1 Like

thanks @ihortom

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