Automatically Importing Content Cards using the RSS feed reader
You can import Content Cards by subscribing to an external RSS feed. This is a great way to import blog posts as they are created, product definitions from eCommerce platforms, etc.
Once you have your RSS feed set up and exposed (this is on by default with WordPress), you can set up an RSS subscription in ActiveDEMAND. If you are subscribing to an RSS feed from your WordPress blog, the RSS feed does not, by default, include the feature images in the feed. If you are using the ActiveDEMAND WP plugin (version 0.2.38 or higher) , your RSS feeds will automatically have images injected into the feed.
Clicking the 'New Feed' button will bring up this modal:
Create Options:
- Content Card: The feed reader will create a content card for each 'post'.
- Product: The feed reader will create a Product/Unit for each 'post'
Feed Type:
- RSS: the feed being polled is structured using the standard RSS schema . This is typically used by WordPress
- ATOM: the feed being polled is structured using the ATOM schema. This is used by amazon, Shopify, etc
- Web Parser: This is a full featured web parser. This allows you to parse information that is displayed on a web site.
Web Parser Options
'js_render': true, // Enable JavaScript rendering
'premium_proxy': 'true',
Selector | Purpose | Example |
---|---|---|
element |
Select by tag |
div , span , h1
|
.class |
Select by class |
.product , .price
|
#id |
Select by ID |
#main , #product-123
|
[attr] |
Has attribute | [data-id] |
[attr="val"] |
Exact attribute | [type="submit"] |
[attr*="val"] |
Contains value | [href*="product"] |
[attr^="val"] |
Starts with value | [class^="product-"] |
[attr$="val"] |
Ends with value | [src$=".jpg"] |
:nth-child(n) |
By position | li:nth-child(2) |
:first-child |
First child | li:first-child |
:last-child |
Last child | li:last-child |
:not(selector) |
Negation | .item:not(.featured) |
A > B |
Direct child | .product > .title |
A + B |
Adjacent sibling | h2 + p |
A ~ B |
General sibling | .featured ~ .product |
A, B |
Multiple selectors | .price, .discount |
A B |
Descendant | .product .price |
You will have to check with your source documentation to get the proper URL for your feed. For WordPress, the blog feed is
https://www.yourdomain.com/feed
Be sure to set a Target Name (i.e. the name of the button for the Content Card). That is it. Once you save and activate the feed, ActiveDEMAND will pull the RSS feed and create stories. Most blog RSS feeds will give you the last 10 posts in the feed, thus if you want all the posts, you have to do an export/import as described earlier. ActiveDEMAND will poll the feed for new content 2 times per day. To manually trigger a Feed poll, deactivate, then re-activate the feed.
Comments
Please sign in to leave a comment.