Question

Creating an Email with Dynamic Content

  • 9 February 2023
  • 1 reply
  • 107 views

Userlevel 1

We want to funnel all of our leads to one sub-zap where we would notify the appropriate sales rep. Depending on where the lead came from, the email should have dynamic content. I know that in Mailchimp, you can do dynamic content, but I’m looking to use Gmail to send the email. 

I only want certain fields referenced in the email if they are not null and relate to the applicable Lead Source. I saw in a different post that someone thought this could be done via Code by Zapier. Can someone help me with the code? Color coded below to differentiate between the dynamic content.

 

Hello 1. Assigned Staff Member

Here is a new prospect that came in for you

Name: 1. Prospect First Name 1. Prospect Last Name
Email: 1. Prospect Email Address
Phone: 1. Prospect Phone Number
Gender: 1. Prospect Gender
Source: 1. Prospect Source

 

*|IF:Source = LinkedIn|*

*|IF:LinkedIn Webhook != null|* LinkedIn Webhook: 1. Linked In Webhook *|END:IF|*

*|IF:LinkedIn Audience != null|* LinkedIn Audience: 1. Linked In Audience *|END:IF|*

*|IF:LinkedIn Campaign != null|*LinkedIn Campaign: 1. Linked In Campaign *|END:IF|*

*|IF:LinkedIn Message != null|*LinkedIn Message: 1. Linked In Message *|END:IF|*

*|IF:Last Message Received != null|* Last Message Received: 1. Last Message Received *|END:IF|*

*|IF:Last Message Sent != null|* Last Message Sent: 1. Last Message Sent *|END:IF|*

*|END:IF|*

 

*|IF:Source = Referral|*

Referring Name/Organization: 1. Referring Name Organization

*|IF:Referring Email != null|*  Referring Email: 1. Referring Email Address *|END:IF|*

*|IF:Additional Information from Partner != null|* Additional Information from 1. Referring Name Organization 1. Additional Info…on From Partner:*|END:IF|*

*|END:IF|*

 

*|IF:Source = Event|*

Event: 1. Event Name

*|IF:Event Registration Date != null|* Event Registration Date: 1. Event Registration Date *|END:IF|*

*|IF:Event Attendance Date != null|* Event Attendance Date: 1. Event Attendance Date *|END:IF|*

*|END:IF|*

 

*|IF:City != null|* City: 1. Prospect City *|END:IF|* *|IF:State != null|*</code> State: 1. Prospect State*|END:IF|

*|IF:Company Name != null|* Company Name: 1. Prospect Company Name *|END:IF|*

*|IF:Job Title != null|*</code> Job Title: 1. Prospect Job Title: *|END:IF|*

*|IF:LinkedIn URL != null|* LinkedIn URL: 1. Prospect Linked In URL*|END:IF|*

*|IF:Website Intake Form Additional Information != null|* Comments from Prospect: 1. Website Intake…nal Information:missing sample data *|END:IF|*

 

Intake Source: 1. Information Received From

 

*|IF:Additional Notes for the System User != null|* Additional Notes from 1. Google Form Form Completed By: 1. Google Form Add…The System User 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Pinnacle Forum 

Good question.

Yes, Code is probably the best way to handle all this logic: https://zapier.com/apps/code/help

Consider hiring a Certified Zapier Expert: https://zapier.com/experts/automation-ace