A QuickBooks customer may have multiple emails (1 to 4 emails). I’m trying to email the customer using Gmail but I’m getting an error in the Gmail module "Missing value of required parameter ‘to’. I’ve tried many things from converting to array and mapping and splitting, etc.
How can I get the email to be sent to all the email addresses in a customer’s account?
unfortunately, I’m not sure how to manually map multiple email addresses into 1 module. I also get the validation error.
Here is a solution you can implement to handle this situation.
Have a router with 4 routes. Each route would send the email to either 1,2,3, or 4 emails
Step 1: Convert that primary email to an array of emails. It appears like you would need to replace the commas with emptystrings and then split this by newline. (You may need to use a different approach depending on how they are actually separated in the output)
Step 2: Setup your filter for each route, where you would use the length of the array calculated in step1. For example filter for sending to 1 email: length(array) = 1.
Step 3: Clone your Gmail module and then map your recipients. For example if you’re in route 2 (2 emails), in the first box get(array);1, and in the second get(array);2
If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.