HTTP Request Node throws circular JSON error, silent write features

Describn8n version: 2.9.4 (self-hosted, Docker)

Problem 1: Circular JSON error

When using an HTTP Request node to POST a Flux query to InfluxDB v2 (/api/v2/query), I get:

Converting circular structure to JSON --> starting at object with constructor 'Socket' | property '_httpMessage' -> object with constructor 'ClientRequest'

The node config: POST, application/vnd.flux content type, raw body with Flux query, Bearer token auth. The same query works fine via PowerShell/curl directly against InfluxDB.

Problem 2: Silent write failure

A separate HTTP Request node writing to InfluxDB via line protocol (/api/v2/write) shows no error in the execution log but nothing is written to the bucket. The input data is correct (verified in execution log). The write endpoint returns no error code.

What I’ve tried:

  • Replacing HTTP Request with a Code node using $http, $helpers.httpRequest, and fetch — all undefined in 2.9.4

  • Setting response format to Text with neverError: true

  • Simplifying the Flux query

Is there a working pattern for querying and writing to InfluxDB from n8n 2.9.4?e the problem/error/question

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:

the circular structure error is usually the response object serialization — influxdb v2 returns streams that n8n cant auto-serialize. try wrapping the response in a Code node with JSON.stringify(...) instead of letting n8n handle it (iirc the exact variable depends on version, might need some trial and error there). for the silent write, check bucket permissions first and do a curl with -v to confirm the request is actually hitting the endpoint. which influxdb version btw? the v2 api changed quite a bit between releases.

Hi @andrew2016

Based on the influxdb docs:

1.Circular JSON: InfluxDB v2 /api/v2/query returns a streaming CSV response, not JSON.

Fix: set response format to Text and make sure “Ignore SSL issues” isn’t accidentally on, but more importantly, set the Accept header to application/csv explicitly so InfluxDB returns plain CSV instead of a stream.

2. Silent write: n8n’s HTTP Request node in auto mode tries to parse the empty body as JSON and throws an internal error that gets swallowed.

Fix: set response format to Text and add ignore response body option.

Let me know if it works :crossed_fingers:

Thanks but I seem to have a new problem!