<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Vinay Singh's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/vinaysin/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/vinaysin/feed.xml</link>
    <description>Just another Developer Network site</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:43:11 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Calling Azure Functions from XSLT map in Logic Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/vinaysin/calling-azure-functions-from-xslt-map-in-logic-apps</link>
      <pubDate>Wed, 19 Jul 2017 18:55:50 GMT</pubDate>
      <dc:creator><![CDATA[Vinay Singh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vinaysin/?p=495</guid>
      <description><![CDATA[Scenario
Let's say we have to build an expense processing application. It takes the receipt with...]]></description>
      <content:encoded><![CDATA[<h1>Scenario</h1>
Let's say we have to build an expense processing application. It takes the receipt with amount and currency information and converts it into final amount in US dollars based on the exchange rate.
<h1>Solution</h1>
We will use Logic Apps to build the solution. It takes the receipt information through a Request trigger, uses XML Transform to generate the final amount and returns the result using Response action. We don't want to hard-code the currency conversion rate in the XSLT map as they keep changing and will Azure Functions to look it up.

Let's start with the building blocks - Azure Function and XSLT map. Later we will stitch everything together in a Logic App.
<h2>Azure Function</h2>
<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Azure-Function.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Azure-Function.bmp" alt="" width="767" height="506" class="alignnone size-full wp-image-497" /></a>

We have a C# Webhook Function here which reads the currency information from request query parameters and gets the conversion rate to USD. Here we have hardcoded the mapping in the Function, but in a real world scenario it would be coming from a database or in real-time from a web service etc. Click <a href="https://msdnshared.blob.core.windows.net/media/2017/07/run.csx_.txt">here</a> to download the source code.
<h2>XSLT Map</h2>
<a href="https://msdnshared.blob.core.windows.net/media/2017/07/XSLT-Map.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/XSLT-Map.bmp" alt="" width="1228" height="746" class="alignnone size-full wp-image-505" /></a>

The XSLT map takes Azure Function App URL as a parameter (line #5). There are several benefits of doing this -
<ol>
 	<li>The Function URL has authorization code embedded in it. We don't want to hard-code them in the map, rather fetch them from Azure Key Vault during deployment.</li>
 	<li>We might have different Function App URL for test vs. production environment.</li>
</ol>
To learn more about XSLT parameters support in Logic Apps you can try out <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/201-logic-app-xslt-with-params">Azure Logic Apps - XSLT with parameters </a>on github.

It then creates the output XML consisting of original currency, original amount and calculated amount in USD. For the calculation it first call the Azure Function passing the currency as input parameter and then multiplies it with the original amount.

We have used inline C# scripting to call the Function App using the HTTP client. In this example, we are passing the input parameters through query parameters and making a GET request but it can be easily modified to do more complex things like making a POST request with XML payload in request body.

<span>Click </span><a href="https://www.dropbox.com/s/u5rx4q58z0jx99h/XSLT.xslt.txt?dl=0">here</a><span> to download the source code.</span>
<h2>Logic App</h2>
Let's start with creating an Integration Account first and uploading the XSLT map into it.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Integration-Account.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Integration-Account.bmp" alt="" width="1267" height="473" class="alignnone size-full wp-image-506" /></a>

Next, create a Logic App in the same region and associate the Integration Account with it.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Logic-App-and-Integration-Account.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Logic-App-and-Integration-Account.bmp" alt="" width="1309" height="320" class="alignnone size-full wp-image-516" /></a>

Its a simple Logic App containing a Request trigger, XML Transform action and a Response action.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Logic-App-definition-overview.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Logic-App-definition-overview.bmp" alt="" width="650" height="312" class="alignnone size-full wp-image-526" /></a>

The Request trigger exposes a REST endpoint and expects the receipt information (XML format) in the request body.

The Transform action shows 2 fields -
<ol>
 	<li>The Content field takes the receipt information from the trigger body.</li>
 	<li>The Map field shows the list of maps in the associated Integration Account. Select the map uploaded in previous steps.</li>
</ol>
The designer detects that the map contains an input parameter called AzureFunctionUri and automatically adds another field in the action. Copy the Function URL from the Function blade and paste it here.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Transform-XML-action1.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Transform-XML-action1.bmp" alt="" width="622" height="500" class="alignnone size-full wp-image-545" /></a>

In the end, we call the Logic App from Postman passing in the receipt payload in the request body and get back the amount in USD.

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/Postman.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/07/Postman.bmp" alt="" width="1589" height="661" class="alignnone size-full wp-image-546" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Logic Apps Performance with Service Bus</title>
      <link>https://docs.microsoft.com/archive/blogs/vinaysin/logic-apps-performance-with-service-bus</link>
      <pubDate>Fri, 14 Apr 2017 15:00:29 GMT</pubDate>
      <dc:creator><![CDATA[Vinay Singh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vinaysin/?p=415</guid>
      <description><![CDATA[In this post, we will measure the throughput for Logic App to consume messages from a Service Bus...]]></description>
      <content:encoded><![CDATA[In this post, we will measure the throughput for Logic App to consume messages from a Service Bus queue using the Service Bus connector.
<h1>Single message trigger</h1>
Let’s create a new Logic App with the just the trigger “When a message is received in a queue (auto-complete)” provided by the <a href="https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-servicebus">Service Bus connector</a>.

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/Single-message-trigger.png" alt="single-message-trigger" width="359" height="179" class="alignnone size-full wp-image-425" />

We pre-populated the queue with 10,000 messages. It takes 25.5 minutes for the Logic App to drain all messages from the queue, i.e. at the rate of 6.5 messages per second.
<h1>Batch messages trigger</h1>
Now let’s create another Logic App with the batch trigger “When one or more messages arrive in a queue (auto-complete)”. The trigger configuration are as follows –
<ol>
 	<li>Maximum message count – starting from 5 going up to 175 (max limit) across test runs</li>
 	<li>Polling frequency – 30 seconds</li>
</ol>
<img src="https://msdnshared.blob.core.windows.net/media/2017/04/Batch-messages-trigger.png" alt="batch-messages-trigger" width="357" height="217" class="alignnone size-full wp-image-435" />

Again, we pre-populated the queue with 10,000 messages. It takes just 6 minutes with batch size of 5 for the Logic App to drain all messages from the queue, i.e. at the rate of 27.5 messages per second. As we increase the batch size to the maximum allowed value of 175, the throughput goes up to 400 messages per second.

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/Batch-size-vs.-Throughput.png" alt="batch-size-vs-throughput" width="486" height="294" class="alignnone size-full wp-image-455" />
<h1>Competing consumers</h1>
We can further increase the overall throughput with multiple Logic Apps (competing consumers scenario). Let’s create 10 Logic Apps with batch size of 175. We pre-populated the queue with 100K messages, i.e. 10 times more than previous runs to give enough time for competing logic apps to consume enough messages. It takes just 71 seconds for these Logic Apps to drain all messages from the queue, i.e. at the overall rate of 1408 messages per second.

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/Competing-consumers.png" alt="competing-consumers" width="1532" height="308" class="alignnone size-full wp-image-437" />

We should be able to scale further by adding more competing Logic Apps.
<h1>Summary</h1>
Here’s the result summary of various runs.

<img src="https://msdnshared.blob.core.windows.net/media/2017/04/Results-summary.png" alt="results-summary" width="774" height="193" class="alignnone size-full wp-image-445" />]]></content:encoded>
    </item>
    <item>
      <title>Get started with the Azure Event Hubs connector</title>
      <link>https://docs.microsoft.com/archive/blogs/vinaysin/get-started-with-the-azure-event-hubs-connector</link>
      <pubDate>Sat, 25 Mar 2017 21:38:55 GMT</pubDate>
      <dc:creator><![CDATA[Vinay Singh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vinaysin/?p=325</guid>
      <description><![CDATA[Connect to Azure Event Hubs to send and receive events. You can perform operations such as send an...]]></description>
      <content:encoded><![CDATA[<p class="lf-text-block" style="background: white"><span style="font-family: 'Segoe UI',sans-serif;color: #222222">Connect to Azure Event Hubs to send and receive events. You can perform operations such as send an event to an Event Hub and receive events from an Event Hub.</span></p>
<p class="lf-text-block" style="background: white;text-align: start"><span style="font-family: 'Segoe UI',sans-serif;color: #222222">To use<span class="apple-converted-space"> </span><a href="https://docs.microsoft.com/en-us/azure/connectors/apis-list"><span style="color: #007bb8;text-decoration: none">any connector</span></a>, you first need to create a logic app. You can get started by<span class="apple-converted-space"> </span><a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-create-a-logic-app"><span style="color: #007bb8;text-decoration: none">creating a logic app now</span></a>.</span></p>

<h2 style="background: white;margin: 24.0pt 0in 9.0pt 0in"><b><span style="font-family: 'Segoe UI',sans-serif;color: #222222">Connect to Event Bus</span></b><span style="font-family: 'Segoe UI',sans-serif;color: #222222"></span></h2>
<p class="lf-text-block" style="background: white;text-align: start"><span style="font-family: 'Segoe UI',sans-serif;color: #222222">Before your logic app can access any service, you first need to create a connection to the service. A<span class="apple-converted-space"> </span><a href="https://docs.microsoft.com/en-us/azure/connectors/connectors-overview"><span style="color: #007bb8;text-decoration: none">connection</span></a><span class="apple-converted-space"> </span>provides connectivity between a logic app and another service.</span></p>

<h3><strong>Prerequisites</strong></h3>
You must have an<span> </span><a href="https://azure.microsoft.com/en-us/services/event-hubs/">Event Hubs</a><span> </span>account.

Before you can use your Azure Event Hubs account in a logic app, you must authorize the logic app to connect to your Event Hubs account. Fortunately, you can do this easily from within your logic app on the Azure portal.

Here are the steps to authorize your logic app to connect to your Event Hubs account:
<ol>
 	<li>To create a connection to Event Hubs, in the logic app designer, select <span></span><strong>Show Microsoft managed APIs</strong><span> in the drop-down list. Then enter </span><strong>event hubs</strong><span> </span>in the search box. Select the trigger or action you want to use.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_Trigger_search.png" alt="event_hubs_trigger_search" width="479" height="414" class="alignnone size-full wp-image-335" /></li>
 	<li>If you haven't created any connections to Event Hubs before, you'll be prompted to provide your Event Hubs credentials. These credentials are used to authorize your logic app to connect to and access your Event Hubs’ data. The Event Hubs connector needs the connection string for the Event Hubs namespace. It also requires <span></span><strong>Manage</strong><span> permissions. A good way to know if your connection string is for the namespace or a specific entity is if it contains the<span> </span></span>EntityPath<span> parameter. If it does, it is not the right connection string for a logic app.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_namespace.png" alt="event_hubs_namespace" width="1915" height="911" class="alignnone size-full wp-image-337" /></span></li>
 	<li>After you have received the connection string for the namespace, you can use it for the API connection in Logic Apps.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_connection.png" alt="event_hubs_connection" width="538" height="294" class="alignnone size-full wp-image-346" /></li>
 	<li>Notice the connection has been created, and you are now free to proceed with the other steps in your logic app.</li>
 	<li><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_Trigger.png" alt="event_hubs_trigger" width="537" height="542" class="alignnone size-full wp-image-355" />
<h2><strong>Use an Event Hubs trigger</strong></h2>
A trigger is an event that can be used to start the workflow defined in a logic app.<span> </span><a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-what-are-logic-apps#logic-app-concepts">Learn more about triggers</a>.

Here's how to use the<span> </span><strong>Event Hubs - When events are available in Event Hub</strong><span> </span>trigger to initiate a logic app workflow when new events are sent to an Event Hub.
<h5><strong>Note</strong></h5>
You will be prompted to sign in with your Event Hubs connection string if you have not already created a connection to Event Hubs.
<ol>
 	<li>In the search box on the logic apps designer, enter <span></span><strong>event hubs</strong>. Then select the<span> </span><strong>Event Hubs - When events are available in an Event Hub</strong><span> <img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_Trigger_search.png" alt="event_hubs_trigger_search" width="479" height="414" class="alignnone size-full wp-image-335" /></span></li>
 	<li>The <span></span><strong>When an event in available in an Event Hub</strong><span> </span>dialog box is displayed.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_Trigger_3.png" alt="event_hubs_trigger_3" width="538" height="481" class="alignnone size-full wp-image-365" /></li>
 	<li>Enter the name of the Event Hub you would like the trigger to monitor. Optionally, you can also select a consumer group.</li>
 	<li><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_Trigger_2.png" alt="event_hubs_trigger_2" width="538" height="459" class="alignnone size-full wp-image-367" /></li>
</ol>
At this point, your logic app has been configured with a trigger. When new events are available in the Event Hub you selected, the trigger will begin a run of the other triggers and actions in the workflow.
<h2><strong>Use an Event Hubs action</strong></h2>
An action is an operation carried out by the workflow defined in a logic app.<span> </span><a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-what-are-logic-apps#logic-app-concepts">Learn more about actions</a>.

Now that you have added a trigger, it's time to do something interesting with the data that's generated by the trigger. Follow these steps to add the<span> </span><strong>Event Hubs - Send event</strong><span> </span>action. This action sends an event to an Event Hub.

Follow these steps to create the send event action:
<ol>
 	<li>Select<span></span><strong>+ New step</strong><span> </span>to add the action.</li>
 	<li>Select <span></span><strong>Add an action</strong>. This opens a search box, where you can search for any action you would like to take. For this example, Event Hubs’ actions are of interest.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/NextAction.png" alt="nextaction" width="353" height="129" class="alignnone size-full wp-image-375" /></li>
 	<li>Enter <em>event hubs</em>.</li>
 	<li>Select <span></span><strong>Event Hubs - Send event</strong><span> </span>as the action to take<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Event_Hubs_actions_search.png" alt="event_hubs_actions_search" width="537" height="394" class="alignnone size-full wp-image-385" /></li>
 	<li>Enter the content for the event. This is required.</li>
 	<li>Enter the event hub name to which the event will be sent. This is also required.</li>
 	<li>Provide other details about the event. This is optional.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/Send_Event.png" alt="send_event" width="537" height="414" class="alignnone size-full wp-image-395" /></li>
 	<li>Save the changes to your workflow.<img src="https://msdnshared.blob.core.windows.net/media/2017/03/SaveLogicApp.png" alt="savelogicapp" width="564" height="96" class="alignnone size-full wp-image-405" /></li>
</ol>
</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Consuming Azure Stream Analytics output in Azure Logic Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/vinaysin/consuming-azure-stream-analytics-output-in-azure-logic-apps</link>
      <pubDate>Tue, 17 Jan 2017 13:33:59 GMT</pubDate>
      <dc:creator><![CDATA[Vinay Singh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vinaysin/?p=35</guid>
      <description><![CDATA[Stream Analytics
Azure Stream Analytics lets users perform real-time analytics for their Internet...]]></description>
      <content:encoded><![CDATA[<h1>Stream Analytics</h1>
Azure Stream Analytics lets users perform real-time analytics for their Internet of Things (IoT) solutions. In this article, we will use Event Hubs as a source and Service Bus Queue as a destination for Stream Analytics. Azure Event Hubs is a hyper-scale telemetry ingestion service that can store millions of events. And, Azure Service Bus is a highly-reliable cloud messaging service with Queues offering a First In, First Out (FIFO) message delivery to competing consumers.
<h2>Event Hubs (source)</h2>
Create an Event Hubs namespace in Azure Portal.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Create_EventHubs.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Create_EventHubs.bmp" alt="create_eventhubs" width="279" height="363" class="alignnone size-full wp-image-185" /></a>

Then add a new Event Hub into the namespace.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Create_EventHub.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Create_EventHub.bmp" alt="create_eventhub" width="286" height="459" class="alignnone size-full wp-image-195" /></a>
<h2>Service Bus Queue (destination)</h2>
Create a Service Bus namespace in Azure Portal.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Create_SBNamespace.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Create_SBNamespace.bmp" alt="create_sbnamespace" width="284" height="346" class="alignnone size-full wp-image-205" /></a>

Then add a new queue into the namespace.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Create_SBQueue1.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Create_SBQueue1.bmp" alt="create_sbqueue" width="286" height="414" class="alignnone size-full wp-image-225" /></a>
<h2>Stream Analytics job</h2>
Create a new Azure Stream Analytics job that processes messages coming through Event Hub and stores the output into Service Bus queue. For this post, we are using a pass-through Stream Analytics.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Create_StreamAnalyticsJob.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Create_StreamAnalyticsJob.bmp" alt="create_streamanalyticsjob" width="832" height="207" class="alignnone size-full wp-image-235" /></a>
<h1>Service Bus Queue Reader Logic App</h1>
The Service Bus Queue Reader Logic App reads a message from a Service Bus queue, uses Azure Functions to remove special characters that get added by Azure Stream Analytics and then sends it to a child Logic App for processing the message. Click <a target="_blank" href="https://msdnshared.blob.core.windows.net/media/2017/01/ServiceBusQueueReader.txt">here</a> to download complete Logic App definition.
<h3>Service Bus Queue Trigger</h3>
Add a new Service Bus queue trigger to read messages from a Service Bus queue and trigger the Logic App.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/ServiceBus_Receive_Trigger.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/ServiceBus_Receive_Trigger.bmp" alt="servicebus_receive_trigger" width="427" height="295" class="alignnone size-full wp-image-255" /></a>
<h3>Special characters handling using Azure Functions</h3>
Azure Stream Analytics adds certain special (Unicode) characters in output messages which cause failures in Logic Apps when trying to decode them (e.g. to JSON format). As a result, we need to pre-process the message using Azure Functions and remove those special characters before going ahead with regular message processing in Logic Apps.

Create a new C# Webhook Function App (let’s call it <em>ParseStreamAnalyticsJSONContent</em>) in Azure Portal and insert below code snippet into it. Create the Function App in same region as Logic Apps for being callable from Logic Apps. It is recommended to create it in same Resource Group as Logic Apps. Click <a target="_blank" href="https://msdnshared.blob.core.windows.net/media/2017/01/ParseStreamAnalyticsJSONContent.txt">here</a> to download the source code.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/AzureFunctions.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/AzureFunctions.bmp" alt="azurefunctions" width="704" height="386" class="alignnone size-full wp-image-165" /></a>

Then add a Function App action in Logic Apps and choose <em>ParseStreamAnalyticsJSONContent</em> function app that was created in previous step.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/ParseJSON_FunctionApp_Action.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/ParseJSON_FunctionApp_Action.bmp" alt="parsejson_functionapp_action" width="426" height="192" class="alignnone size-full wp-image-245" /></a>
<h3>Call Message Processor child Logic App</h3>
Call the Message Processor child Logic App that has logic for processing these messages, details of which are covered in next section.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Call_ChildWorkflow_Action.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Call_ChildWorkflow_Action.bmp" alt="call_childworkflow_action" width="427" height="230" class="alignnone size-full wp-image-175" /></a>
<h1>Message Processor Logic App</h1>
The Message Processor Logic App takes an event data in JSON format and send an e-mail using Office 365 Connector. Click <a target="_blank" href="https://msdnshared.blob.core.windows.net/media/2017/01/MessageProcessor.txt">here</a> to download complete Logic App definition.
<h3>Request Trigger</h3>
Create a request trigger and provide it JSON schema for incoming message. JSON schema helps tokenize message properties which come handy in subsequent steps.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Request_trigger.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Request_trigger.bmp" alt="request_trigger" width="426" height="312" class="alignnone size-full wp-image-265" /></a>
<h3>Office365 Send Email</h3>
Send an email using Office 365 Connector. You can use message properties coming from the request trigger to craft the email template (subject, body etc.).

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Send_Office365_Email.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Send_Office365_Email.bmp" alt="send_office365_email" width="373" height="446" class="alignnone size-full wp-image-275" /></a>
<h3>Response action</h3>
Add a response action to complete this Logic App. Having a Response action is a MUST to be able to call this Logic App from another Logic App.

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/Response_Action.bmp"><img src="https://msdnshared.blob.core.windows.net/media/2017/01/Response_Action.bmp" alt="response_action" width="425" height="295" class="alignnone size-full wp-image-285" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Hello world!</title>
      <link>https://docs.microsoft.com/archive/blogs/vinaysin/hello-world</link>
      <pubDate>Sun, 28 Aug 2016 02:23:37 GMT</pubDate>
      <dc:creator><![CDATA[Vinay Singh [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vinaysin/?p=1</guid>
      <description><![CDATA[Welcome to Developer Network. This is your first post. Edit or delete it, then start blogging!]]></description>
      <content:encoded><![CDATA[Welcome to <a href="https://blogs.msdn.microsoft.com/">Developer Network</a>. This is your first post. Edit or delete it, then start blogging!]]></content:encoded>
    </item>
  </channel>
</rss>