Azure Logic App - Automatically Send Email With RSS Feed Trigger

In this article, we’ll learn about Azure Logic App and then go ahead to create a trigger to send email automatically for new RSS feed.  

Azure Logic App 


Source: Microsoft

Azure Logic App is one of the services offered by Azure in its cloud platform to create and run workflows in an automated form in order to integrate services, apps, data, and any kind of system. From B2B solutions to connecting legacy system may it be on premises or cloud; Azure Logic App has the functionality to support it all. Automating Emails from Office 365 or using Connectors to operate hundreds of other services, processing orders from customers, monitoring data such as tweets and analyzing sentiments, Azure Logic App has unimaginable power to make every use case possible.  

Now, let us dive into creating a logic app and design a trigger to send email for any new update on RSS for news on the CNN website.  

Creating a Logic App 

Step 1 

Visit the Azure Portal. Make sure you have a subscription or a sponsorship pass.  

Step 2 

Search for Logic App in the search bar.  

Step 3 

On the Logic Apps page, click on Add.  

Step 4 

You’ll be directed to the form to fill.  

Step 5 

Here, select your Azure Subscription. Here I’m using my Sponsored Pass.  

Next, Add your Resource Group. If in case you don’t have one, create a new one click on the Create New button.  

Step 6 

Under the Instance Details, add your logic app name. I’ve named my logic app name as ojash-la-1.  

Similarly, select the Region and choose the Plan type as Consumption. This will charge you as per your usage which would be minimal to Standard for the task we are doing right now. Later, when you work on a full-fledged system that would be used all month long and more, you can select the Standard Plan.  

Once, all details are filled, click on Review + Create.  

Step 7 

Next, as the details are validated, click on Create button.  

The deployment will be initialized and message will pop up in the notification.  

Step 8 

Once the deployment is successful, we’ll be presented with the Go to Resource button.  

Creating Trigger to automatically send email for new RSS feed 

Step 9 

Now, we are taken to the Logic Apps Designer page.  

Here, under the Templates, select the Blank Logic App.  

Setting Up Trigger 

Step 10 

Now, on the search bar for connectors and triggers, search for RSS.  

Step 11 

Under Triggers, select the When a feed item is published – RSS.  

Step 12 

Here, we will fill in the RSS feed URL.  

You can visit the RSS feed for CNN website and get the link.  

Choose the Publish Date and under How often do you want to check for items, Select 1 or 3 Minutes. You can set this for second to days and months too. For now, as we are testing, set it to minimal time to obtain the output.  

Step 13 

Now, Click on the Trigger itself, and it’ll minimize.  

Now, Click on the New Step.  

You can click on Save button to save the progress.  

Setting up Action – Auto Emailing  

Step 14 

Now, we choose an operation. Here, we are going to search for Gmail.  

Under Actions, we’ll click on Send Email (V2).

Note
If you are going to use hotmail or live id, you can search for mail and select the Outlook option.  

Step 15 

Now, we name our connection and set the Authentication Type to Use default shared application.  

I’ve named mine to sendemail. Now, click on Sign in.  

Step 16 

The authentication process will now begin. I’m using the [email protected] id to send email. Hence, I select that email account to connect.  

CNN News Feed RSS 

Step 17 

Now, we’ll be given the option to list the email account. I’ll add in my hotmail and another gmail account to receive my emails from the new feed of CNN Top Stories.  

Twitter RSS Feed 

Similarly, we can also use RSS from Twitter to get update for any kind of tweet from any particular person or account or for any #Hashtag. Simply visit the rss.app and create the RSS feed link which will be in .xml 

Step 18 

Now, Click on Add new parameter.  

Here, select, the Subject and Body.  

Step 19 

Here, I’ve added some text as New RSS: in the Subject. Next, I select the Feed title to get the dynamic text of the title.  

Similarly, Under Body, I added Headline, New Date, and View with dynamic RSS feed values of Feed title, Feed published on and Primary feed link respectively.  

Step 20 

Once, this all is done, we can save.  

Then, Click on Run Trigger and Run.  

Once, the trigger is successfully checked and is running, we’ll be updated with notification.  

Step 21 

As the Logic App is now run, we’ll start to obtain new emails automatically with the update on CNN Top Stories website. Through the RSS feed, we’ll get the email where we can see, the Dynamic values of the news – the Headline, Published Data and Link to the News.  

With this, we have successfully, Created our Logic app with Trigger from RSS Feed and setup to send emails automatically with any new update on the RSS feed.  

Enabling and Disabling/ Deleting Logic App 

Step 22 

Once, the Logic App is setup with the Triggers and run, it becomes extremely active and can run trigger numerous times in a minute itself. To save ourselves from any charges to incur when we don’t want it running. We can simply click on Disable and later when we want it to function, we can click on Enable again. 

Furthermore, once our task is completed and the Logic App is of no use, it is better to Delete the App itself.  

Conclusion 

Thus, in this article, we learned about Azure Logic App and then got into a step-by-step tutorial to create a blank logic app to setup trigger from an RSS feed to automatically send emails to any particular set of email id by authenticating our email account. We learned to use the RSS feed from CNN as well as Twitter RSS feed for any particular account or #Hashtags.