Hi n8n community,
I’m encountering an issue while trying to create a workflow using the n8n API. I’m getting the following error response:
TTP Error: 400 Client Error: Bad Request for url: https://scanorgg1921.app.n8n.cloud/api/v1/workflows
Error 400: Please verify the provided workflow data.
What I’ve Tried:
- I’m sending a JSON payload to the
/api/v1/workflows
endpoint that looks like this:
Name: “Enviar correo con Gmail”
Nodes: Includes a “Manual Trigger” and “Gmail Send Email” node with proper configurations, including parameters like email subject, body, and recipient.
Connections: Defines connections between “Manual Trigger” and “Gmail Send Email.”
Settings: Left mostly empty as this is a simple workflow.
- I’m authenticating with the
X-N8N-API-KEY
header, and I’ve confirmed that the API key is valid since it works for other requests like fetching existing workflows. - I’ve verified that the API endpoint URL is correct:
https://scanorgg192.app.n8n.cloud/api/v1/workflows
. - I ensured the API key is clean, with no extra spaces or line breaks, and included in the headers.
Questions:
- Are there any additional fields or settings that are required in the JSON to successfully create workflows?
- Does the JSON I’m sending have any issues in terms of structure or missing mandatory fields?
- What are the common scenarios where a 400 error might occur when creating workflows?
Any insights, ideas, or suggestions on how to debug and resolve this issue would be greatly appreciated!
Thanks in advance for your help