Skip to main content

 

GovDelivery

Automating RSS Feed Updates by Email

GovDelivery Communications Cloud can be configured to include website content in bulletins sent to subscribers. Using the  GovDelivery Page Watch feature with existing client RSS/Atom functionality allows bulletins to be populated with RSS or Atom feed information.

Communications Cloud's Page Watch then monitors the feed, inserts newly posted data into the bulletins, and send the bulletins to subscribers. Bulletins can be sent manually by an administrator or automatically using the Auto Send feature.

If the content of an RSS or Atom feed is updated, but the GUID remains the same, Communications Cloud will create a draft bulletin about the updates. However, the bulletin will not be sent automatically to subscribers. The appropriate administrator(s) are notified, and an administrator will need to manually send the bulletin.

Setting up an RSS/Atom Feed for Page Watch

Typically, your content management system creates and updates RSS/Atom feeds. Once the feed is set up and hosted on your website, it can be offered as a subscription topic in Communications Cloud.

Important Note: We strongly recommend that you only use Page Watch on RSS/Atom feeds you host and curate. 

Atom Technical Information

We recommend using a validation tool, such as FeedValidator, to verify that the structure and content of a feed is correct. All required elements and attributes must be present for Communications Cloud to correctly read the feed.

Optional Elements

When implementing the feed, you may find that many of the optional elements require very little extra work. Include as many of the optional elements as are appropriate for your feed. While many of the optional elements are not used by Communications Cloud at this time, other readers will recognize the optional elements, improving the quality of the information present in the feed.

Primary Elements used by Communications Cloud

Below is an outline of the primary Atom elements used by Communications Cloud.

  • <title> - The title will appear as the subject and first line in the outbound email to subscribers. This is a required element for a working Atom feed.
  • <link> - The link is incorporated into the title as the first line in the outbound email to subscribers. This is also a required element for a working Atom feed.
  • <summary> - The <summary> element contains the text used for the body of the Communications Cloud bulletin. The <summary> field is mandatory for Page Watch RSS. This is the last required element for a working Atom feed.
  • <updated> - The <updated> field is optional for Communications Cloud. If the field does not existing within the feed, Communications Cloud will not add a date to the generated email.
  • <id> - The purpose of the <id> element is to uniquely identify an item within a feed. While this item is not required, it is recommended, as it is used by Communications Cloud to determine if an item existed the last time the feed was scanned or if the item has changed in some way. If the <id> element is not present, Communications Cloud will use the <link> and <title> elements to uniquely identify an item. If the <id> element is absent and the <link> or <title> elements change, Communications Cloud will treat the item as a new item.

RSS Technical Information

Communications Cloud supports RSS 2.0. At this time, it does not support RSS 0.9x or RSS 1.x.

The official specification for RSS 2.0 is available at http://cyber.law.harvard.edu/rss/rss.html. The specification lists a number of elements that are required for a feed to be valid, as well as optional elements. We recommend using a validation tool, such as FeedValidator, to verify that the structure and content of a feed is correct. All required elements and attributes must be present for Communications Cloud to correctly read the feed.

Optional Elements

When implementing the feed, you may find that many of the optional elements require very little extra work. Include as many of the optional elements as are appropriate for your feed. While many of the optional elements are not used by Communications Cloud at this time, other readers will recognize the optional elements, improving the quality of the information present in the feed.

Primary Elements Used by Communications Cloud

Below is an outline of the primary RSS elements used by Communications Cloud.

  • <title> - The title will appear as the subject and first line in the outbound email to subscribers. This is a required element for a working RSS feed.
  • <link> - The link is incorporated into the title as the first line in the outbound email to subscribers. This is also a required element for a working RSS feed.
  • <description> - The <description> element contains the text used for the body of the Communications Cloud bulletin. To use HTML in the description element rather than plain text, wrap it in a "CDATA" tag. The <description> field is mandatory for Page Watch RSS. This is the last required element for a working RSS feed.
  • <pubDate> - The <pubDate> field is optional for both the RSS 2.0 specification and for Communications Cloud. If the field does not existing within the feed, Communications Cloud will not add a date to the generated email.
  • <guid> - The purpose of the <guid> element is to uniquely identify an item within a feed. While this item is not required, it is recommended, as it is used by Communications Cloud to determine if an item existed the last time the feed was scanned or if the item has changed in some way. If the <guid> element is not present, Communications Cloud will use the <link> and <title> elements to uniquely identify an item. If the <guid> element is absent and the <link> or <title> elements change, Communications Cloud will treat the item as a new item.

Creating a Page Watch Topic for an RSS/Atom Feed

  1. On the Account Area toolbar, click Topics.
  2. Click on the appropriate topic.
    Notes:
    • Bulletins sent through Page Watch will be categorized with this topic and sent to the subscribers of this topic.
    • If you want to set up a new topic with Page Watch, you can find instructions in the Creating and Editing Topics article.
  3. On the Topic Information page, scroll down to the Page Watch Settings section and set Page Watch Enabled to Yes.
  4. Keep Page Watch Suspended set to No.
  5. Set Page Watch Type to RSS/Atom Feed
  6. Enter the URL in the Page Watch URL field.
    Notes:
    • Your URL must contain the scheme name (e.g., http://).
    • To see the page you have entered, click the green "Preview" button next to the URL field.
    • If you want Communications Cloud to watch more than one page or feed for the specified topic, click Add URL
  7. Set the Number of Page Watch Results to Save for this topic.
    Notes:
    • This setting does not affect Page Watch bulletin drafts; it determines how many results summaries are listed in the Page Watch Results list for this topic.
    • This setting works together with the Page Watch Schedule. For example, if you have Page Watch set to run once a day and set the Number of Page Watch Results to Save to 5, Communications Cloud will store the last 5 Page Watch results or the changes for the last 5 days.
  8. Select a Page Watch Schedule.
  9. Select if you want to Bundle Page Watch Messages. When selected, only one message is created for all new updates when Page Watch checks the page.
  10. To enable Auto Send, set Page Watch Auto Send to Yes
  11. Click Save to save your changes.

Page Watch RSS Best Practices

Embedding HTML code in RSS Feeds

Many clients find that embedding HTML code into RSS description fields produces a well-formatted bulletin that can be automatically sent to subscribers without administrator intervention. To do this, you must use CDATA tags. 

CDATA tags allow you to embed any and all HTML tags into an RSS 2.0 XML document. If used in the description field, it will be passed along into the bulletin that gets sent to subscribers. 

Example:

<description> <[[CDATA:<p> This is some smaller text </p>]]</description> 

Publishing Communications Cloud-Specific Feeds

Some clients prefer to publish two or more similar feeds: one made available to the public from within the client website, and another that is used by Communications Cloud for the sole purpose of sending specifically formatted bulletins. Clients may also choose to create RSS feeds just for Communications Cloud and not make the feeds available to the public.

Sample Page Watch RSS Message

Below is a sample Page Watch RSS message from the City of Sacramento. If you would like your Page Watch RSS messages to be formatted in the same way as the following message, you'll need to add the this code to your topic bulletin template:

<table style="width: 600px;" border="0" align="center">
<tbody>
<tr>
<td><span style="font-size: medium; font-family: helvetica;">[[PAGEWATCH_CHANGE_LIST]]</span></td>
</tr>
</tbody>
</table>

 

What's Next