# RSS Creation in NODERED

**URL:** <https://discourse.nodered.org/t/rss-creation-in-nodered/30714>\
**Category:** Developing Nodes\
**Created:** [26 July 2020 08:39 UTC](https://discourse.nodered.org/t/rss-creation-in-nodered/30714 "2020-07-26T08:39:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MAaron](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maaron/32/9813_2.png) [@MAaron](https://discourse.nodered.org/u/MAaron)\
**Post date:** [26 July 2020 08:39 UTC](https://discourse.nodered.org/t/rss-creation-in-nodered/30714/1 "2020-07-26T08:39:14Z")

</div>

Hi there!

I would like to create an own RSS feed, containing magnet links, something like on showrss.info .

But I want to be able to add a new item entry to this RSS feed from my phone.

None of these 2 processes I know how to, can anyone explain where to start?

Thx,  
Aaron

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [26 July 2020 10:33 UTC](https://discourse.nodered.org/t/rss-creation-in-nodered/30714/2 "2020-07-26T10:33:20Z")

</div>

I have created an example flow that provides 2 endpoints

`http://node-red-ip:1880/updaterss` to add an item to the feed using a form  
`http://node-red-ip:1880/rss` that creates the rss feed.

When adding an entry via `/updaterss` it uses a flow variable (need to store it somewhere), it gets the existing elements and adds+saves the new array.

The `/rss` can be used in other applications that read it.

Flow:

```auto
[{"id":"50ffec09.ee977c","type":"xml","z":"a767d395.f10e8","name":"","property":"payload","attr":"","chr":"","x":458,"y":744,"wires":[["c2f07ad7.383c88"]]},{"id":"1919a48a.b9c35b","type":"function","z":"a767d395.f10e8","name":"","func":"items = flow.get(\"items\")\n\n// required elements for rss feed\ndescription = {\n \"title\": \"Your feed title\",\n \"link\": \"http://yoururl\",\n \"description\": \"my RSS feed\"\n}\n\n\n\nmsg.payload = {\n \"rss\": {\n \"$\": {\n \"version\": \"2.0\"\n },\n \"channel\": description,\n \"item\":items\n }\n}\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":324,"y":744,"wires":[["50ffec09.ee977c"]]},{"id":"1cbee66a.960cb2","type":"http in","z":"a767d395.f10e8","name":"","url":"/rss","method":"get","upload":false,"swaggerDoc":"","x":180,"y":744,"wires":[["1919a48a.b9c35b"]]},{"id":"132a8898.59d577","type":"http response","z":"a767d395.f10e8","name":"","statusCode":"","headers":{},"x":602,"y":840,"wires":[]},{"id":"152226cc.51ce39","type":"http in","z":"a767d395.f10e8","name":"","url":"/updaterss","method":"get","upload":false,"swaggerDoc":"","x":200,"y":864,"wires":[["33f934d9.35718c","20a7a02a.24b75"]]},{"id":"33f934d9.35718c","type":"template","z":"a767d395.f10e8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<form>\n <label for=\"title\">Title</label><br>\n <input type=\"text\" id=\"title\" name=\"title\"><br>\n <label for=\"link\">Link</label><br>\n <input type=\"text\" id=\"link\" name=\"link\"><br>\n <label for=\"description\">Description</label><br>\n <input type=\"text\" id=\"description\" name=\"description\">\n <br>\n <input type=\"submit\">\n</form>","output":"str","x":396,"y":840,"wires":[["132a8898.59d577"]]},{"id":"20a7a02a.24b75","type":"switch","z":"a767d395.f10e8","name":"","property":"req.query","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":386,"y":888,"wires":[["ca750acd.4fc448"]]},{"id":"ca750acd.4fc448","type":"function","z":"a767d395.f10e8","name":"","func":"items = flow.get(\"items\") || []\n\nm = msg.req.query\nt = m.title\nl = m.link\nd = m.description\n\nitems.push({title:t,link:l,description:d})\n\nflow.set(\"items\",items)\n\nreturn null","outputs":1,"noerr":0,"initialize":"","finalize":"","x":471,"y":888,"wires":[[]],"l":false},{"id":"3692a1af.9f00de","type":"comment","z":"a767d395.f10e8","name":"Update function node with details","info":"","x":260,"y":696,"wires":[]},{"id":"c2f07ad7.383c88","type":"http response","z":"a767d395.f10e8","name":"","statusCode":"","headers":{"content-type":"application/xml"},"x":602,"y":744,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 September 2020 10:33 UTC](https://discourse.nodered.org/t/rss-creation-in-nodered/30714/3 "2020-09-24T10:33:24Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
