Create Woocommerce Coupon with Google Sheets email list

Absolute newbie here!

Goal
My goal is to simply take a list of emails from Google Sheets and create 1 coupon which is only allowed to be used on the emails in the list.

Current work flow is:

Google Sheets:
So far I have I have a Google Sheet which is populated with orders and their dates and which determines whether a customer is eligible for a coupon. I can use the Google Sheets Module to retrieve this information. So far so good.

Array Aggregator
As Google Sheets is bringing back 2,500 rows I wanted to consolidate this into an array that I could maybe pass into the email restrictions field in one go.
image

I end up with the following:
image

Set Multiple Variables
I have set some variables to help with the creation of the coupon of which one of these is ‘allowed_emails’ which I have referencing the Array Aggregator (hoping that this would be an array and it would contain all emails)
image

Create a coupon
Lastly, I have created a coupon of which I am referencing the variable of ‘allowed_emails’ again hoping this would be all emails.
image

The Issue:
I can create the coupon however I only ever receive the first email in the email restrictions field and no other email so it is obviously not iterating through. I have tried multiple options and been on for hours but cant seem to get my head around it though I am sure teh problem is quite simple.

Ongoing
After I can create a coupon which is restricted to the list of emails I wll then need to send this out by email which I am assuming the only way to do this would be to iterate over all of the email?

I need to understand and learn how to use make.com so any guidance as to where I am going wrong or a better approach is appreciated.

Thanks,

Hey @manifest,

I think you can optimize a bit here. In the array aggregator, only select the email field to make up your array.

You can then skip the set multiple variables module and delete that.

Next, in your WooCommerce module, toggle on Map. This will then remove the item 1 stuff. And you can just insert your array there.

image

Hope that helps!

Thomas - Nola Digital

2 Likes

@NolaDigital thank you for replying.

I have refined it as per your instructions however I still just get 1 email so I am obviously missing something (probably the mapping part in the coupon).

I now have 3 modules as I have remived the multiple variables module

I have only selected the billing email field

I have mapped the email field from the array into the Email Restrictions field in the coupon module.
image

This is what the array struction looks like before it gets to the coupon (not sure if it makes any difference)

Thanks in advance