Google Drive node “Upload File” — TypeError: Converting circular structure to JSON

Awesome—here’s a ready-to-post message for the n8n Community using their template, with your workflow embedded and the key details about the error and setup. You can copy/paste as-is, then fill in the few environment blanks.


Describe the problem/error/question

I’m uploading a file from a Form Trigger to Google Drive (Upload file). The upload intermittently fails in the UI with:

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
 | property 'res' -> object with constructor 'Object'
 | property 'socket' -> object with constructor 'Object'
--- property '_httpMessage' closes the circle

The Form Trigger provides a single file field; the Google Drive node takes that binary and uploads it into a specific parent folder. I selected My Drive and set the destination folder using the Folder field (by URL mode).

I suspect the error is a frontend serialization issue (a circular response object being stringified). It appears when the Google Drive node evaluates inputs and tries to render/preview results.

Questions

  1. Is this a known serialization issue in the Google Drive node or UI preview?

  2. Is there any constraint with using the Folder parameter in URL mode vs a raw folder ID?

  3. Any recommended workaround (e.g., always passing a plain ID; disabling response preview; mapping only primitives)?


What is the error message (if any)?

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
 | property 'res' -> object with constructor 'Object'
 | property 'socket' -> object with constructor 'Object'
--- property '_httpMessage' closes the circle

(Stack trace points to vue.runtime.esm-bundler...)


Please share your workflow

(Direct copy from my editor)


Share the output returned by the last node

The node fails before a JSON payload is shown; the UI throws the TypeError above. There’s no structured JSON result I can copy. If needed, I can enable execution logs and attach them.


Information on your n8n setup

  • n8n version: 1.118.1

  • Database (default: SQLite): SQLite

  • n8n EXECUTIONS_PROCESS (default: own, main): main

  • Running n8n via: Docker

  • Operating system: n8nio/n8n:latest image


Extra notes / things I tried

  • Using Folder as a URL (current config).

  • Switching to a plain folder ID (paste only 1_IBtDweCJKQ1gyVD8PBTQhNKRp3osAFE) — seems more stable; does n8n v3 prefer IDs?

  • Confirmed the binary field is file and the name is ={{ $json.file.filename }}.

  • Target is My Drive, not a Shared Drive (no extra flags needed).

Welcome to the n8n community @Ibrahim_Elhofy!

Thanks for the detailed description! I tried your workflow but in my case it works fine. I assume you tried it with different files?

I found out that similar errors have been reported in the past with n8n, but not in connection to the nodes that you are using:

It might be best if you open a bug report here: Sign in to GitHub · GitHub