Templated Email Function - is it possible

Hi, we have a strong requirment to be able to send emails to our clients with the ability for the email templates to be personalised with data from the data tables, similiar to how TB allows us to send an email on clicking an action button.

So i wondered if it was even possible to create something as per Tim’s post below but allowing the user to select a template to pre-populate the subject and body.

I have ceated a table to store the details of the templates such as subject line and body but i cant see how i would get past the following;

The templates table uses a RTF field for the body. how would a user creating a new template get data fields such as {first_name} in to the RTF field when creating a template.

Can a table be used as a lookup to choose a template without using a connection field. a bit like a ‘select field’ allows a choice of values.

I would love it if this could be achieved. We are still using Pipedrive for the sole purpose of the email templates.

I guess the alternative is to create a load of action buttons, one to send each templated email.

Hey Richard, I’m fairly confident this is possible if you’re okay with doing a 2 step process:

Please check out this video for a demo/walkthrough:

1 Like

Thank you so much @moe for taking the time to make this video. This looks like a great solution. I’ll post back how i get on.

1 Like

I’ve made some really good progress with this. I now have the following built out and happy to share if someone can tell me how i share part of my app.

So far, i have

A templates table fields

  • template status
  • category
  • template name
  • template type - email, sms, letter
  • subject
  • body

The search and Replace Pipe is set up with the merge fields

Added a RTF to the users table to capture a HTML email signature

Emails table with fields

  • from
  • to - connected to users
  • case - to link the email to a case (mortgage application)
  • template
  • subject
  • body
  • status
  • date created
  • date sent
  • email signature

On the template page, i added a html component and listed the merge tags so that they can easily be copied in to the template.

This is working fantastic so far but i have a few improvements i’d like to make and was hoping the more experienced users could help develop this in to a great feature, i could share with the community.

It wont send the email if it is from a user other than myself. - it is my email account that is used in Settings>Email Settings. we are set up using Office365 SMTP. The email log shows an error code 554 when set by a different user.

Merge Tags - i need a more elegant way of allowing a user to choose these and on click have the tag inserted into the subject or body field at the point the mouse was last at.

Sending emails to more than one person - as the email is actually sent as a notification, i see that i can send to more than one person but in my situation we would want to send to all users in a connection field. eg. customers to a mortgage application. I cant see how i can select a connection field or is it possible to add a CC field and have the notification allow this cc field to be used in the To: section of the email notification. (hope this makes sense)

Child tables data - from what i have seen so far i am not sure this can be done but would be great if it could. I’d like to see the functionality of adding multiple records from a child table in the body of the email. In my case it would be mortgage quotes but other case uses could be line items from an invoice, list of documents outstanding for a client etc.

The sample video Moe did was very helpful and in the video it shows a 2 step process to send the email. This created the email and in the ‘Add’ page and then redirects to the ‘Details’ page to finalise and send. This is fine if sending from a parent page but i have also added this feature to a child page and the redirect in the same manner is not available. At present, we create the email, mark it as draft, close the add form and then click the record details button in the table to continue with the email. It’s not actually a big issue but if it could be cleaner then that would make for a better UX.

thanks for reading.