Hi team
,
I’m trying to run an n8n workflow using the Form Trigger node and execute it via cURL.
Here is my workflow JSON (simplified):
{
“name”: “trial1”,
“nodes”: [
{
“parameters”: {
“formTitle”: “Request a form”,
“formDescription”: “Fill out this form to request an installation.”,
“formFields”: {
“values”: [
{
“fieldLabel”: “Email”,
“fieldType”: “email”,
“requiredField”: true
},
{
“fieldLabel”: “Prefered installed date”,
“fieldType”: “date”
}
]
}
},
“type”: “n8n-nodes-base.formTrigger”,
“name”: “On form submission”,
“webhookId”: “9cefaa6f-1e7c-48a8-83ea-5acdd96e7bb0”
},
{
“parameters”: {
“conditions”: {
“conditions”: [
{
“leftValue”: “={{ $json[‘Prefered installed date’].toDateTime() }}”,
“rightValue”: “={{ $now.plus(7,‘days’) }}”,
“operator”: {
“type”: “dateTime”,
“operation”: “beforeOrEquals”
}
}
]
}
},
“type”: “n8n-nodes-base.if”,
“name”: “Is within 7 days”
}
],
“active”: true
}
What I tried
I executed this cURL:
curl -X POST http://localhost:5678/form-test/9cefaa6f-1e7c-48a8-83ea-5acdd96e7bb0
-H “Content-Type: application/x-www-form-urlencoded”
-d “Email=test@example.com”
-d “Prefered installed date=2025-08-20”
But in the execution, I’m getting this:
{
“Email”: null,
“Prefered installed date”: null
}
Hello Nandhini,
If your main goal is API-style testing with cURL, replace the Form Trigger with a Webhook Trigger. Example:
{
“parameters”: {
"path": "form-test",
"method": "POST"
},
“type”: “n8n-nodes-base.webhook”,
“name”: “On webhook call”,
“webhookId”: “9cefaa6f-1e7c-48a8-83ea-5acdd96e7bb0”
}
Then send:
curl -X POST http://localhost:5678/webhook/form-test \
-H “Content-Type: application/json” \
-d ‘{“Email”: “test@example.com”, “Prefered installed date”: “2025-08-20”}’
This will correctly pass the values into $json.
Thanks,
I‘m not clear. Could you please provide me with the workflow as a JSON file? I’m not sure whether I should use the Webhook node or the Form Submission node.
You can totally test your form with curl if this is what you are looking for.
for this form:
the curl to the production url would look like:
curl --location 'https://your.instance.com/form/e0838255-5022-4215-8db4-68c2eba0cdc7' \
--form 'field-0="New Name"' \
--form 'field-1="test_email@gmail.com"'
“Yes, it works. Thanks! Just curious, how did you identify this as the solution — is there any documentation available for this?”
I looked at the call that is made in from the form in the dev console of the browser as I submitted the form.
If this was helpful, kindly mark my answer as solution. Thank you.
Cheers!
Got it, thanks for explaining! That makes sense now. Marked your answer as the solution