Sendinblue integration node

Hello everyone,

It’s possible to add sendinblue as node ?
SendinBlue is a french company for marketing : add contact, send email…etc

Actually I use Http Request for this

Thanks a lot !

Hi @Freddy, thanks for sharing, Sendinblue really got some traction over the last years. There actually is an existing feature request for this on which you might want to vote:

And even better, fellow community member @BenW is actually working on a node for this service:

1 Like

Great !

Thank you !

1 Like

has anyone ever managed to send an email with the http request?

When I test with an template id, i have this error " Invalid template id"

Details

Time

01/12/2021, 21:16:46

HTTP-Code

rejected

Cause
Data below may contain sensitive information. Proceed with caution when sharing.

{

“status”: “rejected”,

“reason”: {

“message”: “Request failed with status code 400”,

“name”: “Error”,

“stack”: “Error: Request failed with status code 400 at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)”

}

}

Stack

NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/HttpRequest.node.js:860:27)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:447:47

Need help? Open HTTP Request documentation

Can you share the endpoint you are trying to use and how you configured the HTTP ndoe?

Yes of course !

https://developers.sendinblue.com/reference/sendtransacemail

{
  "nodes": [
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.sendinblue.com/v3/smtp/email",
        "options": {},
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "templateId",
              "value": "5"
            },
        },
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "api-key",
              "value": ""
            }
          ]
        }
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    }
  ],
  "connections": {}
}

I would change the API key after testing

Hi @Freddy, @RicardoE105 you might want to remove and revoke your API key now to avoid any abuse, this is a public forum after all. Seeing Sendinblue has a free testing plan we can create our own one whenever needed.

I’ll take a quick look into this shortly and see if I can get it to work using the HTTP Request node :slight_smile:

That’s good, i remove the api key !

Thank you !

1 Like

Thanks! From looking at the documentation it seems a few additional fields are required (like a sender and recipient object) which weren’t part of your example. When passing on these objects, Sendinblue accepts the API request and the email goes out fine:

Example Workflow
{
    "nodes": [
      {
        "parameters": {
          "requestMethod": "POST",
          "url": "https://api.sendinblue.com/v3/smtp/email",
          "jsonParameters": true,
          "options": {},
          "bodyParametersJson": "{\n     \"sender\": {\n          \"name\": \"Tom\",\n          \"email\": \"[email protected]\"\n     },\n     \"to\": [\n          {\n               \"email\": \"[email protected]\",\n               \"name\": \"Tom\"\n          }\n     ],\n     \"replyTo\": {\n          \"email\": \"[email protected]\",\n          \"name\": \"Tom\"\n     },\n     \"textContent\": \"Hello world\",\n     \"subject\": \"Test Message from Sendinblue\"\n}",
          "headerParametersJson": "{ \"api-key\": \"\" }"
        },
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 1,
        "position": [
          450,
          300
        ]
      },
      {
        "parameters": {},
        "name": "Start",
        "type": "n8n-nodes-base.start",
        "typeVersion": 1,
        "position": [
          250,
          300
        ]
      }
    ],
    "connections": {
      "Start": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    }
  }

(You can copy & paste this example right into your n8n canvas, you’d only need to swap email addresses and add your API key.)

Going forward, you might want to store your API key as Header Auth credential so it’s separated from the workflow. This way, you can re-use it in multiple nodes and don’t risk sharing the key by accident when sharing your workflow:

image

2 Likes

Thank you so much that’s good !

2 Likes