{"id":43140,"date":"2025-12-22T17:44:00","date_gmt":"2025-12-22T12:14:00","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=43140"},"modified":"2025-12-23T09:45:09","modified_gmt":"2025-12-23T04:15:09","slug":"automating-business-pdfs-using-azure-document-intelligence-and-power-automate","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2025\/12\/automating-business-pdfs-using-azure-document-intelligence-and-power-automate\/","title":{"rendered":"Automating Business PDFs Using Azure Document Intelligence and Power Automate"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43142\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-scaled.png\" alt=\"\" width=\"2560\" height=\"1463\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-scaled.png 2560w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-2048x1170.png 2048w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Build-Environment-Aware-Flows-by-Fetching-CRM-Metadata-Dynamically-1-660x377.png 660w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>In today\u2019s data-driven enterprises, critical business information often arrives in the form of PDFs\u2014bank statements, invoices, policy documents, reports, and contracts. Although these files contain valuable information, turning them into structured, reusable data or finalized business documents often requires significant manual effort and is highly error-prone.<br \/>\nBy leveraging Azure Document Intelligence (for PDF data extraction), Azure Functions (for custom business logic), and Power Automate (for workflow orchestration) together, businesses can create a seamless automation pipeline that interprets PDF content, transforms extracted information through business rules, and produces finalized documents automatically, eliminating repetitive manual work and improving overall efficiency.<br \/>\nIn this blog, we will explore how these Azure services work together to automate document creation from business PDFs in a scalable and reliable way.<\/p>\n<h3><strong>Use Case: Automatically Converting Bank Statement PDFs into CSV Files<\/strong><\/h3>\n<p>Let\u2019s consider a potential use case.<br \/>\nThe finance team receives bank statements as PDF attachments in a shared mailbox on a regular basis. These statements contain transaction details in tabular format, but extracting the data manually into Excel or CSV files is time-consuming and often leads to formatting issues such as broken rows, missing dates, and incorrect debit or credit values.<br \/>\nThe goal is to automatically process these emailed PDF bank statements as soon as they arrive, extract the transaction data accurately, and generate a clean, structured CSV file that can be directly used for reconciliation and financial reporting.<br \/>\nBy using Power Automate to monitor incoming emails, Azure Document Intelligence to analyze the PDFs, and Azure Functions to apply custom data-cleaning logic, the entire process can be automated, eliminating manual effort and ensuring consistent, reliable output.<br \/>\nLet\u2019s walk through the steps below to achieve this requirement.<\/p>\n<p><strong>Prerequisites:<\/strong><\/p>\n<p>Before we get started, we need to have the following things ready:<br \/>\n\u2022 Azure subscription.<br \/>\n\u2022 Access to Power Automate to create email-triggered flows.<br \/>\n\u2022 Visual Studio 2022<\/p>\n<h3><strong>Step 1:<\/strong><\/h3>\n<p>Navigate to the Azure portal (<a href=\"https:\/\/portal.azure.com\" target=\"_blank\" rel=\"noopener\">https:\/\/portal.azure.com<\/a>), search for the Azure Document Intelligence service, and click Create to provision a new resource.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43143\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"1286\" height=\"515\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure.jpg 1286w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure-300x120.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure-1024x410.jpg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure-768x308.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/1MicrosoftAzure-660x264.jpg 660w\" sizes=\"(max-width: 1286px) 100vw, 1286px\" \/><\/p>\n<h3>Step 2:<\/h3>\n<p>Choose Azure subscription 1 as the subscription, create a new resource group, enter an appropriate name for the Document Intelligence instance, select the desired pricing tier, and click Review + Create to proceed.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43144\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/2MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"956\" height=\"814\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/2MicrosoftAzure.jpg 956w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/2MicrosoftAzure-300x255.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/2MicrosoftAzure-768x654.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/2MicrosoftAzure-660x562.jpg 660w\" sizes=\"(max-width: 956px) 100vw, 956px\" \/><\/p>\n<h3>Step 3:<\/h3>\n<p>After reviewing the configuration, click Create and wait for the deployment to complete. Once the deployment is finished, select Go to resource.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43145\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"1445\" height=\"664\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure.jpg 1445w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure-300x138.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure-1024x471.jpg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure-768x353.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/3MicrosoftAzure-660x303.jpg 660w\" sizes=\"(max-width: 1445px) 100vw, 1445px\" \/><\/p>\n<h3>Step 4:<\/h3>\n<p>Navigate to the newly created Document Intelligence resource, and make a note of the endpoint and any one of the keys listed at the bottom of the page.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43146\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"1605\" height=\"810\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure.jpg 1605w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure-300x151.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure-1024x517.jpg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure-768x388.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure-1536x775.jpg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/4MicrosoftAzure-660x333.jpg 660w\" sizes=\"(max-width: 1605px) 100vw, 1605px\" \/><\/p>\n<h3>Step 5:<\/h3>\n<p>Create a new Azure Function in Visual Studio 2022 using an HTTP trigger with the .NET isolated worker model, and add the following code.<\/p>\n<pre class=\"lang:css gutter:true start:1\">[Function(\"PdfToCsvExtractor\")]\r\npublic async Task Run(\r\n[HttpTrigger(AuthorizationLevel.Anonymous, \"post\")] HttpRequest req)\r\n{\r\n_logger.LogInformation(\"Form Recognizer extraction triggered.\");\r\n\r\n\/\/ Accept either multipart\/form-data (file field) OR raw application\/pdf bytes.\r\nStream pdfStream = null;\r\n\r\ntry\r\n{\r\n\/\/ If content-type is multipart\/form-data =&gt; read form and file\r\nif (req.HasFormContentType)\r\n{\r\nvar form = await req.ReadFormAsync();\r\nvar file = form.Files?.FirstOrDefault();\r\nif (file == null || file.Length == 0)\r\nreturn new BadRequestObjectResult(\"No file was uploaded in the multipart form-data.\");\r\n\r\npdfStream = new MemoryStream();\r\nawait file.CopyToAsync(pdfStream);\r\npdfStream.Position = 0;\r\n}\r\nelse\r\n{\r\n\/\/ Otherwise expect raw PDF bytes with Content-Type: application\/pdf\r\nif (!req.Body.CanRead)\r\nreturn new BadRequestObjectResult(\"Request body empty.\");\r\n\r\npdfStream = new MemoryStream();\r\nawait req.Body.CopyToAsync(pdfStream);\r\npdfStream.Position = 0;\r\n}\r\n\r\nstring endpoint = Environment.GetEnvironmentVariable(\"FORM_RECOGNIZER_ENDPOINT\");\r\nstring key = Environment.GetEnvironmentVariable(\"FORM_RECOGNIZER_KEY\");\r\nif (string.IsNullOrEmpty(endpoint) || string.IsNullOrEmpty(key))\r\nreturn new BadRequestObjectResult(\"Missing Form Recognizer environment variables.\");\r\n\r\nvar credential = new AzureKeyCredential(key);\r\nvar client = new DocumentAnalysisClient(new Uri(endpoint), credential);\r\n\r\nvar operation = await client.AnalyzeDocumentAsync(\r\nWaitUntil.Completed,\r\n\"prebuilt-document\",\r\npdfStream\r\n);\r\nvar result = operation.Value;\r\n_logger.LogInformation(\"pdfstream: \" + pdfStream);\r\n\r\n_logger.LogInformation(\"Result: \"+ result.Tables.ToList());\r\n\r\n\/\/ returns raw JSON table data\r\nvar filteredTables = result.Tables.ToList());\r\nif (filteredTables.Count == 0)\r\nreturn new BadRequestObjectResult(\"No transaction table found.\");\r\n\r\nstring csvOutput = BuildCsvFromTables(filteredTables);\r\n\r\nvar csvBytes = Encoding.UTF8.GetBytes(csvOutput);\r\n\r\nvar emailResult = await SendEmailWithCsvAsync(\r\n_logger,\r\ncsvBytes,\r\n\"ExtractedTable.csv\");\r\n\r\nreturn new OkObjectResult(\u201cTable data extracted and exported to csv file\u201d);\r\n}\r\ncatch (Exception ex)\r\n{\r\n_logger.LogError(ex, ex.Message);\r\nreturn new StatusCodeResult(500);\r\n}\r\nfinally\r\n{\r\npdfStream?.Dispose();\r\n}\r\n}\r\n\r\n\/\/method to create csv file\r\nprivate string BuildCsvFromTables(IReadOnlyList tables)\r\n{\r\nvar csvBuilder = new StringBuilder();\r\n\/\/ Write CSV header\r\ncsvBuilder.AppendLine(\"Date,Transaction,Debit,Credit,Balance\");\r\nforeach (var table in tables)\r\n{\r\n\/\/ Group cells by row index\r\nvar rows = table.Cells\r\n.GroupBy(c =&gt; c.RowIndex)\r\n.OrderBy(g =&gt; g.Key);\r\nforeach (var row in rows)\r\n{\r\n\/\/ Skip header row (row index 0)\r\nif (row.Key == 0)\r\ncontinue;\r\nvar rowValues = new string[5];\r\nforeach (var cell in row)\r\n{\r\nif (cell.ColumnIndex &lt; rowValues.Length)\r\n{\r\n\/\/ Clean commas and line breaks for CSV safety\r\nrowValues[cell.ColumnIndex] =\r\ncell.Content.Replace(\",\", \" \").Replace(\"\\n\", \" \").Trim();\r\n}\r\n}\r\ncsvBuilder.AppendLine(string.Join(\",\", rowValues));\r\n}\r\n}\r\nreturn csvBuilder.ToString();\r\n}\r\n\r\n\/\/ method to send csv file as an attachment to an email\r\npublic async Task SendEmailWithCsvAsync(\r\nILogger log,\r\nbyte[] csvBytes,\r\nstring csvFileName)\r\n{\r\nlog.LogInformation(\"Inside AzureSendEmailOnSuccess\");\r\n\r\nstring clientId = Environment.GetEnvironmentVariable(\"InogicFunctionApp_client_id\");\r\nstring clientSecret =Environment.GetEnvironmentVariable(\"InogicFunctionApp_client_secret\");\r\nstring tenantId = Environment.GetEnvironmentVariable(\"Tenant_ID\");\r\nstring receiverEmail = Environment.GetEnvironmentVariable(\"ReceiverEmail\");\r\nstring senderEmail = Environment.GetEnvironmentVariable(\"SenderEmail\");\r\n\r\nvar missing = new List();\r\n\r\nif (string.IsNullOrEmpty(clientId)) missing.Add(nameof(clientId));\r\nif (string.IsNullOrEmpty(clientSecret)) missing.Add(nameof(clientSecret));\r\nif (string.IsNullOrEmpty(tenantId)) missing.Add(nameof(tenantId));\r\nif (string.IsNullOrEmpty(receiverEmail)) missing.Add(nameof(receiverEmail));\r\nif (string.IsNullOrEmpty(senderEmail)) missing.Add(nameof(senderEmail));\r\n\r\nif (missing.Count &gt; 0)\r\n{\r\nreturn new BadRequestObjectResult(\r\nnew { message = \"Missing: \" + string.Join(\", \", missing) }\r\n);\r\n}\r\n\r\nvar app = ConfidentialClientApplicationBuilder\r\n.Create(clientId)\r\n.WithClientSecret(clientSecret)\r\n.WithAuthority($\"https:\/\/login.microsoftonline.com\/{tenantId}\")\r\n.Build();\r\n\r\nvar result = await app.AcquireTokenForClient(\r\nnew[] { \"https:\/\/graph.microsoft.com\/.default\" })\r\n.ExecuteAsync();\r\n\r\nstring token = result.AccessToken;\r\n\r\nstring emailBody =\r\n\"Hello,\r\n\r\n\"\r\n+ \"Please find attached the extracted CSV.\r\n\r\n\"\r\n+ \"Regards,\r\nInogic Developer.\";\r\n\r\nvar attachment = new Dictionary&lt;string, object&gt;\r\n{\r\n{ \"@odata.type\", \"#microsoft.graph.fileAttachment\" },\r\n{ \"name\", csvFileName },\r\n{ \"contentType\", \"text\/csv\" },\r\n{ \"contentBytes\", Convert.ToBase64String(csvBytes) }\r\n};\r\n\r\nvar emailPayload = new Dictionary&lt;string, object&gt;\r\n{\r\n{\r\n\"message\",\r\nnew Dictionary&lt;string, object&gt;\r\n{\r\n{ \"subject\", \"Extracted PDF Table CSV\" },\r\n{\r\n\"body\",\r\nnew Dictionary&lt;string, object&gt;\r\n{\r\n{ \"contentType\", \"HTML\" },\r\n{ \"content\", emailBody }\r\n}\r\n},\r\n{\r\n\"toRecipients\",\r\nnew[]\r\n{\r\nnew Dictionary&lt;string, object&gt;\r\n{\r\n{\r\n\"emailAddress\",\r\nnew Dictionary&lt;string, object&gt;\r\n{\r\n{ \"address\", receiverEmail }\r\n}\r\n}\r\n}\r\n}\r\n},\r\n{ \"attachments\", new[] { attachment } }\r\n}\r\n},\r\n{ \"saveToSentItems\", \"false\" }\r\n};\r\n\r\nstring json = JsonSerializer.Serialize(emailPayload);\r\n\r\nusing var httpClient = new HttpClient();\r\nhttpClient.DefaultRequestHeaders.Authorization =\r\nnew System.Net.Http.Headers.AuthenticationHeaderValue(\"Bearer\", token);\r\n\r\nvar httpContent = new StringContent(json, Encoding.UTF8, \"application\/json\");\r\n\r\nvar response = await httpClient.PostAsync(\r\n$\"https:\/\/graph.microsoft.com\/v1.0\/users\/{senderEmail}\/sendMail\",\r\nhttpContent\r\n);\r\n\r\nif (response.IsSuccessStatusCode)\r\nreturn new OkObjectResult(\"CSV Email sent successfully.\");\r\n\r\nstring errorBody = await response.Content.ReadAsStringAsync();\r\nlog.LogError($\"Graph Error: {response.StatusCode} - {errorBody}\");\r\nreturn new StatusCodeResult(500);\r\n}<\/pre>\n<h3><strong>Step 6:<\/strong><\/h3>\n<p>Build the Azure Function project in Visual Studio and publish it to the Azure portal.<\/p>\n<h3>Step 7:<\/h3>\n<p>Open <a href=\"https:\/\/make.powerautomate.com\" target=\"_blank\" rel=\"noopener\">https:\/\/make.powerautomate.com<\/a> and create a new cloud flow using the When a new email arrives in a shared mailbox (V2) trigger. Enter the shared mailbox email address in Original Mailbox Address, and set both Only with Attachments and Include Attachments to Yes.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43147\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/5MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"789\" height=\"544\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/5MicrosoftAzure.jpg 789w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/5MicrosoftAzure-300x207.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/5MicrosoftAzure-768x530.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/5MicrosoftAzure-660x455.jpg 660w\" sizes=\"(max-width: 789px) 100vw, 789px\" \/><\/p>\n<h3>Step 8:<\/h3>\n<p>Add a Condition action to verify that the attachment type is PDF.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43148\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"1532\" height=\"489\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure.jpg 1532w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure-300x96.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure-1024x327.jpg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure-768x245.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/6MicrosoftAzure-660x211.jpg 660w\" sizes=\"(max-width: 1532px) 100vw, 1532px\" \/><\/p>\n<h3>Step 9:<\/h3>\n<p>If the condition is met, in the Yes branch add the Get Attachment (V2) action. Configure Message Id using the value from the trigger and Attachment Id using the value from the current loop item and the email address of the shared mailbox.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43149\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/7MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"772\" height=\"427\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/7MicrosoftAzure.jpg 772w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/7MicrosoftAzure-300x166.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/7MicrosoftAzure-768x425.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/7MicrosoftAzure-660x365.jpg 660w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/p>\n<h3>Step 10:<\/h3>\n<p>Add a Compose action to convert the attachment content bytes to Base64 using the following expression:<br \/>\nbase64(outputs(&#8216;Get_Attachment_(V2)&#8217;)?[&#8216;body\/contentBytes&#8217;])<\/p>\n<h3>Step 11:<\/h3>\n<p>Add another Compose action to convert the Base64 output from the previous step into a string using:<br \/>\nbase64ToString(outputs(&#8216;Compose&#8217;))<\/p>\n<h3>Step 12:<\/h3>\n<p>Add an HTTP (Premium) action, set the method to POST, provide the URL of the published Azure Function, and configure the request body as shown below:<\/p>\n<pre class=\"lang:css gutter:true start:1\">{\r\n\"$content-type\": \"application\/pdf\",\r\n\"$content\": \"@{outputs('Compose_2')}\"\r\n}<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43150\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/8MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"633\" height=\"788\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/8MicrosoftAzure.jpg 633w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/8MicrosoftAzure-241x300.jpg 241w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>To test the setup, send an email to the shared mailbox with the sample PDF attached.<br \/>\nNote: For demonstration purposes, a simplified one-page bank statement PDF is used. Real-world bank statements may contain multi-page tables, wrapped rows, and inconsistent layouts, which are handled through additional parsing logic.<\/p>\n<h3>Input PDF file:<\/h3>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43151\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"1228\" height=\"784\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure.jpg 1228w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure-300x192.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure-1024x654.jpg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure-768x490.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/9MicrosoftAzure-660x421.jpg 660w\" sizes=\"(max-width: 1228px) 100vw, 1228px\" \/><\/p>\n<h3>Output CSV file:<\/h3>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-43152\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/10MicrosoftAzure.jpg\" alt=\"Azure Document Intelligence\" width=\"937\" height=\"345\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/10MicrosoftAzure.jpg 937w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/10MicrosoftAzure-300x110.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/10MicrosoftAzure-768x283.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/12\/10MicrosoftAzure-660x243.jpg 660w\" sizes=\"(max-width: 937px) 100vw, 937px\" \/><\/p>\n<h3><strong>Conclusion:<\/strong><\/h3>\n<p>This blog demonstrated how an email-driven automation pipeline can simplify the processing of business PDFs by converting them into structured, usable data.<br \/>\nBy combining Power Automate for orchestration, Azure Functions for custom processing, and Azure Document Intelligence for AI-based document analysis, organizations can build scalable, reliable, and low-maintenance document automation solutions that eliminate manual effort and reduce errors.<\/p>\n<h3>Frequently Asked Questions:<\/h3>\n<p><strong>1. What is Azure Document Intelligence used for?<\/strong><br \/>\nAzure Document Intelligence is used to extract structured data from unstructured documents such as PDFs, images, invoices, receipts, contracts, and bank statements using AI models.<\/p>\n<p><strong>2. How does Azure Document Intelligence extract data from PDF files?<\/strong><br \/>\nIt analyzes PDF content using prebuilt or custom AI models to identify text, tables, key-value pairs, and document structure, and returns the extracted data in a structured JSON format.<\/p>\n<p><strong>3. Can Power Automate process PDF attachments automatically?<\/strong><br \/>\nYes. Power Automate can automatically detect incoming PDF attachments from email, SharePoint, or OneDrive and trigger workflows to process them using Azure services.<\/p>\n<p><strong>4. How do Azure Functions integrate with Power Automate?<\/strong><br \/>\nPower Automate can call Azure Functions via HTTP actions, allowing custom business logic, data transformation, and validation to run as part of an automated workflow.<\/p>\n<p><strong>5. Is Azure Document Intelligence suitable for bank statements and invoices?<\/strong><br \/>\nYes. Azure Document Intelligence can accurately extract tables, transaction data, and key fields from bank statements, invoices, and other financial documents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s data-driven enterprises, critical business information often arrives in the form of PDFs\u2014bank statements, invoices, policy documents, reports, and contracts. Although these files contain valuable information, turning them into structured, reusable data or finalized business documents often requires significant manual effort and is highly error-prone. By leveraging Azure Document Intelligence (for PDF data extraction),\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2025\/12\/automating-business-pdfs-using-azure-document-intelligence-and-power-automate\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,1985,2361],"tags":[],"class_list":["post-43140","post","type-post","status-publish","format-standard","hentry","category-azure-functions","category-power-automate","category-technical"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/43140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=43140"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/43140\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=43140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=43140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=43140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}