You can use the “mailto:” URL to create an email and pass in all the parameters you want from your Notion database — as long as you pay attention to the syntax and replace all weird characters.
Just set up a new formula property titled something like “Send Email” and use the link formula to create the email, like this:
link("Send invoice reminder", "mailto:" + 🔍Email + "?subject=" + 🔍Subject + "&body=" + 🔍Body)
It will open a new window, with all the contents of the email filled out. You can now select your signature and hit the “Send” button.
You can specify CC and BCC addresses by adding “cc=” and “bcc=” like this:
link("Send invoice reminder", "mailto:" + 🔍Email + "?cc=" + 🔍Cc+ "&bcc=" + 🔍Bcc+ "&subject=" + 🔍Subject + "&body=" + 🔍Body)
Note that the first parameter after your main email address must come after a question mark, and all subsequent ones come after an ampersand.
Possible problems
First, make sure you have all the colons, equal signs, question marks and ampersands in the right places. You can’t imagine how much time I’ve wasted trying to debug my automations when the problem was a missing question mark.
Also, I’ve seen online that some mail apps require commas when you’re sending to multiple addresses, and some require them to be separated by semicolons.
What I normally do is use a notepad to write out a simplified version of my mailto link, manually paste it into the browser to make sure it works, then start adding bits and bobs to it one at a time. Then, once I’ve figured out a working structure, I take it into Notion and start replacing parts with the relevant properties, testing as I go to make sure it all still works.
Yes, it’s time-consuming. But who wouldn’t rather spend five hours creating an automation to send an email instead of just sending it manually in seconds? Let’s see… I send five invoices a month, which means that the automation will have paid for itself in… twenty years.
You might have spaces somewhere. You can replace each of them with “%2o” by using the replaceAll formula, like this:
replaceAll(🔍Body," ","%20")
One of your properties might not be a text property but a rollup or something else that doesn’t work in the formula. Use the format formula, which, as far as I can tell, converts everything to plain text. Like this:
format(🔍Body)
You have other weird characters showing up, not just spaces. Here are a few other replaceAll commands you could use :
replaceAll(🔍Body, "%", "%25")
replaceAll(🔍Body, "\n", "%0A")
replaceAll(🔍Body, "\r", "%0D")
replaceAll(🔍Body, ":", "%3A")
replaceAll(🔍Body, "/", "%2F")
replaceAll(🔍Body, "\?", "%3F")
replaceAll(🔍Body, "#", "%23")
replaceAll(🔍Body, "\[", "%5B")
replaceAll(🔍Body, "]", "%5D")
replaceAll(🔍Body, "@", "%40")
replaceAll(🔍Body, "!", "%21")
replaceAll(🔍Body, "\$", "%24")
replaceAll(🔍Body, "&", "%26")
replaceAll(🔍Body, "'", "%27")
replaceAll(🔍Body, "\(", "%28")
replaceAll(🔍Body, "\)", "%29")
replaceAll(🔍Body, "\*", "%2A")
replaceAll(🔍Body, "\+", "%2B")
replaceAll(🔍Body, ",", "%2C")
replaceAll(🔍Body, ";", "%3B")
replaceAll(🔍Body, "=", "%3D")
replaceAll(🔍Body, " ", "%20")
replaceAll(🔍Body, "\"", "%22")
replaceAll(🔍Body, "<", "%3C")
replaceAll(🔍Body, ">", "%3E")
replaceAll(🔍Body, "\\\\", "%5]C")
replaceAll(🔍Body, "\^", "%5E")
replaceAll(🔍Body, "`", "%60")
replaceAll(🔍Body, "{", "%7B")
replaceAll(🔍Body, "\|", "%7C")
replaceAll(🔍Body, "}", "%7D")
replaceAll(🔍Body, "~", "%7E")
replaceAll(🔍Body, "\.", "%2E")
Or, if you’re sending the same email to everyone, you can just edit the text manually and replace any problematic character with its code equivalent.
Like this:
Hi%20-%0AYour%20payment%20is%20late%2E%0AKind%20regards%2E