RSS To Email

SendCastle give you the ability to pull in RSS Feeds and automagically create a newsletter from that. If you are a news outlet, have a blog, a website or a web shop, chances are you have a RSS feed available already. This is great news as you can just plug its URL into SendCastle, tell us how often it should be sent and you're more or less set.

But first things first.

What is RSS?

There are tons and tons of reference material as to what and how RSS works; a rather hands-down explanation can be found here or at Wikipedia if you want a more factual approach.

Atom feeds are supported as well.

How it works in SendCastle

This document assume a little familiarity with SendCastle.

It's really only two steps (but we go through it all in detail) and as always within SendCastle it all happens in the Canvas (Campaign) view.

You can have as many automated sends as you may wish in any campaign. Likewise with the number of RSS feeds you wish to send; you can use any number of RSS feeds in any segment.

Step 0: Create a new campaign

You will probably want to create a campaign (it's easy, you can find out how here). This is not mandatory, but it's probably a good idea to keep active campaigns intact.

Step 1: Creating your message / template

You will want to have a template on your segment. For now, you can just drag and drop any template on the segment. We will replace it with an example below anyway.

picking/creating template

Worth noting: You can make any template work with RSS feeds as it is just a command that you put in your HTML.

After having dropped a template on the segment, clickit and then go to its HTML by clicking the "Switch to HTML" button.

WYSIWYG editor with highlight to switch to html

At this point you can go as simple or as advanced as you like. For default (un-)style(d) your complete template could be:

      <h3>SendCastle's RSS-to-email example</h3>
      {content type="rss" source="http://rss.cnn.com/rss/edition.rss" max="10" start="0"}{/content}

The {content...} command above is where the magic happens. In details it says: Get CNN's Top Stories at http://rss.cnn.com/rss/edition.rss (the source attribute), but only the last 10 items (the max attribute). The "start" attribute tells SendCastle to start from the beginning, it is the default and you don't need to specify it. The "type" attribute says that this is RSS Feed (there may be other automated content sources in the future. If you have ideas, let us know!).

RSS feed in firefox

As you can see in the template example above, there is nothing between {content...} and {/content}. When we see that there is no content there, we will use a very simple default style. This is just a trick to get you started easily.

Eager to see an example? If you have put the above as a template of your segment you can now go to Segment Settings (see above), then click "Preview" button.

the simple layout

Looks a bit dull, doesn't it? Read on if you want to customize things. :-)

Styling your message
Within the {content...} block in the example above you can add your own HTML and reference parts of the feed's items.

For example:

    <h3>SendCastle's RSS-to-email example</h3>
    {content type="rss" source="http://rss.cnn.com/rss/edition.rss" max="10" start="0"}
        <a href="{$rss_permalink}">Read more...</a><br/><br/>

The HTML within the {content ...}{/content} "block" will be repeated for every item in the RSS feed. So, for each item we now made the title ($rss_title) appear in bold, the content ($rss_content) as a paragraph and a "Read more" link ($rss_permalink) to the item's webpage.

This is, of course, still a rather dull example, but the sky is the limit. You can make the RSS items appear in any way you want.

Step 2: Scheduling the mail

If you were editing your template, you should save and exit the editor. When you are out to canvas, make sure you are zoomed in on the segment and click on its title (it will say "New Segment" if you haven't changed it).

segment SendCastle

You should now see "Segment Settings", you will want to go to "Advanced Settings"

Segment Settings SendCastle

 Most of what you see probably makes sense, but there are a few things worth mentioning.

Scheduling automatic sending
What you are going to set up here is not only fetching content automatically. You will also implicitly tell SendCastle that we should send the segment at the specified interval. The time (or interval) you select is not the time of sending, it's the time when we should fetch the RSS feed from your website and then start generating it. Depending on the size of the recipients list this can take a little while.

You can schedule sends at a wide range of intervals. For instance every day at 09:00, every Friday at noon or on 15th of January at 11:00 every year. The most common usage is probably sending an update every day since your subscribers likely want speedy updates.

Note that only the segment will be scheduled for automatic sending, not the campaign. This means that you can create more than one autmatic sends in the same campaign.

We will NOT send anything to your recipients if there were no new items in your RSS feed since the last send.

We determine whether an item is "new" by looking at the ID of the item and if there is no ID, we will look at the permalink of each individual item. If you update an item and want to notify your recipients about an update you would need to change its ID. For details, see {$rss_id}.

If you wonder where you can set the URL of your RSS feed, please read on (hint: it's done in the template)!

If you want to modify the template on the segment, you should "Pause" sending to prevent us from sending a mail that you are working on (could be cause for embarrassment otherwise).

Test the content
If you want to see how a mail looks with the latest content from your RSS feed you can simply click "Refresh content now" and then "Preview mail in webbrowser".

And as mentioned, we will not send anything if there are no new items in your RSS feed.

NOTE: After your template is ready you should "unpause" sending or it will not be sent.

Completed Segment Settings

More information: Substitutions for RSS Items

In the examples above we used the most common substitutions, but an RSS feed can contain a lot of other content too.

For detailed information you should check out the documentation on available substitutions for RSS Feeds.