Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

James_Taylor
Level 1

Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

Hi,

I have live feed on my website that updates hourly with new content (much like a social media site).

Does anyone know if it possible to embed this live feed into my email program to show users live results?

Thanks

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

Sure, but you'll need at least some level of integration to do so.

One method is to use a webhook that loops back and updates a program-level {{my.token}} via the the REST Asset API once per hour. Create a Resource Lead -- a placeholder lead dedicated to this task -- and schedule 24 Smart Campaigns accordingly. The SCs run only for your single Resource Lead -- RLs are a cool way to take advantage of Marketo's built-in scheduler for global tasks.

Or have your external system that updates the feed also call the Asset API directly afterward.

While you could grab the current feed contents over and over again -- for every lead in a send -- before/during a campaign, this would be (to put it very mildly!) inefficient as the feed is a shared resource and shouldn't be copied separately to each lead.

Jay_Jiang
Level 10

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

If you can use the REST API, you could use the update snippet content API to continuously update a single snippet which is placed in your email. i.e. Grab the current contents of the feed, put it into the body of the API call, send to Marketo, snippet is updated with current content.

Jay_Jiang
Level 10

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

If you can't use REST API, you can try a webhook + php solution. PHP file uses cURL to get the current contents of a page, formats the content, returns the content to a custom field on the lead. Use the custom field as a merge variable in the email.

Webhooks can only be triggered so you wouldn't be able to send large batch emails out.

SanfordWhiteman
Level 10 - Community Moderator

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

Webhooks can only be triggered so you wouldn't be able to send large batch emails out.

That's not really a stopper in itself, since you can call webhooks using the typical batch-to-trigger workflow (that's how you enrich leads in a batch). But there's a practical, speed-of-light limit on how many webhook executions you can perform in a day, and when you actually want a shared global value you're going to unnecessarily ding performance by updating every single lead to the same value.

Can't imagine a situation where you could author server-side code but couldn't use the REST API, so I definitely think a token or (as you suggest) snippet updated via REST is the move here.

Jay_Jiang
Level 10

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

I was under the impression REST API isn't available if you integrated salesforce, is this still the case?

SanfordWhiteman
Level 10 - Community Moderator

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

The REST API as a whole is fully available w/CRM integration!

It's only certain endpoints, like the Company API, that are restricted because they get taken over by the CRM as the source of truth. Even the Marketo Custom Object API is still available alongside SFDC COs.

Jay_Jiang
Level 10

Re: Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site?

Great to have learned something!