Hello,
I am experiencing an issue with a workflow that uses a Gmail Trigger and gmail node: send message and wait for response.
When I was testing the workflow manually from the editor (clicking on the button execute workflow), the feedback link (where I can put a text giving feedback on the response) was correctly generated with the public URL of my n8n instance deployed on Railway (https://......railway.app). In this scenario, the workflow functioned without any problems.
However, when I activate the workflow to run automatically (in production mode), the link sent via email for giving feedback always starts with http://localhost:5678/.... This prevents the workflow from continuing, as the URL is not accessible from outside the local machine.
I have verified that the WEBHOOK_URL environment variable is correctly configured in my Railway deployment with the public URL of the instance. . Despite this, the problem persists.
Could you please help me understand why the active workflow is not using the WEBHOOK_URL variable and is instead generating the localhost URL?
Thank you for your assistance.
Best regards
Thank you for your response and the Docker command example. I am deploying my n8n instance using a Docker container on Railway. Therefore, I cannot directly execute the docker run the command you provided me.
As you can see in the attached screenshot, I have configured the WEBHOOK_URL environment variable with my public Railway instance address (https://...railway.app), just as you advised.
Despite this variable being correctly set, the problem persists:
In test mode (within the editor): The webhook link is generated correctly using the Railway URL.
In production mode (active workflow): The webhook link sent via email always starts with http://localhost:5678.
To rule out any issues with my original workflow, I have created a much simpler one that still shows the same error in production.
I have recently tried to add the variables as well. Nevertheless, the result is still the same: it shows ‘localhost’ when triggered automatically, but the normal URL when done manually.
Thank you for your replies. I tried to deploy n8n in another container, and after importing the flow from the previous one, everything went perfectly. It’s strange, but at least I have a solution now, and I’ll keep using the new one.