Skip to main content

From RSS Feeds to email

Learn the basics of Mindflow

Jean-Baptiste Joly avatar
Written by Jean-Baptiste Joly
Updated over 3 months ago

Overview

Leverage Mindflow to automate the monitoring of RSS feeds for new articles and receive instant email notifications when fresh content is detected.

In this workflow, you will explore the following Mindflow features:

  • Set up a scheduled trigger

  • Utilize data transformation and functions

  • Implement conditions for custom logic

  • Apply a ForEach loop for batch processing

  • Integrate an AI Agent for intelligent processing

  • Make HTTP requests using the connector

  • Send email notifications using the native email step

Step by Step

1. Get Started

Go to https://your-tenant.mindflow.io and log in. If you don’t have an account yet, click on Create Account. After clicking the button, you will receive an email with a code to complete your registration.

2. Build a flow

Now that you're logged in, it's time to start creating your workflow in the Mindflow editor.

1. In your environment, click on the Create Flow button to initiate a new workflow.

2. Select the flow you just created to enter the editor. If you wish to change the name or emoji of your flow, simply click on it to make the edits.

You are now in your flow editor!

3. To add a Scheduler Trigger, click the blue ➕ button and select Scheduler from the available options.

4. Click the ⚙️ icon on the Scheduler to configure it. Set it to run your flow every morning at 9 AM.

Here you go, you've just set up your first recurring flow. Now, it's time to enhance it, as currently, it’s not doing anything!

5. Below your scheduler, click the ➕ button to add a Transform data step. You can rename this step to List of Your RSS Feeds by clicking on it.

6. Let’s open the configuration of this step by clicking on the ⚙️ icon. Here, we’ll create our first variable, which we’ll call Feeds. This variable will store the RSS feeds you want to monitor (e.g., ["https://www.cert.ssi.gouv.fr/feed/"]).

Now, we need to add a For each step to iterate through all the RSS feeds we want to monitor.

7. After the Transform Data, click the ➕ button to add a For each step. You can rename it For each Feeds.

8. Open the configuration menu. Here, we will set up the array we’ll iterate over. In the Value field, enter a / and select Feeds from the Variable section.

Now, we can begin processing each RSS feed as required.

9. Click the ➕ button inside the For Each step and add an HTTP Request. Rename it to Get RSS Feed.

10. Open the configuration menu and select the iteration data from your For Each step.

Congratulations! This HTTP Request will now query all the desired RSS feeds.

For the next steps, we need to understand the structure of the data returned by the RSS feeds. To do this, we’ll trigger the Get RSS Feed step individually by clicking the ▶️ icon.

11. Click the ▶️ button and see what happens. A green bubble should appear next to the step, allowing you to view the API response by clicking on it.

And here’s the problem… we can see that the response is in XML format and doesn’t seem usable 😢.

But don’t worry! In Mindflow, we can easily convert XML to JSON. Let’s do that now.

12. Click the ➕ button to add a Transform data step. Rename this step to From XML to JSON. Inside, we’ll create a variable called Articles and select the response body from the previous step.

13. Next, we’ll apply our first transformation function by clicking the fx button and selecting the XML to JSON function.

Now that we have the list of articles, we need to retrieve only the new ones (in our case, those published within the last day).

To do this, we’ll iterate through all the articles and check their publication date.

14. Add a For each step and rename it to For Each Articles. Then, open the configuration menu and set up the array to iterate over. In the Value field, enter a / and select the item value from the Articles variable. The item represents the list of articles.

Now, with a Condition and a Transform data step, we will be able to save the new articles.

15. Add a Condition step and a Transform data. Rename them Is a new Article? and Save Article.

16. Also, rename the label connecting your Condition and Transform Data steps. This helps document the flow and makes it easier to read. Rename it ✅ YES

17. Next, open the configuration menu of the Condition.

Hold on! Things might get a bit tricky here. To compare dates, we will need to convert them into Unix Timestamp format (a format that is not very human-readable, but extremely useful for our purpose).

