# Steps to follow to create a (Content Aggregator) plugin, that creates topics from different RSS feeds

**URL:** https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578
**Category:** Development
**Created:** [4 maart 2016 om 17:42 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578 "2016-03-04T17:42:16Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![a-magdy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/a-magdy/32/121954_2.png) [@a-magdy](https://meta.discourse.org/u/a-magdy)
#### Post date: [4 maart 2016 om 17:42 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/1 "2016-03-04T17:42:16Z")

</div>

Hi,

So I found out about discourse a few days ago, and I was able to deploy it to my aws vm in a couple of hours (including getting to know what it is), and it blow me away, awesome work, it contains some features, that I had to implement myself in TelescopeJS -another open-source forum-.

But the only feature I am missing right now is creating topics from rss feeds to specific categories, to get the community going, so I looked around, and I found out that such plugin hasn’t been made until now, and the only feature that does that is the feed polling from only one site (that one that discourse will be embedded in), but I need to poll rss feeds from multiple sources.

So the only solution now is to create a plugin that does that, so I looked in the current implementation in TelescopeJS, and it uses a package in Node to parse feeds, and create posts for specific users on certain categories, not that complex, so I looked around for a Ruby on Rails gem that does that and found out that ([GitHub - feedjira/feedjira: A feed parsing library · GitHub](https://github.com/feedjira/feedjira)) is the gem I need.

So now I’ve to create a plugin that parses a list of rss feeds, and use Discourse API to create posts, but as I am new to both discourse and Ruby on Rails, would you please help guide me to the points that will get me started, like:

1. The current implementation of the feed polling from the embedded site.
2. What consideration I have to keep in mind while write the plugin.
3. How to create a form in the admin panel for this plugin to take inputs, so anyone else can use it easily, or it will read from a configuration file ?!
4. What do I need to know while creating a post for a certain user and bind it to some categories, I don’t want these posts to be crashed, as I want them to be included in the email digest.
5. A plugin to refer to, and use the same structure and steps, while creating this.
6. Any extra points, that you may have faced while creating a plugin for discourse.

Thanks

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [4 maart 2016 om 17:51 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/2 "2016-03-04T17:51:40Z")

</div>

> [@a-magdy](#):
>
> but I need to poll rss feeds from multiple sources.

You can have different hosts that post to different categories. Is that what you’re talking about?

 ![](https://global.discourse-cdn.com/meta/original/3X/4/6/46e5eef349bc0a13320280abc9a118a72977b19d.png)

---

<div class="post-metadata">

### Author: ![a-magdy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/a-magdy/32/121954_2.png) [@a-magdy](https://meta.discourse.org/u/a-magdy)
#### Post date: [4 maart 2016 om 18:36 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/3 "2016-03-04T18:36:16Z")

</div>

What I need is a “Content Aggregator” plugin, that fetches content from different rss feeds, and adds them to Discourse.

but the embedding feature allows me to embed Discourse into my blog or an existing site, and it allows pulling topics from that site only (or from one rss feed).

What I need is for Discourse to import and create topics automatically from different RSS feeds, for ex:  
in Gaming category, I want to add every new topic from the “[CNET](http://www.cnet.com/rss/gaming/)”, and for Java category I’ll find some good rss feeds too … etc.

So that my forum will always have new content, from other different sources, with links to all of them, so it won’t rely only on the moderators and users activity, but there will be new content added regularly from other rss feeds.

This feature is implemented in TelescopeJS, please check it here:  
[https://telescope.readme.io/docs/post-by-feed](https://telescope.readme.io/docs/post-by-feed)  
and the blog post about it here:  
[http://www.telescopeapp.org/blog/building-content-aggregator-email-digest/](http://www.telescopeapp.org/blog/building-content-aggregator-email-digest/)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [4 maart 2016 om 18:44 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/4 "2016-03-04T18:44:29Z")

</div>

First, I would setup a dev environment locally. Developing a plugin in **production** mode is going to be a PITA.

Secondly, I would create a plugin which will do the simplest thing that works

1. Create a scheduled job that will regularly check if **one** RSS/Atom feed has been updated
2. Use the [`PostCreator`](https://github.com/discourse/discourse/blob/master/lib/post_creator.rb) class to create topics/posts from the items in the feed
3. …
4. Profit 💵

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4 maart 2016 om 23:29 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/5 "2016-03-04T23:29:30Z")

</div>

> [@a-magdy](#):
>
> there will be new content added regularly from other rss feeds

Yes but this is generic, low value “content” .. what’s the value to people that find your forum when it is filled with generic RSS? That’s not why people visit sites..

---

<div class="post-metadata">

### Author: ![a-magdy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/a-magdy/32/121954_2.png) [@a-magdy](https://meta.discourse.org/u/a-magdy)
#### Post date: [4 maart 2016 om 23:45 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/6 "2016-03-04T23:45:03Z")

</div>

> [@codinghorror](#):
>
> Yes but this is generic, low value “content” .. what’s the value to people that find your forum when it is filled with generic RSS? That’s not why people visit sites..

I won’t just use generic rss feeds, I’ll carefully choose rss feeds releveant to the categories I’ll have, and choose 1 or 2 of them foreach category, my target is to build a community for my company, and we are around 700, so there is no easy way to find moderators for all categories, technologies and interests to always keep the forum updated, I want the users to dive in, share and talk, and always be aligned to new ideas and technologies, so carefully choosing some cool rss feeds, will get things going.

And answering the part about:

> [@codinghorror](#):
>
> That’s not why people visit sites

This is not intended to be a commercial forum, but rather the place where ideas are being discussed, and new material is always being presented, although I think it might have commercial value is it was taken care of by an expert.

Feedly is all about that.

 ![](https://global.discourse-cdn.com/meta/original/3X/5/2/521d90f079eef1cee8ac84b6d623ec60e6d57bc4.png)

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [5 maart 2016 om 06:37 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/7 "2016-03-05T06:37:48Z")

</div>

If you are comfortable with something like `php`, `cron` and `curl` then I suggest having a script run at intervals of your choice (ie, hourly)

[https://meta.discourse.org/t/rss-import-non-discourse/27420/5?u=purldator](https://meta.discourse.org/t/rss-import-non-discourse/27420/5)

---

<div class="post-metadata">

### Author: ![Thomas\_S](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@Thomas\_S](https://meta.discourse.org/u/Thomas_S)
#### Post date: [31 augustus 2017 om 06:53 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/8 "2017-08-31T06:53:50Z")

</div>

Hey, did you end up creating a plugin that works?

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [31 augustus 2017 om 10:18 UTC](https://meta.discourse.org/t/steps-to-follow-to-create-a-content-aggregator-plugin-that-creates-topics-from-different-rss-feeds/40578/9 "2017-08-31T10:18:13Z")

</div>

Discussion continued here:

> [@Has anyone tried this RSS poster?](https://meta.discourse.org/t/has-anyone-tried-this-rss-poster/53520):
>
> I was wondering if anyone has tried this. discourse-rss-poster. [https://github.com/LeoMcA/discourse-rss-poster](https://github.com/LeoMcA/discourse-rss-poster) I had an issue after installing it last night but now not sure if it wasnt just the adsense plugin causing the issues.
