Dynamically referencing Calendly links in Salesforce email templates and buttons


Salesforce admins can use merge fields to reference the right person's Calendly link in Salesforce automations/email templates, automations/email templates in other tools that integrate into Salesforce (i.e. Marketo, Outreach, etc.), and even scheduling buttons. In this article, we'll cover how to customize a Salesforce instance to reference a lead owner's Calendly link via Salesforce email templates, but these same steps can be used for any object with an owner. 

Salesforce email templates


When using a Visualforce email template, users will be able to directly reference a record owner's Calendly link from the template via the Calendly_Calendlylink_c user field. To create a Visualforce email template, we recommend following Salesforce's step-by-step instructions here.

For standard email templates, there is not a default option to reference a record owner's Calendly link. As a workaround, you can create a new formula field on the record object that references the owner's link. 

How to create an email template 
  1. We recommend following Salesforce's step-by-step instructions on how to create an email template. 
Creating a custom formula field 
  1. From Setup on the Home page, select Object Manager.
  2. In the Quick Find search bar on the right-hand side, search Lead
  3. Select the Lead label. 
  4. Select Fields and Relationships from the Details list on the left-hand side.
  5. Directly beside the Quick Find search bar, select New
  6. Step 1: Select Formula
  7. Select Next in the top right-hand corner. 
  8. Step 2: Type Owner's Calendly Link in the Field Label field. 
  9. Select Text in the Formula Return Type column. 
  10. Select Next in the top right-hand corner.
  11. Step 3: Select the Advanced Formula tab.
  12. Select the Insert Field icon. 
  13. Select Lead >.
  14. Select Lead Owner (User) > from the list of labels. 
  15. Locate and select Calendly Link.
  16. Select Insert
  17. Below the Calendly Link (Text) box, select the Check Syntax icon. 
  18. Select Next in the top right-hand corner. 
  19. Step 4: Select Next in the top right-hand corner. 
  20. Step 5: Select Save.
Reference a Calendly link in email templates 

When creating or editing an email template in Salesforce, access the merge field value of the lead owner's Calendly link by:  

  1. From the Select Field Type drop-down menu under Available Merge Fields, select Lead Fields
  2. From the Select Field drop-down menu, select Owner'sCalendly Link
  3. Copy and paste the Merge Field Value in the Email Body section where you want the Calendly link to be included.  
  4. Select Save

Scheduling buttons 


To create a custom scheduling button inside of Salesforce, follow the steps in the Lightning or Classic section of the How to create a custom button to schedule Calendly meetings section of our Schedule Calendly meetings directly from Salesforce Help Center article.