18. Now, let’s configure the Condition. On one side, we will retrieve the article’s publication date in Unix Timestamp format, and on the other side, we’ll get yesterday’s date (also in Unix Timestamp format). To open the comparison menu, click on the if or on the >.

19. In operand A, we will configure the publication date. Select the pubDate field from the For Each Articles variable. Then, we will apply two transformation functions:

  • Translate DateTime Format: In this function, we will modify the Input Format and Output Format fields with the following values: EEE, dd MMM yyyy HH:mm:ss ZZZ and yyyy-MM-dd'T'HH:mm:ssZZ.

  • To UNIX Timestamp: This function will convert the date to Unix Timestamp format.

As a result, you will see a number in the output value, which represents the Unix timestamp of the article.

20. In Operand B, we will calculate the Unix Timestamp for yesterday’s date. To do this, we will apply two transformation functions:

  • Modify Date with Duration: We will retrieve today’s date and subtract one day from it. To do this, select the Subtract operator, then, under Advanced Parameters, enable Days to adjust and set the value to 1.

    Next, to configure the Input Date field, we will apply two more functions: Get Time (which provides the current date in Unix Timestamp format) and From UNIX Timestamp (to convert this date into a format that can be used by the Modify Date with Duration function).

    Now that we’ve retrieved yesterday’s date, the final step is to convert it to Unix Timestamp format.

  • To UNIX Timestamp: We’re getting familiar with this one by now.

21. Now, we just need to configure the comparison between Operand A and B by selecting Is Greater Than.

Do you feel like you’ve just experienced an Inception-like journey with all these nested functions? 😅 This is just to show you how Mindflow can handle complex tasks with ease!

22. Before configuring our Transform Data Save Article, let's create our first global variable for the workflow. In the workflow configuration menu, under the Variables tab, we will add a variable called new_articles, which will be an empty array ([]).

23. In our Transform Data step, we will now update the global variable new_articles. To do this, we will add an item named new_articles and apply the Array Push transformation function (to add an element to an array).

24. Configure the function with the following settings:

  • Input: The array we want to update, in this case, new_articles.

  • Value to push: The value to add to the array. Here, we will build an item in JSON format that will contain the title, description, and link of the article. These elements will be dynamically retrieved from the variables within the For Each Articles step.

This way, we’ve created an item that can be easily used within Mindflow.

Now, all that's left is to prepare the email we are going to send and then send it.

25. To prepare the email, we will use an AI Agent. Through its prompt, this agent will generate an HTML email containing the various elements collected by the flow.

You can configure the Message with the following prompt:

You are an AI agent specialized in generating HTML email templates. Your task is to create a clean and well-structured HTML email containing the latest news from RSS feeds.

Instructions:
Format the email in HTML with a simple and professional design.
The email must include:
- A header with the title: "Latest News Updates"
- A section for each news article, including:
- Title as a clickable link (<a> tag)
- Description in a short paragraph
- Style the email using inline CSS for better email compatibility.

Style the email using inline CSS for better email compatibility.

Article input :

We must also dynamically append the new_articles variable at the end.

26. Let’s run this agent individually and see what it generates by clicking on the green log bubble.

27. All that's left to do now is send the email. Add a Send email step, enter your email address in the To field, specify the subject (e.g., Latest News Updates), and finally, enable the HTML option in the Advanced menu to select the output from our AI Agent.

3. Conclusion

By following the steps outlined in this article, you've learned how to set up an automated RSS feed monitoring system using Mindflow. From creating a recurring flow and transforming data to integrating an AI Agent for HTML email generation, you now have the tools to monitor new content from RSS feeds and send customized email notifications effortlessly.

This process demonstrates Mindflow's power in simplifying complex tasks, allowing you to build highly efficient workflows with minimal manual effort. Whether you're automating the extraction of RSS data, transforming it into a usable format, or sending tailored email alerts, Mindflow's intuitive interface and advanced features make these tasks seamless.

Now, with just a few clicks, you can automate the collection, processing, and distribution of content, saving you time and ensuring that you're always up-to-date with the latest information.

Did this answer your question?