Problem with Telegram Send and Wait for Response in Loop (n8n on Railway)

Hi,

I’m having issues using the Telegram Send and Wait for Response node in a loop in n8n (hosted on Railway). The first message works, but from the second iteration I get invalid URL errors with the webhook button.

I’ll provide screenshots for details. Looking for advice on how to handle multiple Send and Waits in one workflow.

Thanks!

1 Like

Bad Request: inline keyboard button URL
'$({RAILWAY_PUBLIC_DOMAIN/webhook-waiting/68/a7eedd69-2268-43ba-ba81-f9394a9bb523?approved=true' is invalid: Disallowed character in URL host

Can you provide where you use the expression?

The '$({RAILWAY_PUBLIC_DOMAIN

I don’t have to give it to any node, I think it’s generated by the Send and Wait node. It’s the link that appears under a Telegram message — the one I’m supposed to respond to.

Okay, after some testing, I think there’s a bug on your end in some special circumstances.

When the workflow runs for the second time, the Telegram node cannot get the correct webhook URL from your setting ${RAILWAY_PUBLIC_DOMAIN}, so the button url on Telegram break.

Screenshot_20250613_080246_fw4KHiMC@2x


It’s working fine on my end though.
The possible cause might be Railway or something fundamental or platform level issue.

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