How to use dynamic content to include content feeds from a blog, podcast, Etsy shop or YouTube channel

Using RSS feeds, you can pull in content from your blog, YouTube channel, Etsy store, podcast, and so much more! You can easily add your feed to your message using the Feed element

Feed element demonstration

Dynamic email content is a fun, powerful feature that helps you include content feeds in your messages. Using Dynamic Email Content, you will be able to include up to date content from RSS and other feeds to your message. Dynamic content is an advanced tool designed to help you make them most of your content.

With dynamic content, you will be able to quickly create your message so that you can spend less time crafting and perfecting your messages and more time doing the things you love.

RSS Feed Details

Feed Content
{% for entry in feed_content('https://blog.aweber.com/feed', num_entries=4, categories=['learn','ecommerce','email automation']) %}...{% endfor %}

Dynamic email markup to include the feed content.

Replace https://blog.aweber.com/feed with the RSS URL for your website, podcast, etc. Use num_entries to specify the number of items you would like to pull to your message. 

{% for entry in feed_content('https://blog.aweber.com/feed', num_entries=4), categories=['learn','ecommerce','email automation'] %}...{% endfor %}

You can also take it a step further by specifying which categories to include.

Feed Content (Alternative)
{% content_feed('https://blog.aweber.com/feed', 4) %}...{% endfor %}

Alternative dynamic email logic to print the RSS feed. Using this format will allow you to extract the website's name, description, and link.

Replace https://blog.aweber.com/feed with your RSS of your website, podcast, etc. Replace the numerical value to the number of items you would like to pull to your message.

{{ feed.title }}

This variable will pull the website's title.

{{ feed.description }}

This variable will pull the website's description.

{{ feed.link }}

This variable will pull the link to the website's URL.

Title
{{entry.title}}

This variable will pull the item's title.

Description
{{entry.description}}

This variable will pull the item's description.

Author
{{entry.author}}

This variable will pull the item's author.

Link
{{entry.link}}

This variable will pull the item's image address.

Image
{{entry.image}}

This variable will pull the item's published date.

Published Date
{{ entry.published_at|date_format("MMMM d, YYYY") }}

This variable will pull the item's published date.

You could also choose to format your published date.

Item Category
{{category}}

This variable will pull the item's list of categories.

 

Media RSS Feed Details

Media Content
{% for media in entry.enclosures %}...{% endfor %}

Dynamic email logic to print additional media items from the RSS feed.

Media URL
{{media.url}}

This variable will pull the media item's direct link.

Media Length
{{media.length}}

This variable will pull the media item's duration length.

Media Type
{{media.type}}

This variable will pull the media item's type.

 

Blog Example

Using dynamic email content, you can dynamically pull in content from your blog to continue driving traffic back to your website. In this example, we will be pulling articles from AWeber's blog

{% for entry in feed_content('https://blog.aweber.com/feed', num_entries=4) %}
{{entry.image}}
{{entry.categories | first | upper() }}
{{entry.title}}
By: {{entry.author}}
Published: {{ entry.published_at|date_format("MMMM d, YYYY") }}

{{entry.description}}

Read More: {{entry.link}}
{% endfor %}


4429048344219_example.png

When clicking Preview & Test or sending a test message, you will see that the latest blog posts are pulled to your message.

4429048344219_examplepreview.png

Podcast Example

Using dynamic email content, you can dynamically pull in content from your podcast. When available, you can also pull in the podcast's image and include a clickable, listenable playbar.

{% for entry in feed_content('https://rss.art19.com/civilized', num_entries=3) %}
{% for media in entry.enclosures %}
{{entry.image}}
LISTEN NOW: {{media.url}} 
{% endfor %}
{% endfor %}


4429048344219_podcast.png

When clicking Preview & Test or sending a test message, you will see that the latest podcast episodes are pulled to your message.

4429048344219_podcastpreview.png

YouTube Example

Using dynamic email content, you can dynamically pull in videos directly from your YouTube channel. 

{% for entry in feed_content('https://www.youtube.com/feeds/videos.xml?playlist_id=PL8AXHreasJeimtvj0CYBaApVm8vjzPCZP', num_entries=3) %}
{{entry.image}}
{{entry.title}}
Watch: {{entry.link}}
{% endfor %}


4429048344219_youtube.png

When clicking Preview & Test or sending a test message, you will see that the latest podcast episodes are pulled to your message.

4429048344219_youtubepreview.png

Etsy Store Example

Using dynamic email content, you can dynamically pull in content from your Etsy store to continue driving traffic back to your shop.

{% for entry in feed_content('https://www.etsy.com/shop/PhilaCarta/rss', num_entries=3) %}
{{entry.image}}
{{entry.title}}
Buy Now: {{entry.link}}
{% endfor %}


4429048344219_etsy.png

When clicking Preview & Test or sending a test message, you will see that the latest Etsy products are pulled to your message.

4429048344219_etsypreview.png


For more information on dynamic email content, and the different types of variables that you can include when coding for dynamic email content, check out the articles below:

Have more questions? Submit a request