Summary:
I’ve created a workflow on Railway-hosted n8n to receive calendar appointments via a webhook and create them in Google Calendar. The webhook correctly receives JSON with title
, start
, and end
fields — I can see them in the execution output.
But when I try to use {{ $json.title }}
and similar expressions in the Google Calendar node, it shows up as undefined
, and the events are created without title or time. I’ve tried all the tricks (Set node, Edit Fields, Code node) and nothing fixes it.
Details:
I’m using n8n hosted on Railway.app with the following workflow:
- Webhook (POST) receives data like:
json
CopyEdit
{
"title": "Dentist Appointment",
"start": "2025-04-27T09:00:00Z",
"end": "2025-04-27T10:00:00Z"
}
- Execution Output clearly shows the data under
body.title
,body.start
, andbody.end
. - Google Calendar node is using expressions like:
javascript
CopyEdit
{{ $json.start }}
{{ $json.end }}
{{ $json.title }}
…but they all return undefined
in the node and the calendar event has no data.
- What I’ve tried:
- Adding a Set node to pass fields forward (didn’t work)
- Using a Code node to map
item.json = item.json.body;
(no change) - Using an Edit Fields node to manually remap (still
undefined
) - Checked node execution order — webhook is triggering properly
- Checked that I’m not missing
Include Other Input Fields
(it’s on)
I’ve also tried to use {{ $json.body.title }} instead of {{ $json.title }} but it also didn’t work. The Webhook does pull the data, but it seems to get lost before it gets to the google calendar node. The result is it creates a calendar appointment, but with no title, and the start and end dates/times are the exact current time that it is at the moment.
Goal:
Just want to reliably pass the webhook POST body values (title
, start
, end
) into the Google Calendar node so they create a proper event.
Screenshots attached:
Thanks in advance — any help would save my sanity!