Has anybody ever managed to embed a live feed from their website into an email. Not from a social media site? | Community
Skip to main content
James_Taylor
Level 1
April 30, 2018
Question

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

  • April 30, 2018
  • 2 replies
  • 3141 views

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

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

2 replies

SanfordWhiteman
Level 10
April 30, 2018

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
May 1, 2018

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
May 1, 2018

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
May 1, 2018

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.