Help

Re: Create an email draft in airtable

Solved
Jump to Solution
1385 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Csanko
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi there,

In the last few months we been happy with getting an email on each new lead being created in one of our tables. The email contains all the needed data relevant for our sales team. BUT i'd really want that email to contain an attachment which is a .eml file (email) which is populated specifically with the records data. How can i accomplish this?

Goal is to minimize errors when our sales rep copy/paste the data from the email. 

1 Solution

Accepted Solutions
Csanko
5 - Automation Enthusiast
5 - Automation Enthusiast

I found a solution, with the help of GPT-4.

After going back and forth with GPT we created this formula:

"mailto:" &
IF(
{Facilitet},
"",
ENCODE_URL_COMPONENT({Policyholder invoice email})
) &
"?subject=" & ENCODE_URL_COMPONENT("Faktura - " & {Insurancetype} & " - Policenummer " & {Policy number} & " - " & {Policyholder}) &
"&body=" & ENCODE_URL_COMPONENT("Kære " & {Policyholder} & ",") &
"%0D%0A%0D%0A" &
ENCODE_URL_COMPONENT(
"I forbindelse med jeres " & {Insurancetype} & ", vedhæfter vi faktura for forsikringsperioden fra " &
DATETIME_FORMAT({Period start}, 'DD.MM.YYYY') &
" til " &
IF(
{Period end} = DATEADD(DATETIME_PARSE(DATETIME_FORMAT(DATEADD({Period end}, 1, 'month'), 'YYYY-MM') & '-01'), -1, 'day'),
DATETIME_FORMAT({Period end}, 'DD.MM.YYYY'),
DATETIME_FORMAT(DATEADD({Period end}, -1, 'day'), 'DD.MM.YYYY')
) &
"."
) &
"%0D%0A%0D%0A" &
ENCODE_URL_COMPONENT("Har I spørgsmål til fremsendte, er I meget velkommen til at kontakte os.")


Basically it's just a "mailto" link, with predefined content. The content is from the record itself. Then what i did was insert that column where the above formula is, and put the following into the body of the email sent from the automation.

<a href="

 
Link for mail draft
 

">Tryk her for mailkladde link</a>

See Solution in Thread

2 Replies 2
ScottWorld
18 - Pluto
18 - Pluto

There are many different ways of doing this:

1. If you can find an app that can generate .eml files — and if that app has a REST API — then you could automate the process via JavaScript, DataFetcher, or Make’s HTTP module.

2. However, I think an easier solution would be to just create a fully-composed email draft in the salesperson’s Drafts folder, so they can open up the draft, modify it if necessary, and then send it. This method even supports attachments!

This would be very easy to setup with Make’s Gmail automations, Make’s Outlook automations, or Make’s generic email integrations.

The hardest part would be learning to use Make, because it comes with a learning curve. This is why I created this basic navigation video to help. In that thread, I also provide the links to a few other Make training resources there as well. For example, to instantly trigger your Make scenarios from Airtable, check out this thread. In that same thread, I also provide the link to Make’s free partner training program, which offers approximately 15 hours of free training videos.

3. For simple outgoing emails, you can always just create a "mailto:" link in a formula field in Airtable, and when you click on that link, it will open the outgoing message in your email program, with the subject and body already pre-populated. This method does not support attachments nor extra-long messages.

Hope this helps! If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consultant — ScottWorld 

Csanko
5 - Automation Enthusiast
5 - Automation Enthusiast

I found a solution, with the help of GPT-4.

After going back and forth with GPT we created this formula:

"mailto:" &
IF(
{Facilitet},
"",
ENCODE_URL_COMPONENT({Policyholder invoice email})
) &
"?subject=" & ENCODE_URL_COMPONENT("Faktura - " & {Insurancetype} & " - Policenummer " & {Policy number} & " - " & {Policyholder}) &
"&body=" & ENCODE_URL_COMPONENT("Kære " & {Policyholder} & ",") &
"%0D%0A%0D%0A" &
ENCODE_URL_COMPONENT(
"I forbindelse med jeres " & {Insurancetype} & ", vedhæfter vi faktura for forsikringsperioden fra " &
DATETIME_FORMAT({Period start}, 'DD.MM.YYYY') &
" til " &
IF(
{Period end} = DATEADD(DATETIME_PARSE(DATETIME_FORMAT(DATEADD({Period end}, 1, 'month'), 'YYYY-MM') & '-01'), -1, 'day'),
DATETIME_FORMAT({Period end}, 'DD.MM.YYYY'),
DATETIME_FORMAT(DATEADD({Period end}, -1, 'day'), 'DD.MM.YYYY')
) &
"."
) &
"%0D%0A%0D%0A" &
ENCODE_URL_COMPONENT("Har I spørgsmål til fremsendte, er I meget velkommen til at kontakte os.")


Basically it's just a "mailto" link, with predefined content. The content is from the record itself. Then what i did was insert that column where the above formula is, and put the following into the body of the email sent from the automation.

<a href="

 
Link for mail draft
 

">Tryk her for mailkladde link</a>