Purpose of this Template:
This template will help us combine multiple RSS sources, curate the content, and send the result to a Telegram channel for easy access.
How it Works:
- We start with two RSS sources from which we primarily want to extract the title, link, and publication date. The workflow will periodically query both sources and use regular expressions and some JavaScript to edit several fields until we have the desired data in the proper format.
- Once the sources are formatted, we will combine them using the "Merge" node.
- Since the workflow will run twice a day, we will discard items older than two days. This will be achieved using a "Filter" node.
- A "Sort" node will arrange the items by publication date so that the most recent ones appear first.
- To create a flat list in "Markdown" format from the resulting items, we will use a small JavaScript function. This function must escape special characters to ensure they are correctly interpreted.
- Finally, the list will be sent to the appropriate channel using a "Telegram" node.
Configuration Instructions:
- When opening the workflow for the first time, configure the Telegram credential.
- In the "RSS" nodes, insert the URLs of the sources to query.
- In the "Edit Fields" nodes we will have to adjust the regular expressions to obtain the desired result based on our RSS sources. In this case the expressions have been adjusted to obtain the name, size and link of each published file.
- In the "Sort" node we can modify the maximum age of the elements that we are going to send. In this case, 2 days have been included (2 * 24 * 60 * 60 * 1000 milliseconds) since it is necessary to take into account that Telegram has a maximum message length and if we exceed it, it will return an error instead of sending it.
- Lastly, include the channel ID in the "Telegram" node where the messages will be sent.
Template was created in n8n v1.72.1