Send email to multiple recipients with SendGrid

I created this but did not get any response, so I’ll try again.

I´m using dynamic template to send emails from Adalo. It works fine when I send only to one recipient. But is it possible to send to multiple?

The JSON should be like this:
{
“personalizations”: [
{
“to”: [
{ “email”: “recipient1@example.com” },
{ “email”: “recipient2@example.com” }
],

I only want to use one text input to enter the recipient emails… Is this possible to solve?

Hi @Eccles,

In my opinion this isn’t possible with built-in Adalo features.

I would explore 3rd party integration platforms like Make (this is definitely possible to do it there).

Best,
Victor.

Ok, I´ll check out Make

It may be better to use an email marketing tool instead of a single sending email tool like Mailerlite instead of sendgrid for sending an email to multiple recipients.

I made a tutorial for creating an email list and adding a user to the list with mailerlite a few years ago, may still work well for your use case: https://www.youtube.com/watch?v=KUDIXOxXhvw

1 Like

I have done some testing. And I`m not sure if this will work.
I want to allow users to be able to invite to meetings and similar events. So, a user can create several meetings with several different recipients. And the recipients will be different for each meeting. Do you think this is doable in MalerLite? As far as I understand, I need to create a group of recipients in MalerLite for each meeting?

Here’s what I’m looking for: When a user wants to invite people to a meeting, they should be able to create a new meeting in Adalo, filling in various details like time, location, agenda, etc. There should also be an input field where they can add one or more email addresses for the invitees.

Yes, it’s still what I would do in that situation.

Create a new “group” in mailerlite each time you create a new meeting. This is also possible to do with mailerlite’s api. Then, you can add the users to the group.

Yes. This is gold. I can now create new groups and save the response and then add subs to that group. The only issue left now, is how I can add subs to the group from one text input in Adalo. Is this possible?

As far as I understand, I need to send an API request with JSON data like this to MailerLite::

[
   {
      "email":"johndoe@mailerlite.com",
      "fields":{
         "name":"John",
         "surname":"Doe",
         "company":"MailerLite"
      }
   },
   {
      "email":"johndoejr@mailerlite.com",
      "fields":{
         "name":"John Jr.",
         "surname":"Doe",
         "company":"MailerLite"
      }
   }
]

How can I add multiple emails from one text input? If possible at all?

After closer inspection, I don’t think this will suit my use case. When sending mail from MalerLite (campaign) it seems like it´s not possible to select the recipient group/subscriber group as this is predefined in the campaign?
In the API request I was hoping it was possible to tell MailerLite what campaign(camaignID) to send along with what subscriber group(groupID) that should receive the email.

You’d add each user individually to the group, not all of them in a single api call.

You can select a single group to send the email.

Steps:

  1. Create a group when a new event is created: https://developers.mailerlite.com/docs/groups.html#create-a-group
  2. For each user on the list, add them to the group https://developers.mailerlite.com/docs/subscribers.html#create-upsert-subscriber
  3. Create a campaign and assign the group to it https://developers.mailerlite.com/docs/campaigns.html#create-a-campaign

@Eccles in order to add multiple emails from one input you need to:

  • take the string value from the input
  • parse it and divide it into individual entries
  • create a JSON with an array, each array item representing the entry
  • call an API and pass this JSON to the endpoint.

Unfortunately, Adalo can’t do #2 and #3. Moreover, for #4, Adalo needs to extract multiple records and put them into a custom action as an array, which is not possible as well in general case: we don’t know how many entries are there in the resulting call - could be 10, could be 5, etc.

So the possible workarounds are:

  • use platforms like Make: send the string from the input and let them do the rest. By the way I can’t remember now if Adalo’s custom action call will pass commas in the payload sucessfully - if not, you can’t use them;
  • use Make in a different way: just call the scenario and let Make take everything from Adalo Collections using API call. You’ll need working Collections API, but this approach offers more flexibility: e.g. you can store recipients as separate entries in some collection, manage them before, etc.
  • use mailing platforms directly like @Flawless suggested. Here you can store the recipients in a separate collection, add them to Mailerlite immediately, and send the campaign message when you’re ready.

Best,
Victor.

The issue with this is that I want to run this in the background. The users should not have to log in to MalerLite. To add a subscriber to a group, I need the group ID. And it seems that the GroupID is not returned when creating a group. So in order to get the group ID, I need to log in to MalerLite and get the ID from there.

The group ID is returned when creating the group. Store it up on creation.

Wierd. When I first made the custom action, the Group ID I got in the response did not match the actual group ID. I deleted the action and made a new one, and voià, it works perfectly.

Thanks

@Flawless @Victor, thanks a lot for your help. Now I have two good options moving forward.

2 Likes

Yes, you can send to multiple recipients using SendGrid’s dynamic templates. Just format your JSON to include all emails in the “to” array. Use one text input to enter the emails, and SMTPget can help with bulk email services.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.