Embed RSS feeds into your email campaign

If your website has a RSS feed of your blog posts or news articles then you can use this to automatically populate email campaigns with your most recent posts. This makes a lot of sense when combined with MailPion’s recurring sending feature. This would allow you to automatically send out an email containing your most recent posts every week or month.

To add an RSS feed to an email campaign:

Here is a brief example of the HTML code you might add to your email template to use this feature (if using the drag-and-drop email builder you can drag the HTML block from the Content pane and then copy and paste the code below, just make sure you replace the URL with your feed URL):

    [XML_FEED_BEGIN url=’https://status.voyager.nz/history.rss’ count=’5′]
        <table>
            <tr>
                <td>
                    <a href=”[XML_FEED_ITEM_LINK]”>
                        <img src=”[XML_FEED_ITEM_IMAGE]” width=”100″ height=”100″/>
                    </a>
                </td>
                <td>
                    <strong>[XML_FEED_ITEM_TITLE]</strong><br />
                    <p>[XML_FEED_ITEM_DESCRIPTION]</p>
                </td>
            </tr>
        </table>
    [XML_FEED_END]

The [XML_FEED_BEGIN] tag accepts the following arguments:
URL – string – the URL from where we will fetch the feed items. Mandatory.
count – integer – the number of items you want to receive back from the feed. Optional.
offset – integer – the number of items you want to skip loading. Optional.
days-back – integer – the number of days to look back for posts. Optional.
no-item-action – string – what action to take when no items are found in the feed. Valid values: postpone-campaign (postpones the campaign till the next day). Optional.
send-only-unique-items – string – if we should only send unique items. This prevents the email from containing posts that were already displayed in previous emails, this feature only works for recurring campaigns. If no new items are found, then no item action is applied. Valid values: (yes or no). Optional.

Below is a list of the available tags for the items in the feed:
[XML_FEED_ITEM_TITLE] – The item title (the title of a post for example)
[XML_FEED_ITEM_DESCRIPTION] – Short item description
[XML_FEED_ITEM_CONTENT] – Item content
[XML_FEED_ITEM_IMAGE] – The URL of the image of the item, use this as the source of an image
[XML_FEED_ITEM_LINK] – The URL/permalink to the item
[XML_FEED_ITEM_PUBDATE] – Item publish date
[XML_FEED_ITEM_GUID] – Item guide.

Please ensure that you test your campaign before sending it out! On the template step click the “Save content” button found near the bottom of the screen. Then click the “test template” button found near the top of the screen.

To create a recurring email campaign:

When creating your campaign, on the last step, tick the “Advanced recurring” box and enter your desired schedule. To ensure that your email is fresh do not set a schedule that is shorter than the frequency with which you would normally post new articles!

Leave a Reply

Your email address will not be published. Required fields are marked *