Send a batch of emails based on certain criteria

Hey there, I’m wanting to send emails to a bunch of users everytime a certain interaction is done that matches their profile

Eg.

  • There is bunch of surf sports, which surfers can follow. (I’ve completed this already)
  • When a photographer uploads a photo, I want to notify all surfers that Follow that location, that an image is uploaded to their favourite location

Not sure how to send batch emails, it seems the Send Email function, only sends one at a time?
Should I rather send an array of emails and names to Zapier or Make?

That’s what I would do.

2 Likes

Thanks Darren, I would preferable like to send them to the correct page URL that the image is on? Is this possible?

Yes. Assuming that you’ll be sending a Webhook, you can pass a link to the current screen as one of your webhook parameters:

Screen Shot 2022-09-26 at 10.41.48 PM

1 Like

@Darren_Murphy would you send a string of email addresses? or is it possible to send objects?

Just worried with email addresses, as I doubt you could personalize with first name etc?

You could do either. With most of my webhooks I will send a JSON object. I like doing it this way as it means I’m just sending a single parameter. Then I use a Parse JSON module on the Make side to unpack it.

Yeah, that’s possible. I normally use templates on the Glide side to prepare the email subject line and email body, and then wrap it all up in a JSON object. So something like this:

{
  "email-body": "Hey {name}, a new pic has been added",
  "email-subject": "A new pic",
  "recipients": [
    {
      "name": "Mickey Mouse",
      "email": "mickey@disney.land"
    },
    {
      "name": "Donald Duck",
      "email": "donald@disney.land"
    }
  ]
}

And then on the Make side, you can replace {name} with the names from the recipients collection.

3 Likes

When you send a JSON object, do you send it as a lookup?
Screenshot 2022-09-26 at 18.28.36

And then to parse it on the Make side, I can’t get the value to come through

I see that you found my mini-tutorial on creating a JSON object - did that get you what you need?

Thanks this is really helpful, however I’m struggling to get the parsing JSON right in Make
I went through this JSON however I just can’t get it right. Do you perhaps have a tutorial on parsing JSON through Make?

1 Like

Hey Darren, this is super helpful, going to try this once Make has survived their DDOS attach :see_no_evil:

The mini tutorial on creating JSON is incredible

However I don’t understand how I would only pull the values I need?
I created a lookup to the column and it’s pulling all users, I only need the users that follow that location?


To get a filtered list, you would first need to create a multiple relation that matches all the rows you need, and then (I would think) a joined list rather than a lookup through that relation.

2 Likes

Hey @Darren_Murphy I noticed something strange is happening, wonder if you can assist?

The Json is getting sent with double ""s like this below. This is what happens when I copy the output from the window, however the preview looks fine?

"{
    ""name"": ""Gary Willmott"",
    ""email"": ""garythewillmott@gmail.com""
}"

I don’t understand as this is how I setup my template

And this is what the preview looks like
Screenshot 2022-09-29 at 09.13.23

Might be easier if I jump in and have a quick look - is that okay?

Yeh go for it, you should still have access

Okay, will take a look shortly

@Gary_Willmott - just had a quick look and all looks okay. I did notice that your JSON/payload column isn’t used anywhere. I would expect that one to be sent through your webhook.

So, when you say…

Where exactly are you seeing that?

I noticed it when I send it to Make, I actually logged a ticker on their community too, as I’m struggling with parsing

I noticed this morning after writing it, there is double “” in the JSON I’m parsin

You can test it by going to the demo button action

  1. Make sure you are logged in as me (admin)
  2. Click on any image (pref the one in Trestles, as I’m the only follower there)
    You will see the button

Okay, I see it, and yes it looks fine in Glide.
So must be something funny going on at the Make end.
Can you give me temporary access to your Make account?

Will PM you