Gmail Create a Draft module fails when email2 field is empty

Hello! I’ve created a scenario to generate invoices by merging data from various Notion databases into a Google Doc. It’s all working fine until the last module, which is to create a draft in Gmail.

My Client database has fields for email1 and email2, because some clients require invoices to be sent to more than one address. I’ve set the Gmail module up accordingly. The problem is that, if there is no email2, the execution fails.

This is probably very obvious. But how do I set it up so that email2 can be empty?

Welcome to the Make community!

You can try using the built-in function ifempty with the email variable as the first parameter, and one of these options as the second:

  • {{ignore}}
  • {{omit}}

Let me know if it doesn’t work with screenshots

3 Likes

Thank you, it worked!
Pasting my solution here in case it helps anyone else. Carriage return inside the ifempty function ensures you don’t get an empty line.

CleanShot 2024-02-25 at 21.58.37

3 Likes