Issue when a value can't be blank

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.

just tried it and still returns an error unfortunately


you will want to map this section (CC)

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

  1. 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:
  2. put if email = blank
  3. return null
  4. if not return an array
  5. with an object in it
  6. 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)

ClickMe for supplemental Information

What does the "Map" toggle do? - #2 by JugaadiTech

1 Like