Hello n8n community.
I have only started using n8n a month ago and so far it has been fine. However, for the last two days I have been trying to solve the following:
My Setup:
- n8n Version:
1.91.2
(Updated from releases, 1.86.1, 1.90.2 issue persists) - Hosting: Self-hosted via Docker Compose on Linode (Akamai Cloud)
- OS: Ubuntu 24.04 LTS
- Reverse Proxy: Caddy (Handles HTTPS, proxies to n8n on internal port 5678)
- Workflow Database: PostgreSQL 16 (Running in separate Docker container
postgres_tm
) - n8n Execution Data: Default (Presumably SQLite within the persistent
/home/node/.n8n
volumen8n_data
) - Environment:
NODE_FUNCTION_ALLOW_BUILTIN=crypto
is set for the n8n service indocker-compose.yml
, stack fully restarted after adding.
Workflow Goal & Structure (TM API - Segments POST
):
The goal is to create a POST
API endpoint (/api/v1/segments
) that:
- Receives a JSON body:
{ "language_code": "...", "content": "..." }
(via Webhook node, Auth: None, Response: responseNode). - Calculates SHA256 hash of
content
usingrequire('crypto')
(via Code node). - Checks if hash exists in
translation_segments
table (via Postgres node,Execute Query
,SELECT ... WHERE content_hash = $1
, parameter set via Options->Query Parameters). - Uses an IF node to branch based on whether the SELECT returned rows (
$node["Postgres"].json.length > 0
). - False Path (New Segment): Inserts the new segment (via Postgres1 node,
Execute Query
,INSERT ... VALUES ($1, $2, $3) RETURNING segment_id
, parameters$1,$2,$3
set via Options->Query Parameters using an array[...]
referencing Webhook and Code nodes). Then goes toRespond to Webhook1
. - True Path (Existing Segment): Goes directly to
Respond to Webhook
. - Response Nodes (
Respond to Webhook
/Respond to Webhook1
): Both are configured with:
Respond With: JSON
Response Body
(Expression Mode):{ "segment_id": {{$node["NodeName"].json[0].segment_id}} }
(targetingPostgres
for true path,Postgres1
for false path respectively).Response Code
:200
(true path) or201
(false path), set via Options.- No JWT credential is selected or required by the UI in this configuration on v1.90.2.
The Problem (on v1.90.2):
- The workflow configured as above Saves and Activates successfully.
- Sending
POST
requests to the Production URL (https://[...]/webhook/api/v1/segments
) using external tools (PowerShellInvoke-RestMethod
, also triedcurl
equivalent) results in no tool-side errors (implying HTTP 200/201 status is received). - However, the tool receives NO response body. The output is empty.
- Checking the Executions List in the n8n UI shows these runs were triggered and completed with a status of “Succeeded”.
- Trying to view the details of any of these “Succeeded” executions fails – the detail panel shows a loading spinner indefinitely and never loads.
Troubleshooting Already Performed:
- Confirmed
crypto
module works viaNODE_FUNCTION_ALLOW_BUILTIN
and testing Code node in isolation. - Confirmed correct PostgreSQL parameterized query setup via Options → Query Parameters (using single value for SELECT, array for INSERT). DB Credentials test successfully.
- Tried alternative
Respond to Webhook
configurations:- Using intermediate
Set
nodes +Respond With: First Incoming Item
(This also allowed activation but still resulted in an empty response body). - Using
Respond With: Text
+ direct expression{{ $node... }}
(This also allowed activation but still resulted in an empty response body).
- Using intermediate
- Cloned the workflow (did not resolve the issue).
- Checked n8n logs (
debug
level, following with-f
) during activation attempts and during production runs – no specific errors related to response sending or execution finalization were observed, just the standard execution flow messages ending in success/finalized. - Checked server resources (CPU/RAM/IO) – no bottlenecks found.
- Checked SQLite DB integrity (
PRAGMA integrity_check
) in a previous session - was okay. - Verified correct Production URL (no port) used for testing.
Question:
Why would this workflow activate and log executions as “Succeeded” on v1.90.2, yet consistently fail to return the response body AND fail to load the execution details view? Is this a known issue, perhaps related to Postgres interaction (even though just reading/writing basic data), execution logging/serialization bugs, or async handling in the Respond to Webhook
node that persists in v1.90.2? What further diagnostic steps could pinpoint why the response isn’t being sent and the details aren’t loading, short of updating n8n again?
I can provide the workflow JSON if requested.
I hope someone can provide some guidance…