<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarathkumar S on Medium]]></title>
        <description><![CDATA[Stories by Sarathkumar S on Medium]]></description>
        <link>https://medium.com/@sarathkumar1201?source=rss-5921c8e6661d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GeGXnQ2_OhL4506y</url>
            <title>Stories by Sarathkumar S on Medium</title>
            <link>https://medium.com/@sarathkumar1201?source=rss-5921c8e6661d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:20:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarathkumar1201/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Build a Stock Price Monitor with Azure Functions and Logic Apps (Email Alerts Included!)]]></title>
            <link>https://medium.com/@sarathkumar1201/build-a-stock-price-monitor-with-azure-functions-and-logic-apps-email-alerts-included-1ddb15e0b67f?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ddb15e0b67f</guid>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[stock-market-automation]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Fri, 11 Jul 2025 06:56:59 GMT</pubDate>
            <atom:updated>2025-07-11T06:56:59.342Z</atom:updated>
            <content:encoded><![CDATA[<p>Want to automatically monitor stock prices and get alerted when they drop below your target? In this post, I’ll show you how to build a <strong>serverless stock price monitoring system</strong> using <strong>Azure Functions</strong>, <strong>Financial Modeling Prep API</strong>, and <strong>Logic Apps for email alerts</strong> — all in JavaScript.</p><p>Let’s dive in! 🏊‍♂️</p><h3>🧠 The Goal</h3><p>Here’s what we’re building:</p><p>✅ Azure Function runs <strong>every hour</strong><br> ✅ Calls a <strong>stock price API</strong> (e.g., Apple stock)<br> ✅ Checks if the price drops below a defined threshold<br> ✅ Sends an <strong>email alert</strong> via Logic App</p><h3>🛠️ Step 1: Create the Azure Function App</h3><ol><li>In the <a href="https://portal.azure.com/">Azure Portal</a>, search for <strong>“Function App”</strong> and click <strong>+ Create</strong>.</li><li>Fill out the basics:</li></ol><ul><li><strong>Subscription</strong>: Your active subscription</li><li><strong>Resource Group</strong>: Create or reuse one (e.g., StockMonitorRG)</li><li><strong>Function App name</strong>: stock-monitor-func</li><li><strong>Runtime stack</strong>: <strong>Node.js</strong></li><li><strong>Version</strong>: Latest LTS (e.g., Node.js 18)</li><li><strong>Region</strong>: Choose a location near you</li></ul><p>3. Under <strong>Hosting</strong>:</p><ul><li><strong>Plan type</strong>: Consumption (serverless)</li><li><strong>Storage account</strong>: Auto-create or reuse an existing one</li></ul><p>4. Hit <strong>Review + Create</strong>, then <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*8lKRtN2XooNepQN44js_pw.png" /></figure><h3>⏲️ Step 2: Add a Timer-Triggered Function</h3><p>Once the Function App is created:</p><ol><li>Go to your Function App → <strong>Functions</strong> → Click <strong>+ Add</strong></li><li>Choose:</li></ol><ul><li><strong>Development Environment</strong>: “Develop in portal”</li><li><strong>Template</strong>: Timer Trigger</li><li><strong>Function name</strong>: CheckStockPrice</li><li><strong>Schedule</strong>: 0 0 * * * * (Runs every hour)</li></ul><blockquote><em>This is cron syntax: </em><em>second minute hour day month day-of-week</em></blockquote><p>Click <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*m3_fg2iRc8pmLjH59CDQFg.png" /></figure><h3>📡 Step 3: Call the Stock API</h3><p>We’ll use the <a href="https://financialmodelingprep.com/developer/docs">Financial Modeling Prep API</a> for real-time stock prices.</p><h3>🔑 Get a Free API Key</h3><p>Sign up and grab your free key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riYJF_dukveqLl-1kLRXvA.png" /></figure><h3>✍️ Replace the Function Code with:</h3><pre>const https = require(&#39;https&#39;);<br>module.exports = async function (context, myTimer) {<br>    const timeStamp = new Date().toISOString();<br>    const symbol = &#39;AAPL&#39;;<br>    const apiKey = &#39;YOUR_API_KEY&#39;; // Replace with your real key<br>    const url = `https://financialmodelingprep.com/api/v3/quote-short/${symbol}?apikey=${apiKey}`;<br>    context.log(`[${timeStamp}] Fetching stock price for ${symbol}...`);<br>    await new Promise((resolve, reject) =&gt; {<br>        https.get(url, (res) =&gt; {<br>            let data = &#39;&#39;;<br>            res.on(&#39;data&#39;, (chunk) =&gt; data += chunk);<br>            res.on(&#39;end&#39;, () =&gt; {<br>                try {<br>                    const result = JSON.parse(data);<br>                    const price = result[0]?.price;<br>                    context.log(`📈 ${symbol} price: $${price}`);<br>                    const threshold = 150;<br>                    if (price &lt; threshold) {<br>                        context.log(`🚨 ALERT: ${symbol} dropped below $${threshold}. Current: $${price}`);<br>                        // Email logic will go here<br>                    }<br>                    resolve();<br>                } catch (err) {<br>                    context.log.error(&#39;❌ Error parsing response:&#39;, err.message);<br>                    reject(err);<br>                }<br>            });<br>        }).on(&#39;error&#39;, (err) =&gt; {<br>            context.log.error(&#39;❌ HTTPS request failed:&#39;, err.message);<br>            reject(err);<br>        });<br>    });<br>};</pre><p>Click <strong>Save</strong>.</p><h3>🧪 Step 4: Monitor the Logs</h3><p>Go to your function → <strong>Monitor</strong> tab. Click <strong>Test/Run</strong>, or wait for the next hour.</p><p>You should see logs like:</p><pre>[2025-06-24T10:00:00Z] 📈 AAPL price: $143.21  <br>🚨 ALERT: AAPL dropped below $150. Current: $143.21</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KzNe8z_sPHIUnvsum2i-uQ.png" /></figure><h3>📧 Step 5: Add Email Alerts with Logic App</h3><p>Now, let’s notify ourselves by email when the price drops!</p><h3>1️⃣ Create a Logic App</h3><ul><li>Azure Portal → search <strong>Logic Apps</strong> → Click <strong>+ Create</strong></li><li>Name: SendStockAlertLogic</li><li>Region: Same as your Function App</li><li>Plan type: <strong>Consumption</strong></li><li>Click <strong>Create</strong></li></ul><h3>2️⃣ Build the Logic App Workflow</h3><p>In the Logic App Designer:</p><ol><li>Choose trigger: <strong>When an HTTP request is received</strong></li><li>Click <strong>+ New Step</strong></li><li>Search <strong>“Email”</strong> → Choose:</li></ol><ul><li>Outlook → <strong>Send an email (V2)</strong></li><li>Or Gmail → Sign in to your account</li></ul><p>4. Configure:</p><ul><li><strong>To</strong>: your email address</li><li><strong>Subject</strong>: Stock Alert: @{triggerBody().symbol}</li><li><strong>Body</strong>:</li></ul><pre>ALERT: @{triggerBody().symbol} has dropped below $@{triggerBody().threshold}   Current Price: $@{triggerBody().price}   Time: @{triggerBody().timestamp}</pre><p>5. Click <strong>Save</strong> → Copy the HTTP POST URL shown</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsk7d0vTk1eL9Bg2MK5y9g.png" /></figure><h3>3️⃣ Update the Azure Function to Trigger the Logic App</h3><p>Back in your CheckStockPrice function, update the alert block like this:</p><pre>if (price &lt; threshold) {<br>    context.log(`🚨 ALERT: ${symbol} dropped below $${threshold}. Current: $${price}`);<br>    const postData = JSON.stringify({<br>        symbol,<br>        price,<br>        threshold,<br>        timestamp: new Date().toISOString()<br>    });<br>    const req = https.request(&#39;YOUR_LOGIC_APP_HTTP_POST_URL&#39;, {<br>        method: &#39;POST&#39;,<br>        headers: {<br>            &#39;Content-Type&#39;: &#39;application/json&#39;,<br>            &#39;Content-Length&#39;: postData.length<br>        }<br>    }, res =&gt; {<br>        res.on(&#39;data&#39;, () =&gt; {});<br>    });<br>    req.on(&#39;error&#39;, (err) =&gt; {<br>        context.log.error(&#39;Email alert failed:&#39;, err.message);<br>    });<br>    req.write(postData);<br>    req.end();<br>}</pre><p>✅ Replace YOUR_LOGIC_APP_HTTP_POST_URL with the URL you copied from Logic App.</p><h3>🎉 Test It!</h3><ul><li>Hit <strong>Test/Run</strong> on your Azure Function</li><li>If the stock price is below your target, you should get an email like:</li></ul><pre>Subject: Stock Alert: AAPL<br>ALERT: AAPL has dropped below $150  <br>Current Price: $143.50  <br>Time: 2025-07-11T09:00:00Z</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2IIRzdQ6OgqmuDKojyT1w.png" /></figure><h3>🏁 Final Thoughts</h3><p>You’ve just built a fully automated <strong>stock price monitoring and alerting system</strong> using:</p><p>✅ Azure Functions (for serverless logic)<br> ✅ Financial Modeling Prep API (for real-time data)<br> ✅ Logic Apps (for email integration)</p><p>Perfect for tracking your investments or experimenting with real-world serverless applications.</p><p>Happy coding and investing! 📈🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ddb15e0b67f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Build an End-to-End E-Commerce Order Processing System on Azure]]></title>
            <link>https://medium.com/@sarathkumar1201/build-an-end-to-end-e-commerce-order-processing-system-on-azure-df4095befcc4?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/df4095befcc4</guid>
            <category><![CDATA[integration-architecture]]></category>
            <category><![CDATA[e-commerce-development]]></category>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 06:31:40 GMT</pubDate>
            <atom:updated>2025-07-04T06:31:40.125Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By Sarath Kumar S</strong><br> 📅 <em>July 2025</em></p><h3>✨ Goal</h3><p>In this post, we’ll walk through building a <strong>complete, automated e-commerce order intake and processing pipeline</strong> using Microsoft Azure.</p><p>From receiving orders via an API to inserting them into a database, triggering events via Service Bus, and sending email alerts — this project covers a real-world, production-grade integration pattern.</p><h3>🛠️ Tech Stack</h3><ul><li><strong>Azure Logic Apps (Standard &amp; Consumption)</strong></li><li><strong>Azure SQL Database</strong></li><li><strong>Azure Service Bus</strong></li><li><strong>Postman</strong> (or any HTTP client)</li><li><strong>Outlook 365 / SMTP for Emails</strong></li></ul><h3>📦 What We’re Building</h3><p>Here’s the flow of our <strong>Minimum Viable Product (MVP):</strong></p><ol><li>Receive customer orders via HTTP POST</li><li>Validate and store the data in Azure SQL</li><li>Publish a message to Azure Service Bus</li><li>Send email alert if the order amount is high (&gt; ₹10,000)</li><li>Another Logic App picks up the event and sends a confirmation email</li></ol><p>Let’s dive in 👇</p><h3>🔹 Phase 1: Create the SQL Database</h3><p>Start by creating the database and table to store incoming orders.</p><pre>CREATE TABLE Orders (<br>    OrderID UNIQUEIDENTIFIER PRIMARY KEY,<br>    CustomerName NVARCHAR(100),<br>    Email NVARCHAR(100),<br>    Product NVARCHAR(100),<br>    Quantity INT,<br>    Amount FLOAT,<br>    OrderDate DATETIME<br>);</pre><blockquote><em>✅ </em>Tip: You can use Azure SQL or SQL Server hosted elsewhere.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOy50nHkYCBwofS2RrrJ4g.png" /></figure><h3>🔹 Phase 2: Create the Order Receiver Logic App</h3><p>We’ll now create a <strong>Logic App (Standard)</strong> that will receive orders via HTTP and insert them into SQL.</p><h3>Step 1: Create Logic App</h3><ul><li>Name: OrderReceiverApp</li><li>Open the <strong>Workflow Designer</strong></li></ul><h3>Step 2: Add HTTP Trigger</h3><p>Choose trigger: When an HTTP request is received</p><p>Paste this sample payload to auto-generate schema:</p><pre>{<br>  &quot;CustomerName&quot;: &quot;Alice Kumar&quot;,<br>  &quot;Email&quot;: &quot;alice@example.com&quot;,<br>  &quot;Product&quot;: &quot;Laptop&quot;,<br>  &quot;Quantity&quot;: 1,<br>  &quot;Amount&quot;: 65000,<br>  &quot;OrderDate&quot;: &quot;2025-06-24T10:00:00&quot;<br>}</pre><h3>Step 3: Insert into SQL</h3><ul><li>Action: Insert row (V2) → Select your SQL connection</li><li>Table: dbo.Orders</li><li>Map values:</li><li><strong>OrderID</strong>: @{guid()}</li><li>Others: Map directly from HTTP trigger</li></ul><h3>🔹 Phase 3: Test the Order Receiver</h3><p>Use Postman or similar tool:</p><ul><li><strong>Method</strong>: POST</li><li><strong>URL</strong>: (Paste Logic App’s HTTP POST URL)</li><li><strong>Body</strong>:</li></ul><pre>{<br>  &quot;CustomerName&quot;: &quot;Sarath Kumar&quot;,<br>  &quot;Email&quot;: &quot;sarath@gmail.com&quot;,<br>  &quot;Product&quot;: &quot;Laptop&quot;,<br>  &quot;Quantity&quot;: 1,<br>  &quot;Amount&quot;: 65000,<br>  &quot;OrderDate&quot;: &quot;2025-07-01T10:00:00&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLyWtgK8A31cjho4pDdDIA.png" /></figure><p>✅ <em>Check that a new row is inserted into SQL.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4qk2DqG1lYjqpUnHRlbs0w.png" /></figure><h3>🔹 Phase 4: Add Azure Service Bus Notification</h3><p>Now let’s notify other systems (e.g., shipping or analytics) using <strong>Azure Service Bus</strong>.</p><h3>Step 1: Create Service Bus Queue</h3><ul><li>Go to Service Bus → Create Namespace</li><li>Create Queue: order-events</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y7DYAKE6gHtw-LdsFbheHQ.png" /></figure><h3>Step 2: Get Connection String</h3><ul><li>Go to: <strong>Shared Access Policies</strong></li><li>Select: RootManageSharedAccessKey</li><li>Copy the <strong>primary connection string</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*1Lkrq1ZmG5IRoFer2MwEjw.png" /></figure><h3>Step 3: Add Logic App Step to Send Message</h3><ul><li>Action: Send message (Service Bus)</li><li>Queue: order-events</li><li>Message content:</li></ul><pre>{<br>  &quot;OrderID&quot;: &quot;@{guid()}&quot;,<br>  &quot;Customer&quot;: &quot;@{triggerBody()?[&#39;CustomerName&#39;]}&quot;,<br>  &quot;Product&quot;: &quot;@{triggerBody()?[&#39;Product&#39;]}&quot;,<br>  &quot;Amount&quot;: &quot;@{triggerBody()?[&#39;Amount&#39;]}&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPl6_UAziF0MpzMKBeeMqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*2m2jG056QWurmYx3qjANZg.png" /></figure><h3>🔹 Phase 5: Alert on High-Value Orders</h3><p>Let’s add an email alert for high-value orders (&gt; ₹10,000).</p><h3>Step 1: Add Condition</h3><ul><li>Action: Condition</li><li>Configure:</li><li>Left: @triggerBody()?[&#39;Amount&#39;]</li><li>Operator: is greater than</li><li>Right: 10000</li></ul><h3>Step 2: Inside “If true”, Send Email</h3><ul><li>Action: Send email (V2) (Outlook 365 or SMTP)</li><li>To: your email</li><li>Subject: High-Value Order Alert</li><li>Body:</li></ul><pre>&lt;p&gt;&lt;strong&gt;Customer:&lt;/strong&gt; @{triggerBody()?[&#39;CustomerName&#39;]}&lt;/p&gt;<br>&lt;p&gt;&lt;strong&gt;Product:&lt;/strong&gt; @{triggerBody()?[&#39;Product&#39;]}&lt;/p&gt;<br>&lt;p&gt;&lt;strong&gt;Amount:&lt;/strong&gt; ₹@{triggerBody()?[&#39;Amount&#39;]}&lt;/p&gt;<br>&lt;p&gt;&lt;strong&gt;Email:&lt;/strong&gt; @{triggerBody()?[&#39;Email&#39;]}&lt;/p&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOiEtzsge9tnZ41Vwu9R0Q.png" /></figure><p>✅ <em>Test with an order &gt; ₹10,000 to receive an alert.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c5xGkfqPe61jr0Dli9H89g.png" /></figure><h3>🔹 Phase 6: Create Order Processor Logic App (Consumption)</h3><p>Now, let’s simulate a <strong>downstream processor</strong> that handles Service Bus events.</p><h3>Step 1: Create New Logic App</h3><ul><li>Name: OrderEventProcessor</li><li>Type: <strong>Consumption</strong></li></ul><h3>Step 2: Trigger on Service Bus Message</h3><ul><li>Trigger: When a message is received in a queue (peek-lock)</li><li>Connect using same connection string</li><li>Queue: order-events</li></ul><h3>Step 3: Decode and Parse the Message</h3><ol><li>Add Action: Compose<br>• Expression: base64ToString(triggerBody()?[&#39;ContentData&#39;])</li><li>Add Action: Parse JSON</li></ol><ul><li>Content: Outputs from Compose</li><li>Sample schema:</li></ul><pre>{<br>  &quot;OrderID&quot;: &quot;12345-abc&quot;,<br>  &quot;Customer&quot;: &quot;Alice Kumar&quot;,<br>  &quot;Product&quot;: &quot;Laptop&quot;,<br>  &quot;Amount&quot;: &quot;65000&quot;<br>}</pre><h3>Step 4: Send Email Notification</h3><ul><li>Action: Send email (V2)</li><li>Subject: Order Received: @{body(&#39;Parse_JSON&#39;)?[&#39;OrderID&#39;]}</li><li>Body:</li></ul><pre>Customer: @{body(&#39;Parse_JSON&#39;)?[&#39;Customer&#39;]}<br>Product: @{body(&#39;Parse_JSON&#39;)?[&#39;Product&#39;]}<br>Amount: ₹@{body(&#39;Parse_JSON&#39;)?[&#39;Amount&#39;]}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tK39qGls-3wCPM1o5hDHBg.png" /></figure><h3>✅ Final Test: End-to-End Flow</h3><p>Submit an order via Postman.</p><p>Check that:</p><ul><li>Order is inserted into SQL</li><li>A message is sent to Service Bus</li><li>If high-value, an alert email is sent</li><li>Second Logic App processes the event and emails confirmation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AXwExhgKTWIyADB0eV-3-Q.png" /></figure><h3>🎉 You’re Done!</h3><p>You’ve now built a full <strong>end-to-end order processing system</strong> using Azure serverless services:</p><ul><li>⚡ HTTP API via Logic Apps</li><li>🗄️ Azure SQL for data storage</li><li>📩 Azure Service Bus for messaging</li><li>📧 Email alerts for business logic</li><li>🔁 Event-driven downstream processing</li></ul><h3>📚 Next Steps</h3><ul><li>Add authentication to the API</li><li>Integrate with Inventory/Shipping systems</li><li>Add logging and monitoring via Azure Monitor</li><li>Secure SQL and Service Bus using Managed Identity</li></ul><p>If you found this helpful, leave a clap 👏 or comment below!</p><p><strong>Follow me</strong> for more Azure and automation tutorials.</p><p>#azure #logicapps #serverless #integration #automation #ecommerce</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df4095befcc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Automating IT Support: Building an Intelligent Ticketing System with Azure]]></title>
            <link>https://medium.com/@sarathkumar1201/automating-it-support-building-an-intelligent-ticketing-system-with-azure-9c0012aa1cd6?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c0012aa1cd6</guid>
            <category><![CDATA[cloud-workflow]]></category>
            <category><![CDATA[azure-automation]]></category>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[support-ticket-system]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 06:32:52 GMT</pubDate>
            <atom:updated>2025-07-03T06:32:52.180Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By Sarath Kumar S</em></p><p>Modern support systems need more than email inboxes and spreadsheets. In this capstone project, I walk you through building a smart, cloud-native <strong>Support Ticketing System</strong> using <strong>Azure services</strong> like Blob Storage, Logic Apps, Form Recognizer, SQL Database, Service Bus, and Power BI (optional). This project automates the ticket intake process from form uploads to structured data processing and visualization.</p><p>Let’s dive into building an <strong>Intelligent Support Ticketing System</strong> — step by step.</p><h3>🧠 What Are We Building?</h3><p>We’re creating an automated pipeline that:</p><ol><li>Accepts support tickets in <strong>JSON or PDF</strong> format.</li><li>Extracts key data like name, email, and issue description.</li><li>Stores structured ticket info in a database.</li><li>Sends a message to a backend queue for action.</li><li>(Optionally) Visualizes ticket stats in <strong>Power BI</strong>.</li></ol><p>This is what our architecture looks like:</p><pre>User Uploads Ticket (JSON/PDF)<br>          ↓<br>Azure Blob Storage<br>          ↓<br>Logic App (Triggered by Upload)<br>          ↓<br>Form Recognizer (if PDF/Image)<br>          ↓<br>Azure SQL or Cosmos DB<br>          ↓<br>Service Bus Queue<br>          ↓<br>Power BI Dashboard (optional)</pre><h3>🗂️ Step 1: Set Up Azure Blob Storage</h3><p>First, we need a secure place for our incoming support tickets.</p><h3>🔧 1.1 Create Blob Storage Container</h3><ol><li>In the <a href="https://portal.azure.com/">Azure Portal</a>, go to <strong>Storage Accounts</strong>.</li><li>Create a new storage account or use an existing one.</li><li>Inside your storage account:</li></ol><ul><li>Click <strong>Containers</strong>.</li><li>Select <strong>+ Container</strong>.</li><li>Name it: ticketuploads</li><li>Access level: Private</li><li>Click <strong>Create</strong></li></ul><h3>📄 1.2 Upload a Sample Ticket File</h3><h4>🟢 Option A: JSON Format (Easy to Parse)</h4><p>Create a file ticket1.json with this content:</p><pre>{<br>  &quot;CustomerName&quot;: &quot;John Doe&quot;,<br>  &quot;Email&quot;: &quot;john@example.com&quot;,<br>  &quot;IssueDescription&quot;: &quot;Unable to login to account.&quot;,<br>  &quot;Priority&quot;: &quot;High&quot;,<br>  &quot;SubmittedDate&quot;: &quot;2025-06-24&quot;<br>}</pre><p>Upload it to the ticketuploads container.</p><h4>🟡 Option B (Later): PDF/Image Form</h4><p>We’ll use Azure’s <strong>Form Recognizer</strong> to extract fields from PDFs or images later.</p><h3>🔁 Step 2: Create a Logic App to Trigger on Upload</h3><p>Now it’s time to automate.</p><h3>🧩 2.1 Create a Logic App (Standard)</h3><ol><li>In Azure Portal → Search for <strong>Logic Apps</strong></li><li>Click <strong>+ Create</strong></li><li>Fill in the details:</li></ol><ul><li><strong>Resource Group</strong>: TicketingSystemRG</li><li><strong>Name</strong>: TicketProcessorApp</li><li><strong>Region</strong>: Same as your storage</li><li><strong>Plan Type</strong>: Standard</li><li><strong>Hosting Plan</strong>: Create new → Name it TicketLogicPlan</li><li><strong>SKU</strong>: Workflow Standard or S1</li></ul><h3>🔀 2.2 Add a Workflow to the Logic App</h3><ol><li>Go to your Logic App resource</li><li>Click <strong>Workflows</strong> → <strong>+ Add Workflow</strong></li></ol><ul><li>Name: ProcessTicketWorkflow</li><li>Type: <strong>Stateful</strong></li></ul><h3>🔧 2.3 Design the Workflow</h3><h4>🔹 A. Blob Trigger</h4><ul><li>Add a <strong>Trigger</strong>: “When a blob is added or modified (properties only)”</li><li>Connect using <strong>Managed Identity</strong></li><li>Select:</li><li>Your subscription</li><li>Your storage account</li><li>Container: ticketuploads</li></ul><h4>🔹 B. Get Blob Content</h4><ul><li>Add new step: <strong>Get Blob Content</strong></li><li>Use the dynamic Path from the trigger</li></ul><h4>🔹 C. Parse JSON</h4><ul><li>Add step: <strong>Parse JSON</strong></li><li>Content: use Content from previous step</li><li>Click <strong>Generate from sample</strong> → Paste:</li></ul><pre>{<br>  &quot;CustomerName&quot;: &quot;John Doe&quot;,<br>  &quot;Email&quot;: &quot;john@example.com&quot;,<br>  &quot;IssueDescription&quot;: &quot;Unable to login to account.&quot;,<br>  &quot;Priority&quot;: &quot;High&quot;,<br>  &quot;SubmittedDate&quot;: &quot;2025-06-24&quot;<br>}</pre><h4>🔹 D. Compose (Temporary Step for Testing)</h4><ul><li>Add step: <strong>Compose</strong></li><li>Inputs:</li></ul><pre>{<br>  &quot;Customer&quot;: &quot;@{outputs(&#39;Parse_JSON&#39;)?[&#39;CustomerName&#39;]}&quot;,<br>  &quot;Issue&quot;: &quot;@{outputs(&#39;Parse_JSON&#39;)?[&#39;IssueDescription&#39;]}&quot;<br>}</pre><h3>✅ 2.4 Save and Test the Workflow</h3><ul><li>Click <strong>Save</strong></li><li>Upload a new JSON file to your ticketuploads container (change a value or two)</li><li>Go to your Logic App → Check <strong>Run History</strong></li><li>View the latest run → See if the <strong>Compose</strong> action shows your parsed output</li></ul><h3>🧠 Final Thoughts</h3><p>This kind of intelligent ticketing flow automates the entire support intake pipeline. With Azure’s serverless and cognitive services, it’s easy to scale and extend — from parsing PDFs with <strong>Form Recognizer</strong> to enabling real-time dashboards in <strong>Power BI</strong>.</p><p>📌 <em>Follow me for more tutorials on Azure automation, Logic Apps, and AI-driven workflows.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c0012aa1cd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating JSON Logging: Blob Storage to Cosmos DB with Azure Logic Apps]]></title>
            <link>https://medium.com/@sarathkumar1201/automating-json-logging-blob-storage-to-cosmos-db-with-azure-logic-apps-4ea19a9d0a72?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ea19a9d0a72</guid>
            <category><![CDATA[azure-logic-apps]]></category>
            <category><![CDATA[azure-cosmos-db]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[cloud-automation]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 12:31:01 GMT</pubDate>
            <atom:updated>2025-06-25T12:31:01.572Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, we’ll build a serverless pipeline that listens for new .json files in Azure Blob Storage and automatically logs their contents into a Cosmos DB container. This is a handy pattern for storing logs, telemetry, or transactional data in real-time — with zero manual intervention.</p><p>Let’s walk through how to set this up using Azure Logic Apps (Standard), Blob Storage, and Cosmos DB (SQL API).</p><h3>🚀 The Goal</h3><p>You’ll upload .json files to Blob Storage, and a Logic App will:</p><ul><li>Trigger when a file is uploaded</li><li>Read and parse the JSON</li><li>Insert it into a Cosmos DB container</li></ul><h3>🧰 Tools &amp; Technologies</h3><ul><li><strong>Blob Storage:</strong> Source for .json uploads</li><li><strong>Logic App (Standard):</strong> Orchestrates the pipeline</li><li><strong>Cosmos DB (SQL API):</strong> Destination for parsed JSON documents</li></ul><h3>Step 1: Set Up Azure Resources</h3><h3>1.1 Create a Resource Group</h3><p>In the Azure Portal:<br> → Go to <strong>“Create a resource”</strong> → <strong>Resource Group</strong><br> → Name it: JsonArchiverRG</p><h3>1.2 Set Up Blob Storage</h3><ol><li><strong>Create a Storage Account</strong><br> → Name: jsonstoragesk<br> → Region: <em>Central US</em> (or match Logic App region)<br> → Redundancy: LRS<br> → Performance: Standard</li><li><strong>Create a Blob Container</strong><br> → Name: jsoninput<br> → Public Access: <strong>Private</strong></li></ol><h3>1.3 Create Cosmos DB (SQL API)</h3><ol><li><strong>Create a NoSQL Cosmos Account</strong><br> → Name: jsoncosmostest<br> → API: <strong>Core (SQL)</strong><br> → Region: <em>Same as other resources</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*-2TxV7C45m65jc4-HhZzUw.png" /></figure><ol><li><strong>Add Database &amp; Container</strong></li></ol><ul><li>Database: JsonLogsDB</li><li>Container: Logs</li><li>Partition Key: /id</li><li>Throughput: Autoscale (default)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AxonEHAXVAIVxZKQgovsw.png" /></figure><h3>Step 2: Build the Logic App Workflow</h3><p>We’ll now create a Logic App that triggers on blob uploads, reads the file, and inserts the data into Cosmos DB.</p><h3>2.1 Create a Logic App (Standard)</h3><ol><li>Go to <strong>Create a resource</strong> → Search for <strong>Logic App (Standard)</strong></li><li>Configure:</li></ol><ul><li>Name: JsonLoggerApp</li><li>Region: Same as Blob &amp; Cosmos DB</li><li>SKU: Workflow Standard</li><li>Hosting: Use existing or create new storage account</li></ul><h3>2.2 Add a Workflow</h3><ol><li>Open your Logic App</li><li>In the left menu, go to <strong>Workflow Designer</strong></li><li>Add a new <strong>Stateful</strong> workflow:</li></ol><ul><li>Name: BlobToCosmosFlow</li></ul><h3>2.3 Trigger: When Blob is Added</h3><ol><li>Add a trigger:<br> → Search: <strong>“When a blob is added or modified (V2)”</strong></li><li>Configure:</li></ol><ul><li>Container: jsoninput</li><li>Blob path ends with: .json</li><li>Infer Content Type: Yes</li></ul><h3>2.4 Get Blob Content</h3><ol><li>Add an action: <strong>Get blob content (V2)</strong></li><li>Use the <strong>Path</strong> dynamic field from the trigger</li></ol><h3>2.5 Convert Base64 to String</h3><p>Use a <strong>Compose</strong> action:</p><pre>@string(base64ToString(body(&#39;Get_blob_content_(V2)&#39;)?[&#39;$content&#39;]))</pre><h3>2.6 Parse the JSON</h3><ol><li>Add a <strong>Parse JSON</strong> action</li><li>Content: @outputs(&#39;Compose&#39;)</li><li>Click <strong>Generate from sample</strong> and use a sample like:</li></ol><pre>{<br>  &quot;id&quot;: &quot;12345&quot;,<br>  &quot;event&quot;: &quot;LoginSuccess&quot;,<br>  &quot;timestamp&quot;: &quot;2025-06-22T18:35:00Z&quot;,<br>  &quot;user&quot;: {<br>    &quot;email&quot;: &quot;user@example.com&quot;,<br>    &quot;ip&quot;: &quot;103.121.27.178&quot;<br>  }<br>}</pre><h3>2.7 Insert into Cosmos DB</h3><ol><li>Add a <strong>Create or update document (V3)</strong> action</li><li>Set up a connection to your Cosmos DB</li><li>Configure:</li></ol><ul><li>Database: JsonLogsDB</li><li>Container: Logs</li><li>Document: @{body(&#39;Parse_JSON&#39;)}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*Ft3HwwTnSDJN9_DBTPon7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z1pJ9OcIsiXmjvHFVhWV-g.png" /></figure><h3>2.8 Save and Test</h3><ol><li>Click <strong>Save</strong> in the Logic App designer</li><li>Go to Blob Storage and upload a .json file to the jsoninput container</li><li>Wait ~30–60 seconds</li><li>Head to Cosmos DB → Data Explorer → Check the Logs container</li></ol><p>You should see your JSON document logged!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PhaIkI0wp7ZU-RGlbacb9w.png" /></figure><h3>✅ Wrap-Up</h3><p>This setup demonstrates how easy it is to automate data ingestion workflows using Azure Logic Apps. You’ve connected file uploads to structured storage, without writing a single backend script.</p><h3>Ideas for Extensions:</h3><ul><li>Add validation logic in the Logic App</li><li>Email alert on malformed files</li><li>Append a processing status back into Blob Storage</li></ul><p><strong>Happy building!</strong> 🚀<br> If you enjoyed this guide, consider following for more serverless and Azure tips.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ea19a9d0a72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Extending AI-Powered Image Analysis with Azure SQL and Power BI Dashboards]]></title>
            <link>https://medium.com/@sarathkumar1201/extending-ai-powered-image-analysis-with-azure-sql-and-power-bi-dashboards-bb447af56dde?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb447af56dde</guid>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[azure-sql-database]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 07:31:58 GMT</pubDate>
            <atom:updated>2025-06-22T07:31:58.030Z</atom:updated>
            <content:encoded><![CDATA[<p>In this follow-up to our <a href="https://medium.com/@sarathkumar1201/automating-image-classification-using-azure-blob-storage-ai-and-logic-apps-58566b72bb1b">image classification automation using Azure</a>, we’ll store AI insights in Azure SQL and visualize them with a real-time Power BI dashboard.</p><h3>📌 Introduction</h3><p>In the <a href="https://medium.com/@sarathkumar1201/automating-image-classification-using-azure-blob-storage-ai-and-logic-apps-58566b72bb1b">first part of this tutorial</a>, we built a no-code solution to analyze images uploaded to Azure Blob Storage using Azure AI and Logic Apps.</p><p>Now, it’s time to bring our AI insights to life.</p><p>In this continuation, you’ll:</p><ul><li>Store AI analysis results in <strong>Azure SQL Database</strong></li><li>Modify your <strong>Logic App</strong> to log every image analysis into SQL</li><li>Connect <strong>Power BI Desktop</strong> to visualize insights like:</li><li>Image descriptions</li><li>AI confidence scores</li><li>Image thumbnails</li></ul><p>Let’s dive in.</p><h3>🔧 Step 1: Create an Azure SQL Database</h3><p>To persist image analysis data, we first need a database.</p><h4>1.1 Create SQL Server and Database</h4><ol><li>Navigate to <strong>Azure Portal → Create a resource</strong></li><li>Search <strong>SQL Database</strong> → Click <strong>Create</strong></li><li>In the <strong>Basics</strong> tab:</li></ol><ul><li>Subscription: Your Azure subscription</li><li>Resource Group: ImageAnalysisRG</li><li>Database name: ImageInsightsDB</li><li>Server: Create new</li><li><em>Name: </em><em>imgsqlserver01</em></li><li><em>Location: East US</em></li><li><em>Login: </em><em>sqladmin</em></li><li><em>Password: [your password]</em></li><li>Elastic Pool: No</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><h4>1.2 Configure Firewall</h4><p>Once deployed:</p><ul><li>Go to the SQL server resource (imgsqlserver01)</li><li>Navigate to <strong>Networking</strong></li><li>Add your client IP under <strong>Firewall rules</strong></li><li>Click <strong>Save</strong></li></ul><p>This allows your machine to access the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJrgMS5MiUa8re3HlwvU-A.png" /></figure><h4>1.3 Create the Table</h4><p>Open <strong>Query Editor (Preview)</strong> in the ImageInsightsDB, and run:</p><pre>CREATE TABLE ImageAnalysis (<br>    Id INT IDENTITY(1,1) PRIMARY KEY,<br>    FileName NVARCHAR(255),<br>    Description NVARCHAR(500),<br>    Confidence FLOAT,<br>    ImageUrl NVARCHAR(1000),<br>    CreatedOn DATETIME DEFAULT GETDATE()<br>);</pre><p>This table will store AI-generated insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*9r6O9jicl98mQ22CE_W4fQ.png" /></figure><h3>🔁 Step 2: Modify Logic App to Insert Into SQL</h3><p>We’ll now expand our existing Logic App from Part 1 (ImageAnalyzerApp) to insert data into SQL after the AI analysis step.</p><h4>2.1 Open Workflow Designer</h4><ul><li>Go to Logic App → <strong>Workflow designer</strong></li><li>Select your workflow (e.g., ImageAnalysisWorkflow)</li></ul><h4>2.2 Add a SQL Action</h4><p>After your AI step:</p><ol><li>Click <strong>+ Add an action</strong></li><li>Search: SQL Server → Select <strong>Insert row (V2)</strong></li><li>Connect to your SQL Database:</li></ol><ul><li>Server: imgsqlserver01.database.windows.net</li><li>DB: ImageInsightsDB</li><li>Auth: SQL Authentication</li><li>User: sqladmin</li><li>Password: your password</li></ul><h4>2.3 Map SQL Columns</h4><p>Use expressions to map Logic App outputs:</p><pre>FileName   : last(split(triggerOutputs()?[&#39;body/Path&#39;], &#39;/&#39;))<br>Description: @{body(&#39;Parse_JSON&#39;)?[&#39;description&#39;]?[&#39;captions&#39;][0]?[&#39;text&#39;]}<br>Confidence : @{body(&#39;Parse_JSON&#39;)?[&#39;description&#39;]?[&#39;captions&#39;][0]?[&#39;confidence&#39;]}<br>ImageUrl   : @{body(&#39;Create_SAS_URI_by_path_(V2)&#39;)?[&#39;webUrl&#39;]}</pre><p>Click <strong>Save</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NE94OBhRGnuQopLtKK43lg.png" /></figure><h4>✅ Test It</h4><p>Upload an image to your images container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3QPTtykg9JmNWyAru0sFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*odTr1MQgs1CGoKfVuGU0vg.png" /><figcaption>Uploaded image</figcaption></figure><p>Wait a minute, then in SQL Query Editor, run:</p><pre>SELECT * FROM ImageAnalysis ORDER BY CreatedOn DESC;</pre><p>You should see the new analysis record!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rDi3HCt3l2r1kt63BdhNpQ.png" /></figure><h3>📊 Step 3: Connect Power BI to Azure SQL</h3><h4>3.1 Get Data from SQL</h4><p>Open <strong>Power BI Desktop</strong> → Click <strong>Home &gt; Get Data &gt; SQL Server</strong></p><ul><li>Server: imgsqlserver01.database.windows.net</li><li>Database: ImageInsightsDB</li><li>Mode: Import (recommended)</li></ul><p>Click <strong>OK</strong>, then <strong>Connect</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMK6GWl1CryhgJRG8Blqag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*QQ7ZVE0Xg7nqwej3MWS5tA.png" /></figure><h4>3.2 Authenticate</h4><p>Choose:</p><ul><li>Type: <strong>Database</strong></li><li>Username: sqladmin</li><li>Password: your password</li></ul><p>Click <strong>Connect</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*3nZQnRQFdklAPOEOs-bSwQ.png" /></figure><h4>3.3 Load Table</h4><p>Select the ImageAnalysis table → Click <strong>Load</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NtWZo2JtGuzbBekawCB6CQ.png" /></figure><h3>📈 Step 4: Build Your Dashboard</h3><h4>Table View</h4><ul><li>Drag fields to a Table:</li><li>FileName, Description, Confidence, CreatedOn</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0venhk7vgGZEuyE8iqW3g.png" /></figure><h4>Confidence Chart</h4><ul><li>Choose <strong>Clustered Column Chart</strong></li><li>Axis: FileName</li><li>Value: Confidence</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*5klFB79xRV0Aa00mNAAXpg.png" /></figure><h4>Image Thumbnails (Optional)</h4><ul><li>Go to <strong>Model View</strong></li><li>Select ImageUrl → Set <strong>Data Category</strong> to <strong>Image URL</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v03rFL3V0_y75Wb_oyToNg.png" /></figure><p>Now, you can display images directly in your reports!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*pxUvZ55KFOBGcid-dCbyQA.png" /></figure><h3>🎉 Conclusion</h3><p>You’ve now built an end-to-end AI-powered image insight system using:</p><ul><li>Azure Blob Storage</li><li>Logic Apps</li><li>Azure SQL Database</li><li>Power BI</li></ul><p>This scalable, low-code solution brings automation, intelligence, and visualization together — ideal for monitoring, auditing, or even content moderation use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb447af56dde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Automating Image Classification Using Azure Blob Storage, AI, and Logic Apps]]></title>
            <link>https://medium.com/@sarathkumar1201/automating-image-classification-using-azure-blob-storage-ai-and-logic-apps-58566b72bb1b?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/58566b72bb1b</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 19:26:55 GMT</pubDate>
            <atom:updated>2025-06-22T07:32:29.359Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧠📷 Automating Image Classification Using Azure Blob Storage, AI, and Logic Apps (Part 1)</h3><p>Imagine uploading a photo to cloud storage — and automatically receiving an email that tells you what’s in it.</p><p>In this tutorial, you’ll build exactly that using:</p><ul><li><strong>Azure Blob Storage</strong></li><li><strong>Azure Logic Apps (Standard)</strong></li><li><strong>Azure Computer Vision (AI)</strong></li><li><strong>Office 365 Outlook Email</strong></li></ul><p>No backend code, no web servers — just powerful event-driven automation using cloud services.</p><h3>🔍 What You’ll Build</h3><p>A system where:</p><ol><li>You upload an image to <strong>Azure Blob Storage</strong></li><li>A <strong>Logic App</strong> is triggered</li><li>The image is sent to <strong>Azure’s Computer Vision API</strong></li><li>It returns a description of the image</li><li>You receive an <strong>email</strong> with the image summary and a link to view it</li></ol><h3>✅ Prerequisites</h3><ul><li>Azure Subscription</li><li>Office 365 account (to send email via Logic App)</li><li>Basic familiarity with Azure Portal</li></ul><h3>Step 1: Set Up Storage for Images</h3><h3>1.1: Create a Resource Group</h3><ol><li>Go to the <a href="https://portal.azure.com/">Azure Portal</a></li><li>Search for <strong>Resource Groups</strong> → Click <strong>Create</strong></li><li>Fill in:</li></ol><ul><li><strong>Name</strong>: ImageAnalysisRG</li><li><strong>Region</strong>: Central US (or nearby)</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><h3>1.2: Create a Storage Account</h3><ol><li>Click <strong>Create a resource</strong> → Search for <strong>Storage Account</strong></li><li>Fill in:</li></ol><ul><li><strong>Resource Group</strong>: ImageAnalysisRG</li><li><strong>Storage account name</strong>: e.g., imganalyzesa12345 (must be globally unique)</li><li><strong>Region</strong>: Central US</li><li><strong>Performance</strong>: Standard</li><li><strong>Redundancy</strong>: LRS</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><h3>1.3: Create a Blob Container</h3><ol><li>Go to your new <strong>Storage Account</strong></li><li>Click <strong>Containers</strong> in the side menu</li><li>Click <strong>+ Container</strong></li></ol><ul><li>Name: images</li><li>Access level: <strong>Private</strong></li></ul><p>Click <strong>Create</strong>.</p><h3>Step 2: Set Up Azure Computer Vision (AI)</h3><h3>2.1: Create the Computer Vision Resource</h3><ol><li>Click <strong>Create a resource</strong> → Search for <strong>Computer Vision</strong></li><li>Fill in:</li></ol><ul><li><strong>Resource Group</strong>: ImageAnalysisRG</li><li><strong>Name</strong>: img-vision-demo</li><li><strong>Region</strong>: Central US</li><li><strong>Pricing tier</strong>: Free (F0)</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*d4Ek8h3XuVb8jXy_1XuapA.png" /></figure><h3>2.2: Get API Key + Endpoint</h3><p>Once the resource is deployed:</p><ol><li>Go to the <strong>Computer Vision</strong> resource</li><li>Click <strong>Keys and Endpoint</strong> in the left menu</li><li>Note:</li></ol><ul><li><strong>Key1</strong> (your API key)</li><li><strong>Endpoint URL</strong> (e.g., <a href="https://img-vision-demo.cognitiveservices.azure.com/)">https://img-vision-demo.cognitiveservices.azure.com/)</a></li></ul><p>You’ll need both for the Logic App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9f39iTTgae2pGvLNxaTP8A.png" /><figcaption>Keys and Endpoint from Computer vision</figcaption></figure><h3>Step 3: Create the Logic App Workflow</h3><h3>3.1: Create Logic App (Standard)</h3><ol><li>Click <strong>Create a resource</strong> → Search: <strong>Logic App (Standard)</strong></li><li>Fill in:</li></ol><ul><li><strong>Resource Group</strong>: ImageAnalysisRG</li><li><strong>Name</strong>: ImageAnalyzerApp</li><li><strong>Region</strong>: Central US</li><li><strong>Plan type</strong>: Workflow Standard</li><li><strong>Hosting Plan</strong>: Create new → ASP-ImageAnalyzer</li><li><strong>Storage Account</strong>: Select your existing account</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><h3>3.2: Open the Logic App Designer</h3><p>Once deployed:</p><ol><li>Go to your Logic App</li><li>Click <strong>Workflow designer</strong></li><li>Choose <strong>Blank workflow</strong></li><li>Add a <strong>trigger</strong></li></ol><h3>3.3: Trigger — “When a Blob is Added or Modified”</h3><ol><li>Search for <strong>Azure Blob Storage</strong></li><li>Choose: <strong>When a blob is added or modified (V2)</strong></li><li>Connect using <strong>Managed Identity</strong></li></ol><blockquote>If it fails, try using your <strong>Storage Account Access Key</strong></blockquote><ol><li>Configure:</li></ol><ul><li><strong>Container name</strong>: images</li><li><strong>Interval</strong>: 1</li><li><strong>Frequency</strong>: Minute</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cftpI0bMtXEUD6ij8FIddw.png" /></figure><h3>Step 4: Analyze Image and Send Email</h3><h3>4.1: Create SAS URL for the Blob</h3><ol><li>Click <strong>+ Add an action</strong></li><li>Search: <strong>Azure Blob Storage</strong></li><li>Select: <strong>Create SAS URI by path (V2)</strong></li><li>Configure:</li></ol><ul><li><strong>Blob Path</strong>: use dynamic content → Path</li><li><strong>Permissions</strong>: Read</li><li><strong>Expiry Time</strong>: 60 minutes</li></ul><p>This gives a secure link to the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lc2Q1W0EAKXLQIIt-F3niQ.png" /></figure><h3>4.2: Call Computer Vision API (HTTP)</h3><ol><li>Click <strong>+ Add an action</strong> → Search <strong>HTTP</strong></li><li>Configure:</li></ol><ul><li><strong>Method</strong>: POST</li><li><strong>URI</strong>:</li></ul><pre>https://&lt;your-endpoint&gt;.cognitiveservices.azure.com/vision/v3.2/analyze?visualFeatures=Description</pre><ul><li>Replace &lt;your-endpoint&gt; with your actual region endpoint.</li><li><strong>Headers</strong>:</li></ul><pre>Content-Type: application/json   <br>Ocp-Apim-Subscription-Key: YOUR_API_KEY</pre><ul><li><strong>Body</strong>:</li></ul><pre>{   <br>    &quot;url&quot;: &quot;@{body(&#39;Create_SAS_URI_by_path_(V2)&#39;)?[&#39;webUrl&#39;]}&quot; <br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqkQEuSSbAv1Hfal8G2LbQ.png" /></figure><h3>4.3: Parse JSON Response</h3><ol><li>Click <strong>+ Add an action</strong> → Search: <strong>Parse JSON</strong></li><li>For <strong>Content</strong>: use the HTTP response Body</li><li>Use this schema:</li></ol><pre>{<br>  &quot;type&quot;: &quot;object&quot;,<br>  &quot;properties&quot;: {<br>    &quot;description&quot;: {<br>      &quot;type&quot;: &quot;object&quot;,<br>      &quot;properties&quot;: {<br>        &quot;captions&quot;: {<br>          &quot;type&quot;: &quot;array&quot;,<br>          &quot;items&quot;: {<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>              &quot;text&quot;: { &quot;type&quot;: &quot;string&quot; },<br>              &quot;confidence&quot;: { &quot;type&quot;: &quot;number&quot; }<br>            },<br>            &quot;required&quot;: [&quot;text&quot;, &quot;confidence&quot;]<br>          }<br>        }<br>      }<br>    }<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRQn_dVmZk1YmIDu3Nb9Kw.png" /></figure><h3>4.4: Send Email with Analysis Results</h3><ol><li>Click <strong>+ Add an action</strong> → Search: <strong>Outlook</strong></li><li>Choose: <strong>Send an email (V2)</strong></li><li>Sign in if prompted</li><li>Configure:</li></ol><ul><li><strong>To</strong>: your email</li><li><strong>Subject</strong>: AI Analyzed Your Image!</li><li><strong>Body</strong>:</li></ul><pre>Image Description: @{body(&#39;Parse_JSON&#39;)?[&#39;description&#39;]?[&#39;captions&#39;][0]?[&#39;text&#39;]}  <br>Confidence: @{body(&#39;Parse_JSON&#39;)?[&#39;description&#39;]?[&#39;captions&#39;][0]?[&#39;confidence&#39;]}  <br>Image URL: @{body(&#39;Create_SAS_URI_by_path_(V2)&#39;)?[&#39;webUrl&#39;]}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZ3_7Bi2WECqX017Ccr4jg.png" /></figure><h3>🎯 Test Your Flow</h3><ol><li>Click <strong>Save</strong></li><li>Go to your Blob container → images</li><li>Upload a photo (e.g., dog, food, etc.)</li><li>Wait a few seconds…</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fe5CT1J7ylnchlC7iUZFgQ.png" /><figcaption>Upload image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjZymMZs6UCAPkdv5261zA.png" /><figcaption>Run</figcaption></figure><h3>✅ You’ll get an email like:</h3><p><strong>Subject</strong>: AI Analyzed Your Image!<br> <strong>Body</strong>:</p><pre>Image Description: a dog lying on a couch  <br>Confidence: 0.89  <br>Image URL: https://[blob-url]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NwoBrQj5Q7Hssbyu5xMfA.png" /><figcaption>Received mail</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TkY8EYaczUUAw-qDu74Ccw.png" /><figcaption>Uploaded image opened via URL generated</figcaption></figure><h3>💡 Use Cases</h3><ul><li>Auto-tagging uploaded media</li><li>Surveillance + real-time alerts</li><li>AI-powered content moderation</li><li>Image content archiving</li></ul><h3>🧩 Final Thoughts</h3><p>This workflow shows how easily you can connect <strong>AI</strong>, <strong>serverless</strong>, and <strong>cloud storage</strong> — with no code.</p><p>Let Azure Logic Apps do the orchestration while you focus on the results.</p><h3>🔗 <strong>Next Up: Visualizing AI Image Insights in Power BI</strong></h3><blockquote><em>In the next part, we extend this solution by storing image metadata in Azure SQL and building a live dashboard using Power BI.</em></blockquote><blockquote><em>👉 </em><a href="https://medium.com/@sarathkumar1201/extending-ai-powered-image-analysis-with-azure-sql-and-power-bi-dashboards-bb447af56dde"><em>Read the follow-up here</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58566b72bb1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Event-Driven Processing with Azure Service Bus & Logic Apps (Standard)]]></title>
            <link>https://medium.com/@sarathkumar1201/event-driven-processing-with-azure-service-bus-logic-apps-standard-91f529c336ad?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/91f529c336ad</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 17:56:39 GMT</pubDate>
            <atom:updated>2025-06-20T17:56:39.662Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure makes event-driven architectures easier than ever. In this guide, you’ll learn how to <strong>build a fully automated flow</strong> where a message sent to an <strong>Azure Service Bus Queue</strong> triggers a <strong>Logic App (Standard)</strong>, which then processes the message and sends an <strong>email notification</strong>.</p><p>Whether you’re building microservices, serverless apps, or automated integrations, this is a solid foundation.</p><h3>🛠️ What You’ll Build</h3><p>A system that:</p><ol><li>Sends a message to an Azure <strong>Service Bus Queue</strong></li><li>Automatically triggers a <strong>Logic App (Standard)</strong></li><li>Processes the message (e.g., logs it, stores it, or sends an email)</li></ol><h3>Step 1: Create Azure Service Bus + Queue</h3><h3>1.1: Create a Resource Group</h3><ol><li>In the <a href="https://portal.azure.com/">Azure Portal</a>, search for <strong>Resource Groups</strong> → Click <strong>Create</strong></li><li>Fill in:</li></ol><ul><li><strong>Resource Group name</strong>: ServiceBusLogicRG</li><li><strong>Region</strong>: Central US (or closest region to you)</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.</p><h3>1.2: Create a Service Bus Namespace</h3><ol><li>Go to <strong>Home</strong> → <strong>Create a resource</strong></li><li>Search for <strong>Service Bus</strong> → Select it → Click <strong>Create</strong></li></ol><p>Fill in the <strong>Basics</strong>:</p><ul><li><strong>Subscription</strong>: Your active subscription</li><li><strong>Resource Group</strong>: ServiceBusLogicRG</li><li><strong>Namespace name</strong>: sb-demo-events-svg (must be globally unique)</li><li><strong>Location</strong>: Central US</li><li><strong>Pricing tier</strong>: Standard</li></ul><p>Click <strong>Review + Create</strong>, then <strong>Create</strong>.<br>Deployment takes about 2 minutes.</p><h3>1.3: Create a Queue</h3><p>Once your namespace is ready:</p><ol><li>Click <strong>Go to Resource</strong></li><li>In the left menu, go to <strong>Queues</strong> under <em>Entities</em></li><li>Click <strong>+ Queue</strong></li></ol><p>Fill in:</p><ul><li><strong>Queue name</strong>: demo-queue</li><li>Leave other settings as default</li></ul><p>Click <strong>Create</strong>.</p><h3>Step 2: Create a Logic App (Standard)</h3><h3>2.1: Create the Logic App</h3><ol><li>Back in the Azure Portal → <strong>Create a resource</strong></li><li>Search for <strong>Logic App (Standard)</strong> → Click <strong>Create</strong></li></ol><p>Fill in the <strong>Basics</strong>:</p><ul><li><strong>Subscription</strong>: Your subscription</li><li><strong>Resource Group</strong>: ServiceBusLogicRG</li><li><strong>Logic App name</strong>: LogicAppProcessQueue</li><li><strong>Region</strong>: Central US (same as your Service Bus)</li><li><strong>Plan type</strong>: Workflow Standard</li><li><strong>Windows Plan</strong>: Create new → name it ASP-ServiceBusLogic</li><li><strong>Storage account</strong>: Create new → name it something like sblogicstorageXYZ</li></ul><p>Click through to <strong>Review + Create</strong>, then click <strong>Create</strong>.</p><h3>Step 3: Trigger Logic App on Service Bus Message</h3><h3>3.1: Open Logic App Designer</h3><ol><li>Go to your Logic App: LogicAppProcessQueue</li><li>In the side menu, click <strong>Workflow settings</strong> → Make sure <strong>State = Enabled</strong></li><li>Click <strong>Add a workflow</strong></li></ol><ul><li>Name: sb-demo-workflow</li><li>Type: <strong>Stateful</strong></li></ul><p>Now click <strong>Workflow designer</strong> → Add a trigger.</p><h3>3.2: Add Service Bus Trigger</h3><ol><li>In the designer, search: Service Bus</li><li>Select: <strong>When a message is received in a queue (peek-lock)</strong> — Standard</li></ol><p>Create a <strong>new connection</strong>:</p><ul><li>Choose <strong>Namespace</strong>: sb-demo-events-svg</li><li><strong>Authentication</strong>: Select <strong>Managed Identity</strong></li><li><strong>Endpoint</strong>: Enter sb://&lt;your-namespace&gt;.servicebus.windows.net/</li><li>Click <strong>Create</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7i5mMCO4nx6yjjQZpfxqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWS7h81hq0gEUB2wY3Yaaw.png" /></figure><blockquote><em>💡 If the queue doesn’t appear, assign a role to the Logic App.</em></blockquote><h3>🛡️ Assign Role (If Needed)</h3><ol><li>Go to your <strong>Service Bus namespace</strong></li><li>Click <strong>Access control (IAM)</strong> → <strong>+ Add role assignment</strong></li><li>Role: Azure Service Bus Data Receiver</li><li>Assign to: <strong>Managed Identity</strong> → choose your Logic App</li></ol><p>Click <strong>Save</strong>, then return to the Logic App designer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*RmeanZ1u-xNaDm4Dljz_Ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*PH3SYy7GQp91lClvOowRzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHxaebwn32wixU0WLRZc8w.png" /></figure><h3>3.3: Configure Trigger</h3><ul><li><strong>Queue name</strong>: demo-queue</li><li><strong>Max messages</strong>: 1</li><li><strong>Interval</strong>: 1</li><li><strong>Frequency</strong>: Minute</li></ul><p>Click <strong>Next step</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MvQkcwgA9nXlzBV8M2pfuA.png" /></figure><h3>Step 4: Add Email Notification</h3><h3>4.1: Add Office 365 Outlook Action</h3><ol><li>Click <strong>+ Add an action</strong></li><li>Search: <strong>Outlook</strong></li><li>Choose: <strong>Send an email (V2)</strong> — Office 365 Outlook</li></ol><blockquote>Sign in with your Microsoft 365 account if prompted</blockquote><h3>4.2: Set Email Details</h3><ul><li><strong>To</strong>: Your email address</li><li><strong>Subject</strong>: New Message from Service Bus Queue</li><li><strong>Body</strong>: Message Received: @{triggerBody()?[&#39;ContentData&#39;]}</li></ul><p>Click <strong>Save</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2Plc5h_SLO9vnGLyE8mKQ.png" /></figure><h3>Step 5: Test the Flow 🎉</h3><ol><li>In the Logic App Designer, click <strong>Run Trigger &gt; When a message is received</strong></li><li>Go to your <strong>Service Bus Namespace</strong></li><li>Navigate to <strong>Queues</strong> → demo-queue → <strong>Service Bus Explorer</strong></li><li>Click <strong>Send Message</strong></li></ol><p>Add message:</p><pre>Hello from Service Bus!</pre><p>Click <strong>Send</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZ9Dz5FRL3X-fyyeDjVkkw.png" /></figure><h3>✅ Expected Result</h3><p>You should receive an email like:</p><ul><li><strong>Subject</strong>: New Message from Service Bus Queue</li><li><strong>Body</strong>:</li></ul><pre>Message Received: Hello from Service Bus!</pre><p>Check your spam/junk folder just in case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*1AhxCNsJz6i6GW6a1Zs9FQ.png" /></figure><h3>🎯 Conclusion</h3><p>You’ve just built a <strong>fully automated, event-driven pipeline</strong> using Azure Service Bus and Logic Apps (Standard). This is a powerful pattern that can be extended to trigger workflows, integrate systems, store data, or alert stakeholders in real-time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91f529c336ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Ingest Data from a REST API to Azure SQL using Azure Data Factory]]></title>
            <link>https://medium.com/@sarathkumar1201/how-to-ingest-data-from-a-rest-api-to-azure-sql-using-azure-data-factory-94f5df57b211?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/94f5df57b211</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[data-integration]]></category>
            <category><![CDATA[azure-sql-database]]></category>
            <category><![CDATA[azure-data-factory]]></category>
            <category><![CDATA[cloud-automation]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 18:33:34 GMT</pubDate>
            <atom:updated>2025-06-19T18:33:34.522Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, you’ll learn how to create an automated pipeline using <strong>Azure Data Factory (ADF)</strong> to ingest data from a REST API (like <strong>OpenWeatherMap</strong>) and store it in an <strong>Azure SQL Database</strong> for reporting and analysis.</p><h3>Why Use Azure Data Factory (ADF)?</h3><p>Azure Data Factory is a powerful cloud-based data integration service that enables you to orchestrate data flows, from various sources to your destination systems. In this project, we’ll demonstrate how to pull data from an external <strong>REST API</strong>, transform it if necessary, and store it in <strong>Azure SQL Database</strong> for easy querying and reporting.</p><h3>Components Used in this Tutorial</h3><ol><li><strong>Azure Data Factory:</strong> Data pipeline orchestration</li><li><strong>REST API:</strong> Source of external data</li><li><strong>Azure SQL Database:</strong> Target destination for the data</li><li><strong>Linked Services &amp; Datasets:</strong> To connect ADF with REST and SQL</li><li><strong>Mapping Data Flow:</strong> To transform data before inserting into SQL</li></ol><h3>Project Goal:</h3><p>Use Azure Data Factory to call the <strong>OpenWeatherMap API</strong>, fetch current weather data (e.g., temperature, humidity), and store it in an <strong>Azure SQL Database</strong> for easy analysis and reporting.</p><h3>Step-by-Step Guide</h3><h4>Step 1: Create Azure SQL Database</h4><p><strong>1.1: Create a New SQL Server and Database:</strong></p><ul><li>Go to the <strong>Azure Portal</strong> → Create a new <strong>SQL Database</strong>.</li><li><strong>Resource Group</strong>: WeatherADFGroup</li><li><strong>Database Name</strong>: WeatherDB</li><li><strong>Server</strong>: weather-sql-server</li><li><strong>Location</strong>: Central US (or any available region)</li><li><strong>Authentication</strong>: Use SQL authentication with the username sqladmin.</li></ul><p><strong>1.2: Configure Networking:</strong></p><ul><li>Set <strong>Public endpoint</strong> to Yes.</li><li>Allow <strong>Azure services to access server</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4NLvBhTxsGbss9yTEysOg.png" /></figure><p><strong>1.3: Create a Table in SQL Database:</strong><br> Use the following SQL script to create the table:</p><pre>CREATE TABLE WeatherData (  <br>  City NVARCHAR(100),     <br>  Temperature FLOAT,    <br>  Humidity INT,     <br>  Weather NVARCHAR(100),     <br>  DateRetrieved DATETIME DEFAULT GETDATE() <br>);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SO7ozvMEVVt9vmcfaJX2bA.png" /></figure><p><strong>1.4: Save SQL Connection Details:</strong></p><ul><li>Server Name: weather-sql-server.database.windows.net</li><li>Database Name: WeatherDB</li><li>Username: sqladmin</li><li>Password: (Your chosen password)</li></ul><h4>Step 2: Create Azure Data Factory (ADF)</h4><p><strong>2.1: Create an Azure Data Factory Instance:</strong></p><ul><li>Go to <strong>Azure Portal</strong> → Search for <strong>Data Factory</strong> and create an instance.</li><li>Choose <strong>Subscription</strong>, <strong>Resource Group</strong> (WeatherADFGroup), and <strong>Region</strong> (Central US).</li><li>Set <strong>Version</strong> to <strong>V2</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzrNp6qKkTRPKQA4J4xVnw.png" /></figure><p><strong>2.2: Launch ADF Studio:</strong></p><ul><li>Once the ADF instance is deployed, click on <strong>Open Azure Data Factory Studio</strong> to open the browser-based visual editor.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJ0lF5mE2s5prC5dBJ_HBQ.png" /></figure><h4>Step 3: Create Linked Services</h4><p><strong>3.1: Linked Service for REST API (OpenWeatherMap)</strong></p><ul><li>Go to the <strong>Manage</strong> tab in ADF Studio.</li><li>Click <strong>Linked Services</strong> → <strong>+ New</strong>.</li><li>Choose <strong>REST</strong> and configure:</li><li><strong>Name</strong>: OpenWeatherMap_REST</li><li><strong>Base URL</strong>: <a href="http://api.openweathermap.org/data/2.5/">http://api.openweathermap.org/data/2.5/</a></li><li><strong>Authentication Type</strong>: Anonymous (API key passed via query string).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qb7CjkIKC77hqSmt-c4LBA.png" /></figure><p><strong>3.2: Linked Service for Azure SQL Database</strong></p><ul><li>Go to <strong>Linked Services</strong> → <strong>+ New</strong>.</li><li>Choose <strong>Azure SQL Database</strong> and configure:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AYqDLiDmrhEH5Ep9PizrA.png" /></figure><ul><li><strong>Name</strong>: AzureSQL_WeatherDB</li><li><strong>Server Name</strong>: weather-sql-server.database.windows.net</li><li><strong>Database Name</strong>: WeatherDB</li><li><strong>Authentication</strong>: SQL authentication</li><li><strong>Username</strong>: sqladmin</li><li><strong>Password</strong>: Your password</li></ul><h4>Step 4: Create Datasets</h4><p><strong>4.1: Create REST API Dataset (Weather Source)</strong></p><ul><li>Go to the <strong>Author</strong> tab in ADF Studio.</li><li>Choose <strong>+ Dataset</strong> → Select <strong>REST</strong> → Choose <strong>JSON</strong> as the format.</li><li>Configure:</li><li><strong>Name</strong>: ds_WeatherAPI</li><li><strong>Linked Service</strong>: OpenWeatherMap_REST</li><li><strong>Relative URL</strong>: weather?q=Trivandrum&amp;appid=YOUR_API_KEY&amp;units=metric</li><li>Replace YOUR_API_KEY with your actual OpenWeatherMap API key.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*49WKYyvfNa3R54bQe1ykmg.png" /></figure><p><strong>4.2: Create SQL Table Dataset (Weather Target)</strong></p><ul><li>Go to <strong>Author</strong> → <strong>+ Dataset</strong> → Choose <strong>Azure SQL Database</strong>.</li><li>Select <strong>Table</strong> and configure:</li><li><strong>Name</strong>: ds_WeatherSQL</li><li><strong>Linked Service</strong>: AzureSQL_WeatherDB</li><li><strong>Table Name</strong>: dbo.WeatherData</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4CrfmZ8pCe9lPegIF042A.png" /></figure><h4>Step 5: Create ADF Pipeline with Copy Activity</h4><p><strong>5.1: Create a New Pipeline</strong></p><ul><li>In ADF Studio, go to <strong>Author</strong> → <strong>+ Pipeline</strong>.</li><li>Name it: pl_WeatherImportPipeline.</li></ul><p><strong>5.2: Add Copy Activity</strong></p><ul><li>Drag <strong>Copy data</strong> into the pipeline canvas and rename it to CopyWeatherToSQL.</li></ul><p><strong>5.3: Configure Source (REST API)</strong></p><ul><li>In the <strong>Source</strong> tab:</li><li><strong>Source dataset</strong>: ds_WeatherAPI.</li></ul><p><strong>5.4: Configure Sink (Azure SQL DB)</strong></p><ul><li>In the <strong>Sink</strong> tab:</li><li><strong>Sink dataset</strong>: ds_WeatherSQL.</li></ul><p><strong>5.5: Map JSON to SQL Columns (Check the next step)</strong></p><ul><li>Add a <strong>Mapping Data Flow</strong> to flatten the JSON data structure:</li><li><strong>City</strong>: name</li><li><strong>Temperature</strong>: main.temp</li><li><strong>Humidity</strong>: main.humidity</li><li><strong>Weather</strong>: weather[0].description</li></ul><h4>Step 6: Create Mapping Data Flow</h4><p><strong>6.1: Create the Data Flow</strong></p><ul><li>In ADF Studio, go to <strong>Author</strong> → <strong>+ Data Flow</strong> → Choose <strong>Mapping data flow</strong>.</li><li>Name it: df_WeatherFlatten.</li></ul><p><strong>6.2: Add Source and Projection</strong></p><ul><li>Click on <strong>Add Source</strong> and configure:</li><li><strong>Dataset</strong>: ds_WeatherAPI.</li><li><strong>Projection</strong>: Click <strong>Import schema</strong> to fetch the API response schema. <br>(If button is disabled, enable <strong>Data Flow Debug</strong> mode and try again<strong>)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JmwTHV-YCmNAJiWWRz_gBg.png" /></figure><p><strong>6.3: Add Derived Column for Flattening</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*agBvE7F2tDTQ5rtBANbu0Q.png" /></figure><ul><li>Add a <strong>Derived Column</strong> to flatten the nested fields:</li><li><strong>City</strong>: name</li><li><strong>Temperature</strong>: main.temp</li><li><strong>Humidity</strong>: main.humidity</li><li><strong>Weather</strong>: weather[0].description</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XF8oWRuJShYqcBmqil17dw.png" /><figcaption>You can use the expression builder (fx) for each field.</figcaption></figure><p><strong>6.4: Add Sink (SQL Table)</strong></p><ul><li>Add <strong>Sink</strong> and configure:</li><li><strong>Name: </strong>WeatherSink.</li><li><strong>Dataset</strong>: ds_WeatherSQL.</li></ul><p><strong>6.5: Configure Sink Mapping</strong></p><ul><li>Go to the <strong>Mapping tab</strong> of the Sink</li><li>Click <strong>Import </strong>Schemas &amp; <strong>Map your derived fields </strong>to SQL table:</li><li><strong>City</strong>: City</li><li><strong>Temperature</strong>: Temperature</li><li><strong>Humidity</strong>: main.humidity</li><li><strong>Weather</strong>: Weather</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1KZYBrPh7UHwXy-z-1weg.png" /></figure><p><strong>6.6: Publish and Save</strong></p><ul><li>Click <strong>Publish All</strong> and save the changes.</li></ul><h4>Step 7: Add Data Flow to Pipeline</h4><ul><li>Go back to <strong>pl_WeatherImportPipeline</strong> and drag in the <strong>Data Flow</strong> activity.</li><li>Select the <strong>df_WeatherFlatten</strong> data flow.</li><li>Click <strong>Publish All</strong> again.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oGxBE2MkegvLHqb9VGCyfQ.png" /></figure><h4>Step 8: Debug or Trigger the Pipeline</h4><ul><li>Test the pipeline by clicking <strong>Debug</strong>.</li><li>Once successful, check your <strong>WeatherData</strong> table in the Azure SQL Database.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lhtEhU6cOljELSpgtSuMwA.png" /></figure><h3>Conclusion</h3><p>Congratulations! You’ve successfully created an Azure Data Factory pipeline that pulls data from an external REST API (OpenWeatherMap), flattens the JSON response, and stores it in an Azure SQL Database. This powerful integration allows you to automate data ingestion and make it ready for analysis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94f5df57b211" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Get Weather Info for a City via Azure Logic App and OpenWeatherMap API]]></title>
            <link>https://medium.com/@sarathkumar1201/how-to-get-weather-info-for-a-city-via-azure-logic-app-and-openweathermap-api-2a9cee91a2f5?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a9cee91a2f5</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 11:20:53 GMT</pubDate>
            <atom:updated>2025-06-19T11:20:53.693Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In this tutorial, we’ll walk through how to create an Azure Logic App to fetch weather information for a city via the OpenWeatherMap API. By the end of this guide, you’ll have a working Logic App that fetches weather details such as temperature, humidity, and weather conditions and responds with a JSON payload.</p><h3>Prerequisites</h3><ul><li>An <strong>Azure account</strong> (sign up <a href="https://azure.microsoft.com/en-us/free/">here</a>).</li><li>A <strong>free OpenWeatherMap API key</strong> (sign up <a href="https://home.openweathermap.org/users/sign_up">here</a>).</li><li>Basic familiarity with <strong>Azure Logic Apps</strong>.</li></ul><h3>Step 1: Get an OpenWeatherMap API Key</h3><p>Before you start, you’ll need an OpenWeatherMap API key. Follow these steps:</p><ol><li>Go to the <a href="https://home.openweathermap.org/users/sign_up">OpenWeatherMap sign-up page</a> and create an account.</li><li>Verify your email address.</li><li>Once logged in, navigate to the <strong>API Keys</strong> section and <strong>copy your API key</strong>. You’ll need this later when configuring the Logic App.</li></ol><h3>Step 2: Create a Logic App in Azure Portal</h3><ol><li>Navigate to the <a href="https://portal.azure.com/">Azure Portal</a>.</li><li>Click on <strong>Create a resource</strong>, search for <strong>Logic App (Standard)</strong>, and click <strong>Create</strong>.</li><li>Fill in the required information:</li></ol><ul><li><strong>Subscription</strong>: Select your active subscription.</li><li><strong>Resource Group</strong>: weatherapp-rg (or choose a custom name).</li><li><strong>Logic App Name</strong>: GetWeatherInfoLogicApp.</li><li><strong>Region</strong>: Select the region that suits your needs (Central US works fine).</li><li><strong>Plan Type</strong>: Workflow Standard.</li></ul><p>Click <strong>Create</strong> and wait for the deployment to complete.</p><h3>Step 3: Create the Workflow</h3><ol><li>After deployment completes, open your Logic App.</li><li>Under <strong>Workflows</strong>, click <strong>+ Add workflow</strong>.</li><li>Name your workflow: GetWeatherWorkflow.</li><li>Choose the <strong>Stateful workflow</strong> option.</li><li>Click <strong>Create</strong>.</li></ol><h3>Step 4: Set HTTP Trigger</h3><ol><li>In the new workflow, click <strong>Add a trigger</strong>.</li><li>Choose <strong>When an HTTP request is received</strong>.</li><li>Click <strong>Use sample payload to generate schema</strong>.</li><li>Paste the following JSON in the field and click <strong>Done</strong>:</li></ol><pre>{<br>  &quot;city&quot;: &quot;London&quot;<br>}</pre><p>This will define the payload structure for the incoming HTTP request.</p><h3>Step 5: Add HTTP Action to Call the OpenWeatherMap API</h3><ol><li>Click <strong>+ Next Step</strong>.</li><li>Search for <strong>HTTP</strong> and select the <strong>HTTP</strong> action.</li><li>Fill in the required fields:</li></ol><ul><li><strong>Method</strong>: GET</li><li><strong>URI</strong>: <a href="https://api.openweathermap.org/data/2.5/weather?q=@{triggerBody()?[&#39;city&#39;]}&amp;appid=YOUR_API_KEY&amp;units=metric">https://api.openweathermap.org/data/2.5/weather?q=@{triggerBody()?[&#39;city&#39;]}&amp;appid=YOUR_API_KEY&amp;units=metric</a></li><li>Replace YOUR_API_KEY with the API key you copied earlier.</li><li>Leave <strong>headers</strong> and <strong>body</strong> blank.</li></ul><p>The dynamic URI uses the city provided in the HTTP request to query the weather API.</p><h3>Step 6: Parse the JSON Response</h3><ol><li>Click <strong>+ Next Step</strong>.</li><li>Search for <strong>Parse JSON</strong> and select it.</li><li>In the <strong>Content</strong> field, select the <strong>Body</strong> from the previous HTTP action.</li><li>For <strong>Schema</strong>, click <strong>Generate from sample</strong> and paste the following sample JSON:</li></ol><pre>{<br>    &quot;coord&quot;: {<br>        &quot;lon&quot;: 76.9167,<br>        &quot;lat&quot;: 8.4833<br>    },<br>    &quot;weather&quot;: [<br>        {<br>            &quot;id&quot;: 804,<br>            &quot;main&quot;: &quot;Clouds&quot;,<br>            &quot;description&quot;: &quot;overcast clouds&quot;,<br>            &quot;icon&quot;: &quot;04d&quot;<br>        }<br>    ],<br>    &quot;base&quot;: &quot;stations&quot;,<br>    &quot;main&quot;: {<br>        &quot;temp&quot;: 28.39,<br>        &quot;feels_like&quot;: 32.07,<br>        &quot;temp_min&quot;: 28.39,<br>        &quot;temp_max&quot;: 28.39,<br>        &quot;pressure&quot;: 1011,<br>        &quot;humidity&quot;: 74,<br>        &quot;sea_level&quot;: 1011,<br>        &quot;grnd_level&quot;: 1011<br>    },<br>    &quot;visibility&quot;: 10000,<br>    &quot;wind&quot;: {<br>        &quot;speed&quot;: 5.95,<br>        &quot;deg&quot;: 304,<br>        &quot;gust&quot;: 8.68<br>    },<br>    &quot;clouds&quot;: {<br>        &quot;all&quot;: 100<br>    },<br>    &quot;dt&quot;: 1750317764,<br>    &quot;sys&quot;: {<br>        &quot;country&quot;: &quot;IN&quot;,<br>        &quot;sunrise&quot;: 1750293310,<br>        &quot;sunset&quot;: 1750338728<br>    },<br>    &quot;timezone&quot;: 19800,<br>    &quot;id&quot;: 1254163,<br>    &quot;name&quot;: &quot;Trivandrum&quot;,<br>    &quot;cod&quot;: 200<br>}</pre><p>Click <strong>Done</strong> to finish.</p><h3>Step 7: Return a Custom Response</h3><ol><li>Click <strong>+ Next Step</strong>.</li><li>Search for <strong>Response</strong> and choose it.</li><li>Set the following parameters:</li></ol><ul><li><strong>Status Code</strong>: 200</li><li><strong>Body</strong>:</li></ul><pre>{<br>  &quot;city&quot;: &quot;@{body(&#39;Parse_JSON&#39;)?[&#39;name&#39;]}&quot;,<br>  &quot;temperature&quot;: &quot;@{body(&#39;Parse_JSON&#39;)?[&#39;main&#39;]?[&#39;temp&#39;]}&quot;,<br>  &quot;humidity&quot;: &quot;@{body(&#39;Parse_JSON&#39;)?[&#39;main&#39;]?[&#39;humidity&#39;]}&quot;,<br>  &quot;weather&quot;: &quot;@{body(&#39;Parse_JSON&#39;)?[&#39;weather&#39;][0]?[&#39;description&#39;]}&quot;<br>}</pre><h3>Step 8: Test the Logic App</h3><ol><li>Click <strong>Save</strong> at the top bar.</li><li>Copy the <strong>HTTP POST URL</strong> from the trigger.</li><li>Use <strong>Postman</strong> or <strong>curl</strong> to test the Logic App.</li></ol><p>For example, in <strong>Postman</strong>, make a <strong>POST</strong> request to:</p><pre>POST https://&lt;your_logic_app_url&gt;<br>Content-Type: application/json<br>{<br>  &quot;city&quot;: &quot;Mumbai&quot;<br>}</pre><p>You should receive a response like:</p><pre>{<br>  &quot;city&quot;: &quot;Mumbai&quot;,<br>  &quot;temperature&quot;: 31.2,<br>  &quot;humidity&quot;: 84,<br>  &quot;weather&quot;: &quot;light rain&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FI7I3gzXr8ZFqHsHVYj5Pw.png" /><figcaption>Response from Postman</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5WoilGte27cbjnZLYqiyg.png" /><figcaption><strong>Flow structure and Response view in Logic app</strong></figcaption></figure><h3>Optional: Expose via API Management (APIM)</h3><p>You can expose this Logic App via <strong>API Management</strong> (APIM) for better security, monitoring, and scalability. To do this, create an API in <strong>Azure API Management</strong>, import the Logic App, and configure access policies as required.</p><h3>Conclusion</h3><p>In this tutorial, you learned how to create an Azure Logic App that fetches weather information for a given city using the OpenWeatherMap API. You can now build upon this app by adding more complex workflows, integrating other APIs, or even exposing it as a public API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a9cee91a2f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Upload CSV to Azure Blob and Insert Rows into SQL DB via Azure Logic App]]></title>
            <link>https://medium.com/@sarathkumar1201/how-to-upload-csv-to-azure-blob-and-insert-rows-into-sql-db-via-azure-logic-app-7f6897599faa?source=rss-5921c8e6661d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f6897599faa</guid>
            <category><![CDATA[logic-apps]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Sarathkumar S]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 11:03:32 GMT</pubDate>
            <atom:updated>2025-06-19T11:03:32.696Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In this tutorial, we’ll walk through the process of uploading a CSV file to Azure Blob Storage, parsing it via an Azure Logic App, and inserting each row into an Azure SQL Database. By the end of this exercise, you will have automated the process of reading a CSV file and populating data into a SQL table, using Logic Apps and Azure services.</p><h3>Prerequisites</h3><p>Before we begin, make sure you have the following:</p><ul><li><strong>Azure Storage Account</strong> with a container</li><li><strong>Sample CSV file</strong> (3–5 columns)</li><li><strong>Azure SQL Database</strong></li><li><strong>Logic App (Standard)</strong></li></ul><h3>Step 1: Prepare the CSV File</h3><p>Start by creating a sample CSV file. The data can look like this:</p><pre>Id,Name,Email,City<br>1,Sarath,sarath@email.com,Trivandrum<br>2,Alice,alice@email.com,New York<br>3,Bob,bob@email.com,Bangalore</pre><p>Save it as Customers.csv.</p><h3>Step 2: Upload CSV to Blob Storage</h3><ol><li>Go to your <strong>Azure Storage Account</strong> in the Azure Portal.</li><li>Click on <strong>Containers</strong> and select the container where you want to upload the file.</li><li>Click <strong>Upload</strong> and select your Customers.csv file from your local machine.</li><li>Once uploaded, your CSV file will be available in Blob Storage for the Logic App to access.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riwP6eFjA3JUdEu2Pzxmqg.png" /></figure><h3>Step 3: Create an Azure SQL Database</h3><ol><li>Go to the <strong>Azure Portal</strong> and search for <strong>SQL Database</strong>.</li><li>Click <strong>Create</strong> and fill in the following details:</li></ol><ul><li><strong>Server</strong>: Create a new server (e.g., sqlserver-sample)</li><li><strong>Database Name</strong>: CustomerDB</li><li><strong>Pricing</strong>: Choose the <strong>Basic</strong> pricing tier (free tier or minimal cost)</li><li><strong>Allow Azure services to access</strong>: Enable this option</li></ul><ol><li>After the database is created, go to the <strong>Query Editor</strong> in the Azure Portal and run the following SQL command to create the table:</li></ol><pre>CREATE TABLE Customers (<br>    Id INT,<br>    Name NVARCHAR(50),<br>    Email NVARCHAR(100),<br>    City NVARCHAR(50)<br>);</pre><p>This will create a table in your database to store customer data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l75-FDAw_HLcP_54gLPeNg.png" /></figure><h3>Step 4: Create Logic App &amp; Start Workflow</h3><ol><li>Go to <strong>Logic Apps</strong> in the Azure Portal and click <strong>Create</strong>.</li><li>Choose the following options:</li></ol><ul><li><strong>Region</strong>: Select your region</li><li><strong>Name</strong>: CsvProcessFlow</li><li><strong>Plan</strong>: <strong>Standard</strong></li></ul><ol><li>Click <strong>Create</strong> and wait for the Logic App to be deployed.</li><li>Once deployed, go to your Logic App and click on <strong>Workflows</strong> → <strong>Add Workflow</strong>.</li><li>Name the workflow CsvProcessFlow, choose <strong>Stateful</strong>, and click <strong>Create</strong>.</li></ol><h3>Step 5: Define Logic App Workflow</h3><h4>1. Trigger: When a Blob is Added or Modified (V2)</h4><p>This trigger will start the Logic App whenever a new CSV file is added or modified in the Blob storage.</p><ul><li>Select <strong>When a blob is added or modified (V2)</strong>.</li><li>Choose the <strong>Storage account</strong> and <strong>Container</strong> where the CSV file is stored.</li><li>Set the <strong>Blob path</strong> to the name of the CSV file (Customers.csv).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*t-qn5OFbDnVxaAlZ7cuQHg.png" /></figure><h4>2. Action 1: Get Blob Content (V2)</h4><ul><li>Add a new action and search for <strong>Get blob content (V2)</strong>.</li><li>Create a <strong>Storage connection</strong> if it’s not created already.</li><li>In <strong>File Path</strong>, select the CSV file you uploaded.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*NREMVnyHHM13qNCgc7QSjQ.png" /></figure><h4>3. Action 2: Compose</h4><ul><li>Add a <strong>Compose</strong> action.</li><li>For the <strong>Input</strong>, select the <strong>File Content</strong> from the previous action (this will be the raw CSV data).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*DDY2Bk5HXayHoMRQCWEH2A.png" /></figure><h4>4. Action 3: Inline Code (JavaScript or Python)</h4><ul><li>Add an <strong>Inline Code</strong> action.</li><li>Use the following <strong>JavaScript</strong> to parse the CSV content and convert it to a JSON array:</li></ul><pre>const csv = workflowContext.actions.Compose.outputs;<br>const lines = csv.trim().split(&#39;\n&#39;);<br>const headers = lines[0].split(&#39;,&#39;);<br>return lines.slice(1).map(line =&gt; {<br>  const values = line.split(&#39;,&#39;);<br>  return {<br>    Id: values[0],<br>    Name: values[1],<br>    Email: values[2],<br>    City: values[3]<br>  };<br>});</pre><p>This JavaScript will split the CSV by line and then by columns, outputting a JSON array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*55RXMbzNt495Awj0A07Z1g.png" /></figure><h4>5. Action 4: For Each Loop</h4><ul><li>Add a <strong>For each</strong> action to loop over the parsed JSON array.</li><li>In the <strong>Items</strong> field, select the output of the <strong>Inline Code</strong> action.</li></ul><p>Inside the loop, we will insert each row into the SQL Database.</p><h4>6. Action 5: Insert Row (V2)</h4><ul><li>Inside the loop, add an action for <strong>Insert Row (V2)</strong>.</li><li>Configure the <strong>SQL Server connection</strong>.</li><li>Choose the <strong>Database</strong> (CustomerDB) and the <strong>Table</strong> (Customers).</li><li>Map the fields from the parsed JSON to the SQL table columns:</li><li>Id → items(&#39;For_each&#39;)?[&#39;Id&#39;]</li><li>Name → items(&#39;For_each&#39;)?[&#39;Name&#39;]</li><li>Email → items(&#39;For_each&#39;)?[&#39;Email&#39;]</li><li>City → items(&#39;For_each&#39;)?[&#39;City&#39;]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*TdLq-1SA9sy94_juQ1e8fw.png" /><figcaption>Connection to SQL</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*tmXD8P5RrAi3qOdRxUADYg.png" /></figure><h3>Step 6: Test the Logic App</h3><ol><li>Upload a new version of the <strong>Customers.csv</strong> file to Blob Storage.</li><li>This will trigger the Logic App, which will parse the CSV and insert the rows into the <strong>Customers</strong> table in your <strong>SQL Database</strong>.</li><li>To confirm the data was inserted, go to your <strong>SQL Database</strong> in the Azure Portal and check the <strong>Customers</strong> table.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*xMAgKwhKT0sPFH7nHO4LYA.png" /><figcaption>Upload csv file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mn69AwwDAj0YX_mxi7MMUg.png" /><figcaption>Check Azure SQL table</figcaption></figure><h3>Conclusion</h3><p>In this exercise, we learned how to upload a CSV file to <strong>Azure Blob Storage</strong>, trigger an <strong>Azure Logic App</strong>, and automatically insert the rows into an <strong>Azure SQL Database</strong>. This is a powerful automation workflow that can be extended to handle more complex CSV files and integrations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f6897599faa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>