Send email with SendInBlue

What you’ll need

  • SendInBlue account (Free plan)
  • Adalo Paid Plan to access Custom Actions

SendInBlue Configuration

  • Create a free account (300 emails/day limit, which is a lot)
  • Verify a sender
  • Verify a domain (optional but recommended)
  • Get your API key (Account > SMTP & API)

Adalo Configuration

  • Make sure you have data available on the screen where the custom action is set up
  • Create a Custom Action
  • Name: Class Booking Confirmation (or anything that helps you identify the custom action)
  • Type: CREATE
  • Base URL:
  • Method: Post
  • Add a Header
    • Name: api-key
  • Body: Example JSON code below (Full reference of transaction emails you can send: https://developers.sendinblue.com/reference)
{
	"sender": {
		"name": "Peculiar Yogi Mail", // Your display name
		"email": "namaste@peculiaryogi.com" // Your sending email address
	},
	"to": [{
		"email": "hello@peculiaryogi.com", // Replace with the user's email address that you want to send to
		"name": "Hello Peculiar Yogi" // Replace with the user's first name
	}],
	"subject": "Peculiar Yogi Class Booking Confirmation",
"htmlContent":"<html><head></head><body><p>Hello,</p><p>This is to confirm that you've successfully booked a class at Peculiar Yogi.</p><p>Class Name:</p><p>Class Instructor</p><p>Class Time:</p><p>Namaste.</p></body></html>"
}
  • Add items to the inputs. Applicable if you’re going to send dynamic data from your data collection depending on the user’s details or what they’re clicking on
    • (Eg. in my case, we have to pull data from the schedule that the student is booking since this is a confirmation email, so I’d have to insert input fields for me to match with magic text from the data collection. More on that below)
  • Run test request > Save custom action

Final touches

  • Match the magic text to the fields from the custom action
  • Eg. if you had “User’s First Name” as an input, you’d want to match it with the User data collection > First Name. Same thing for the email address, if you’re sending it to a user.

Potential Errors

  • 400 Status Error (JSON code) - Use something like a JSON validator before pasting the code into Adalo
  • 401 Authentication/Authorisation error (API Key) - Make sure you’re using V3 API key from your SendInBlue account. Also, make sure you follow the format above. (Don’t input “Authorization” or “Authorisation”, you MUST input “api-key” (without the quotation marks)
3 Likes

@vancewong If you can’t use Magic Text within the htmlContent, how are you populating the variables in that content dynamically? I see your variables are Class Name, Class Instructor, and Class Time. I’m having this problem in SendGrid- although I will try to use a JSON Validator next time. All I’m trying to do is send the 6 digit verification code using one of their (nicely formatted html) dynamic email templates.

Hey @tdhi, you can insert Magic Text in the HTML or even anywhere in the JSON code. Just make sure that you don’t have line breaks within a single statement. That screwed me up quite bad at the start :joy:

For eg, don’t do this:

{ “email” :
“Magic Text”
}

I haven’t tried sending email templates yet, so I can’t say for sure. But I imagine the implementation is the same, just that you’ll be copying and pasting lesser code.