BREVO - ERROR: Request failed with status code 400


Im trying to connect to mongodb database (find documents) and create a new contact on Brevo every hour. The flow was working the first time I did it but since then I have gotten the same error on the Brevo side → ERROR: Request failed with status code 400

Basically input works but output gives me error.

Error details:

NodeApiError: Request failed with status code 400
    at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:117:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:733:23)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:656:53

n8n version: Version 1.21.1
Database: (default: SQLite). Not sure if this is correct.
n8n EXECUTIONS_PROCESS setting (default: own, main) - > not sure about this
Running n8n via cloud

#Please share your workflow

What it can be?

Workflow info

Let me know if you need more information.

Thank you in advance

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I added the workflow and information requested.

Hey @jricardo11,

Welcome to the community :tada:

When you get the error do you have multiple items coming from the MongoDB node? The 400 normally means Brevo is unhappy with the data being sent so if could be that one of the items is missing some data that you are trying to send.

@Jon any way to debug this? or perhaps try differently?

Hey @jricardo11,

I would check the inputs on the node to see if anything is missing.

I was able to make it work. I had to change to create or update, not just create. But now I have another problem with the scheduler trigger. I put to run every 5 minutes and I see the task running but it doesn’t add any contact to Brevo.

Any suggestion on what could be the issue?

Hey @jricardo11,

What does the execution log show? It could be that there is nothing to change.