People have an option to CC someone on an installation.
If they don’t, then the webhook still sends an “empty” value.
The module will shoot out an error if the CC field is blank and i mapped a value to it.
Wondering what the best way of going about it is. I explain in the video.
quickly skimmed what you are running into, will revisit in a bit in more depth if required.
Assuming that the service that is not accepting no email is using a relational database, this would be a common error. have you tried the following.
What this does is if the “email field is empty” instead of returning nothing, it returns the “null” value which is (way over simplifying here,some database engineer would not like this explanation) like telling the service “you are intentionally leaving that blank” instead of “i forgot to add that”
Let me know if that works, if it doesn’t ill dive in deeper.
when you add the item, the “structure” is still sent,
MailerSend either expects no structure there. or structure with email. But Not: structure without email which is what its currently getting.
(Google contacts has a similar quirk)
Follow This
Click map toggle next to CC
remembering the data structure that is visualized in front of you before so. In the new field that shows up:
put if email = blank
return null
if not return an array
with an object in it
that contains an email, and receivers name.
a. im guessing you can pass null for receivers name.
Does this make sense?
Let me know if you would like a visual aid. (will provide when back to computer if needed)
The easiest way to do that will be to use Array Aggregator and then specify the target as CC/Receiver Email Fields in the Send Email Module. This will allow you to quickly create the Array needed to be mapped in the target module.
Other way, will be to create a JSON through Create a JSON Module/Aggregrate a JSON whereby you can specify the format required.