Add calendar invites dynamically in Email | Community
Skip to main content
Rohit_Gangishet
New Participant
September 30, 2020
Solved

Add calendar invites dynamically in Email

  • September 30, 2020
  • 1 reply
  • 3789 views

Hi Team,

 

I am looking for some guidance/suggestions here.  

 

We have 6 events scheduled for the next 6 months. We are building a form with all the details and an option for the user to select any number of events they wish to attend.  This is captured in one field, say EVENT NAME.

 

Now, after form is submitted I am planning to send an email containing calendar invites (.ics files) for all the selected events. If they select 3 events, mail should contain 3 respective 'Add to Calendar' links (or buttons) and not others.

 

Could you please throw some light on to achieve this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Chris_Wilcox

Hello!

 

A very common scenario! Easiest (in my personal opinion) is using Velocity script tokens. You could either 1) create all of the ICS links inside of a token, then show or hide the ics link based off of your field values (so for each event, if EVENT_NAME1="1", show ICS link), or 2) I've seen some people use velocity tokens between content section to actually comment out sections that should be hidden for specific segment values. The 2nd option would (I think) allow your users to still edit the content in the Marketo email editor, but you'd basically bookend each section of content with your script token that either adds or doesn't add the <!-- at the start and the --> at the end.

 

Here's a blog I wrote recently about getting started with Velocity if you've never used it. 

Here's a discussion from a while back talking about the second solution I talked about above.

1 reply

Chris_Wilcox
Chris_WilcoxAccepted solution
New Participant
September 30, 2020

Hello!

 

A very common scenario! Easiest (in my personal opinion) is using Velocity script tokens. You could either 1) create all of the ICS links inside of a token, then show or hide the ics link based off of your field values (so for each event, if EVENT_NAME1="1", show ICS link), or 2) I've seen some people use velocity tokens between content section to actually comment out sections that should be hidden for specific segment values. The 2nd option would (I think) allow your users to still edit the content in the Marketo email editor, but you'd basically bookend each section of content with your script token that either adds or doesn't add the <!-- at the start and the --> at the end.

 

Here's a blog I wrote recently about getting started with Velocity if you've never used it. 

Here's a discussion from a while back talking about the second solution I talked about above.