Create/update calendar file token | Community
Skip to main content
New Participant
December 14, 2023
Question

Create/update calendar file token

  • December 14, 2023
  • 1 reply
  • 2073 views

Hi,

We are looking to embed calendar event in the marketo emails. We have created a .ics file token and added to to the email template. We wanted to update the calendar file token values via marketo API call, Can we create or update calendar file token via Marketo API? do not find any documentation on this.

 

Appreciate your help.

 

Thanks,

Babu

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

1 reply

SanfordWhiteman
New Participant
December 14, 2023

No. Recommend switching to Agical links instead and I’m sure many others would agree.

New Participant
December 15, 2023

Thank you Stanford! 

Would like to discuss little bit on this issue, following steps I have done to update Calendar file token via API

1. Retrieved Calendar file token details via API, following is token data returned from Marketo

"tokens": [ { "computedUrl": "https://myurl", "type": "iCalendar", "name": "Calendar event", "value": "{\"subject\":\"Test subject\",\"location\":\"Test location\",\"hyperlink\":\"Save the Date\",\"startDate\":1702551600,\"endDate\":1702560600,\"description\":\"Test calendar file\",\"timezone\":\"America\\/New_York\"}" } ]

Note:

startDate value in token is 12/14/2023 11:00AM EST but API returns startDate as 1702551600

endDate value in token is 12/14/2023 1:30PM EST but API returns endDate  as 1702560600

 

2. Used following JSON to update Calendar file token, token values gets updated

{ "name": "Calendar event", "value": "{\"subject\":\"NPB webnair\",\"location\":\"Test NPB\",\"hyperlink\":\"Event Date\",\"startDate\":1702551600,\"endDate\":1702560600,\"description\":\"Test calendar file\",\"timezone\":\"America\\/New_York\"}", "folderType": "program", "type": "iCalendar" }

3. Problems comes where if I pass start and end date values in date time format (12/20/2023). Either API is throwing exception or token value gets corrupted.

 

can you please help me to understand how 12/14/2023 11:00AM EST is converted to 1702551600?

Thank you so much for helping on this.

 

Thanks,

Babu

 

SanfordWhiteman
New Participant
December 15, 2023

Epoch time in seconds.

 

Note the call you’re using is not supported (as with Velocity tokens). Expect it to stop working at any time, that’s why I said “No” above.