Tag Archives: power automate
Monitoring Job Queues: Setting Up Failure Notifications using Power Automate
A job queue lets users set up and manage background tasks that run automatically. These tasks can be scheduled to run on a recurring schedule. For a long time, users had a common problem in Business Central when a job queue failed, there was no alert or warning. You’d only notice something was wrong when a regular task didn’t run for a few days. Some people tried to fix this by setting up another job queue to watch and restart failed ones.But that didn’t always work, especially if an update happened at the same time. Now, Microsoft has finally added a built-in way to get alerts when a job queue fails. You can get notified either inside Business Central or by using Business Events. In this blog, we’ll see the process of leveraging the Business Events to set up notifications on job queue statuses. Configuration Search for “Assisted Setup” in Business Central’s global search. Scroll down till “Set up Job Queue notifications”. Click on Next. Add the additional users who need to be notified when the job queue fails along with the job creator (if required). Choose whether you want the notification to be in-product or using Business Events (and Power Automate). I’m choosing Business Events this time and then Next. Click on Finish. Then search for Job Queue Entries and from that list page open the Job Queue Entry card. If you are using Power Automate for the first time, then it will ask you for your consent. As an Administrator, if you want to give the consent for all of the Users at once or revoke the consent for all the Users then you can do so via the Privacy Notice statuses page. Then, go back to the Job Queue Entry card and click on Power Automate again.This time, you’ll get the option to create an automated flow. In the pop up screen, you’ll get the template for a job queue entry failure notification flow. Once you click on it, it’ll ask you to sign into Business Central as well as the outlook account that’ll be used to send the emails (if different from the current user). In the next screen, you can add additional users that need to be copied on the notifications. Click on “Create Flow” and you are done! Ideally, the setup should have worked at this point—but it didn’t. After some digging, I found out that the Power Automate flow was missing some key pieces. One of the actions didn’t have the environment configured, and another action (GetUrlV3) isn’t even available in the current (v25) version of Business Central. I came across two forum thread (1) (2) about this issue, but they had no clear solution. So, as a workaround, I created a Web Service based on the Job Queue Entries Log page and used the GetRecord action in Power Automate to fetch the required data. It wasn’t too hard for me since I knew what to look for; but for a new user, this would’ve been very confusing. Also, I noticed something odd: the action that picks the email address of the person to notify was pulling it from the Contact Email field on the User Card, instead of using User Setup, which would’ve made more sense. Anyway, after all that, here’s what the final solution looks like! To conclude, setting up job queue failure alerts with Business Events is a helpful new feature in Business Central. It lets you know when background tasks fail, so you don’t have to keep checking them manually. But as we saw, the setup doesn’t always work perfectly. Some parts were missing, and a few things didn’t make sense like where it pulls the email from. If you’re familiar with Power Automate, you can fix these issues with a few extra steps. For someone new, though, it might be a bit confusing. Hopefully, Microsoft will improve the setup in future updates. Until then, this blog should help you get the alerts working without too much trouble. If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.
Configuring OAuth 2.0 Authentication in Power Automate
In today’s automated world, businesses depend on secure, streamlined connections between systems to improve efficiency. Power Automate, a robust tool for building workflows between various services, allows seamless integration of applications and APIs. However, when working with third-party services, ensuring that data access is secure and well-managed is critical. This is where OAuth 2.0, a secure and standard protocol for authorization, comes into play. Are you struggling to configure OAuth 2.0 authentication in your Power Automate flows? If you are considering automating workflows that interact with secured APIs, this article is for you. I will walk you through configuring OAuth 2.0 in Power Automate, so you can ensure the safety of your automation while keeping your services accessible. Why OAuth 2.0? OAuth 2.0 is the industry-standard protocol for authorization. It allows users to grant third-party applications limited access to their resources without exposing passwords. By using OAuth 2.0 in Power Automate, you ensure that the services and APIs you connect to are secure, and that tokens are used to access data on behalf of the user. How OAuth 2.0 Enhances Security OAuth 2.0 significantly improves security by eliminating the need to share sensitive credentials. Instead, access is granted through tokens, which are time-limited and easily revocable. OAuth 2.0 is widely used by many companies, including Microsoft, Google, and Salesforce, to integrate applications securely. Step-by-Step Guide to Configuring OAuth 2.0 in Power Automate 1. Set Up OAuth 2.0 Credentials Before configuring OAuth 2.0 in Power Automate, you need to set up OAuth 2.0 credentials in the platform you’re working with. For example, if you’re using Microsoft Graph API or any third-party service, follow these steps: 2. Initialize OAuth 2.0 Variables in Power Automate Now that you have your client ID and client secret, it’s time to configure them in Power Automate. Set up the variables: 3. Configuring the OAuth 2.0 Connection in Power Automate With the client credentials set, it’s time to establish the connection to the service using OAuth 2.0. 4. Use OAuth Token to Access Secure Data Now that you have the OAuth token, you can use it to authenticate your requests to third-party APIs. 5. Best Practices for OAuth 2.0 in Power Automate To conclude, OAuth 2.0 authentication provides a secure and effective way to authorize third-party applications in Power Automate. By following the steps outlined in this guide, you can set up OAuth 2.0 authentication, ensure data security, and integrate third-party services into your automation workflows with ease. If you’re ready to secure your Power Automate workflows with OAuth 2.0, follow the steps outlined in this post and start integrating APIs in a secure manner today. For more tips and detailed guides, check out our other blog posts on Power Automate and API integration. Need help with the OAuth 2.0 integration? Feel free to reach out for assistance! We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
How to Perform Data Transformation in Microsoft Dataverse
Microsoft Dataverse is a powerful data platform that supports secure and scalable data storage for business applications. However, raw data imported into Dataverse often needs transformation—cleaning, reshaping, filtering, or merging—to make it useful and reliable for apps and analytics. In this blog, we’ll show you how to apply transformations to data before or after it reaches Dataverse using tools like Power Query, Dataflows, and business rules—ensuring you always work with clean, structured, and actionable data. What is Data Transformation in Dataverse? Why Data Transformation Matters Data transformation refers to modifying data’s structure, content, or format before or after it’s stored in Dataverse. This includes: Step-by-Step Guide: Connecting a Database to Dataverse Step 1: Open the Power Apps and select the proper Environment Step 2: Open Dataflow in Power Apps and create a new Dataflow Step 3: Connect to the Database using SQL Server Database. Step 4: Add the required credentials to make the connection between the database and Dataverse. Step 5: Add the transformation in the Dataverse Step 6: Add proper mapping of the column and find the unique ID of the table Step 7: Set the schedule refresh and publish the Dataflow. Step 8: Once Dataflow is published, we can see the table in the Power apps To conclude, transforming data in Dataverse is key to building reliable and high-performing applications. Whether using Power Query, calculated columns, or Power Automate, you can ensure your data is clean, structured, and actionable. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com. Ready to improve your Dataverse data quality? Start with a simple dataflow or calculated column today, and empower your business applications with better, transformed data.
From Commit to Inbox: Automating Change Summaries with Azure AI
In our small development team, we usually merge code without formal pull requests. Instead, changes are committed directly by the developer responsible for the project, and while I don’t need to approve every change in my role as the senior developer, I still need to stay aware of what’s being merged. Manually reviewing each commit was becoming too time-consuming, so I built an automated process using Power Automate, Azure DevOps, and Azure AI.Now, whenever a commit is made, it triggers a workflow that summarizes the changes and sends me an email.This simple system keeps me informed without slowing down the team’s work. Although I kept the automation straightforward, it could easily be extended further.For example, it could be improved to allow me to reply directly to the committer from the email or even display file changes in detail using a text comparison feature in Outlook.We didn’t need that level of detail, but it’s a good option if deeper insights are ever required. Journey We get started with the Azure DevOps trigger “When a code is pushed”. Here we specify the organization name, project name and repository name. We can also specify a specific branch if we want to limit our tracking to simply that branch otherwise it tracks all the available branches to the User. Then we have a foreach loop that iterates over the “Ref Updates” object array. It contains a list of all the changes but not the exact details.This action pops up automatically as well when we configure the next action. Then we set up a “Azure DevOps REST API request to invoke” action. This has connection capabilities to Azure DevOps directly so it is better to use over a simple REST API action. We specify the relative URL as {Repository Name}/_apis/git/repositories/{Repository ID}/commits/{Commit ID}/changes?api-version=6.0 The Commit ID shows up as newObjectId in the “When code is pushed” trigger. Then we pass the output of this action to a “Create Text with GPT using a prompt” action under the AI Builder group.I’ve passed the prompt as below but it took several trials and errors to get exactly what I wanted. The last action is a simple “Send an email” one where I’ve kept myself as a recepient and I’ve added a subject and a body. Now to put it all together and run it – And here is the final output – When the hyperlinks are clicked they take me straight to azure while pointing to the file which is referred. For instance, if I click on the Events Codeunit – Conclusion Summarizing commit changes is just one way automation can make life easier.This same idea can be applied to other tasks, like summarizing meeting notes, project updates, or customer feedback.With a bit of creativity, we can use tools like this to cut down on repetitive work and free up time to focus on learning new skills or tackling more challenging projects.By finding smart ways to streamline our workflows, we can work more efficiently and open up more time for growth and development. If you need further assistance or have specific questions about your ERP setup, feel free to reach out for personalized guidance. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.
Data Flow with Array Filtering in Power Automate
When working with arrays in Power Automate, it’s common to need to filter or select a specific item based on certain attributes. Whether you’re handling JSON data from an API, processing records from a list, or managing dynamic content within a flow, efficiently identifying the right item is key. In this blog, we’ll explore a simple yet effective method to extract the desired item from an array using expressions in Power Automate. By the end, you’ll have a clear strategy to streamline your workflows and enhance the intelligence of your automation. In case you need to select an item from an array in Power Automate based on the value of a certain attribute, here’s how you can do it. Scenario You have an array of objects, and each object has a specific attribute. You want to efficiently select the object(s) where this attribute matches a particular value. As you see, the array of objects have different structure – All of them have an attribute called “key” and that’s the one you want to select and then process further. Let’s see how we do it. Filter Array Let’s see how you can select the item from the array based on the value of the “key” attribute instead of looping through all the items and matching. To encapsulate, by using this approach, you can efficiently select specific items from an array based on the value of a particular attribute, making your Power Automate flows more dynamic and tailored to your specific needs. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.
Mastering Concurrency in Power Automate: An Essential Guide for Optimized Workflows
Introduction Power Automate has revolutionized process automation by offering a low-code platform for building efficient workflows. However, when dealing with large-scale data or simultaneous operations, concurrency becomes a critical concept. Understanding and managing concurrency ensures that workflows run smoothly without performance bottlenecks or data integrity issues. In this blog, we’ll explore the concept of concurrency in Power Automate, its implications, and how to configure it effectively. Along the way, we’ll illustrate the topic with a practical example to help you grasp its real-world application. 1. What Is Concurrency in Power Automate? Concurrency refers to the ability of a workflow to execute multiple iterations or steps simultaneously. While concurrency can significantly speed up workflows, it must be handled carefully to avoid conflicts, particularly when working with shared resources or sequential processes. 2. Why Concurrency Matters Managing concurrency effectively can: However, improper configuration can lead to issues like data overwrites, skipped steps, or exceeding service limits. 3. Configuring Concurrency in Power Automate a) Setting Concurrency in Loop Actions Loop actions (e.g., “Apply to each”) in Power Automate have a concurrency control setting that determines how many items can be processed in parallel. b) Default Setting: By default, loops run sequentially. 4. Practical Example: Parallel Processing for Email Notifications a) Scenario: Your organization frequently sends mass email notifications to users based on CRM data. Using sequential processing causes delays, especially for large datasets. b) Solution: Implement a Power Automate workflow with concurrency enabled: Trigger: The workflow starts with a scheduled recurrence trigger or a Dataverse event. Data Retrieval: Fetch user data from Dataverse or SharePoint. Apply to Each: Enable concurrency control for the “Apply to Each” loop. Set a parallelism degree of 5 to process 5 emails simultaneously. Send Email: Each iteration sends an email notification to a user. Error Handling: Use retry policies or error-handling branches to manage failures. Outcome: The workflow completes email notifications significantly faster, improving operational efficiency while maintaining reliability. Following image contains settings of ‘Apply to Each’ action in Power Automate 5. Key Considerations and Best Practices a) Identify Dependencies: Avoid enabling concurrency for workflows with interdependent steps. b) Service Limits: Check Power Automates limits to prevent throttling. c) Monitor Performance: Use Power Automate analytics to monitor workflow performance and adjust settings as needed. d) Test Before Deployment: Ensure workflows behave as expected under concurrent execution. Conclusion Concurrency in Power Automate is a powerful tool for optimizing workflows, especially when handling bulk operations or parallel tasks. By understanding its settings and best practices, you can design workflows that are both efficient and reliable. I hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.
How to Send D365 CRM Emails with Attachments Using Power Automate
Introduction In this guide, we’ll walk through the process of sending emails from D365 CRM with attachments using Power Automate. This step-by-step approach will help you understand how to automate your email communications from CRM with attachments efficiently. Use-Case Let’s say you’re working on a project where you need to send emails from D365 CRM that include attachments. In this example, the document is stored in SharePoint, and its URL is linked within the CRM record. This setup is common in CRM where files are centrally stored in SharePoint but need to be easily accessible in CRM for email communication and tracking in CRM. However, this approach is versatile—whether you want to attach specific documents, generate them dynamically, or handle a range of file types, it can be adapted to meet your use-case needs. Why this solution? Main objective of using D365 Emails is the ability to track the emails to the record to keep track of communications in timeline. Also, manually attaching documents to each email is time-consuming and prone to errors. With Power Automate, you can automate this process, ensuring that every email includes the right attachment without extra steps. This solution not only saves time but also reduces the risk of sending incorrect or outdated files, keeping your communications accurate and efficient. Implementation – Step by Step As per my use-case, I have added a column in Accounts table that will hold my SharePoint file URL which I’ll use in power automate. Step 1: Trigger the Flow when a flag is marked true to send email report. Step 2: Get the file content using SharePoint path Step 3: Create a new ‘Email Message’ record in data verse (Add a new row) Step 4: Add a new row for ‘Attachments’ and link to email message record Add the custom value as shown below Add Base64 to your file content Add file name Step 5: Send the email That’s it Let’s test it – Results Trigger the flag (as per my use-case) The Email record with attachment Conclusion By integrating Power Automate to handle attachments from SharePoint, you streamline your email process, save time, and minimize errors. This solution is especially valuable for cases requiring frequent attachments or centralized file storage, as it keeps communication efficient and files up-to-date. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
How to bulk resolve cases using Power Automate?
Introduction When dealing with a large volume of cases, manually handling each one can be time-consuming and error prone. Thankfully, Microsoft Power Automate provides a powerful solution for automating bulk case resolution, streamlining your workflow, and saving valuable time. Why Automate Bulk Case Resolution? Bulk case resolution involves addressing multiple cases at once, which can be necessary for various reasons, such as resolving customer complaints, updating status, or closing resolved cases. Automating this process can: Getting Started with Power Automate Flows Log in to Power Automate and sign in with your credentials. Start a new flow. Click on ‘Create’ from the left-hand menu and select ‘Automated flow’ for a trigger-based flow or ‘Instant flow’ for a manual trigger. Click on ‘Create’ from the left-hand menu and select “Automated flow” for a trigger-based flow or ‘Instant flow’ for a manual trigger. Add an appropriate Flow Name and also, select the Trigger. Once the trigger has been added to the flow, click on ‘+ New Step’ to add an action to process the cases. We have an Excel sheet that contains the records of the cases to be resolved. So, we add an action of ‘List rows present in a table’. Add a step ‘Apply to Each’ where it iterates through list of cases in the Excel sheet and retrieves the case using ‘Get a row by ID’ Finally, add another step ‘Add a new row’ a record of Case Resolution and pass the Case GUID which resolves the case. Conclusion Automating bulk case resolution with Microsoft Power Automate can significantly improve your team’s efficiency, reduce manual errors, and free up valuable time for more strategic tasks. By setting up flows to handle multiple cases at once, you can streamline your workflow and ensure that cases are resolved quickly and accurately. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
Trigger Power Automate Flow using JavaScript – Bi-Directional
Hi All, This blog will be a continuation of my previous blog – Trigger Power Automate Flow using JavaScript – Uni Directional Now, feedback is essential when sending a request to determine whether it was successfully performed or failed somewhere. You can accomplish this by forwarding a response back from where the flow was invoked. I’ll use the same situation as in my previous blog, where I send a notification by greeting a person’s name if exists, or else I will greet a friend. Check out my previous blog to learn how to build your Flow and JavaScript. Steps to pass the response back within Flow Step 1: Add a response that will be sent back from where the Flow was invoked. Quick Tip: I am checking if ‘Name’ is present in my dynamic content. If yes, then greet the person else greet a Friend Formula: if(contains(triggerBody()?[‘DynamicData’], ‘Name’), triggerBody()?[‘DynamicData’][‘Name’], ‘Friend’) Steps to add into the JavaScript Step 1: Initially we created JS to trigger the flow, now we will add the code snippet to accept the response from Flow. Add the following Code: Step 2: Trigger the JS and watch the output I get as Alert (I have used the console page to trigger my JS for example purposes) Hope this helps in achieving a response from the Power Automate Flow!
Trigger Power Automate Flow using JavaScript – Uni-Directional
Hi All, Did you know you can use JavaScript to trigger Power Automate flows and pass input data? So, I’ll show you how to do that, as well as how to pass strict structured data and dynamic schema in Power Automate. In the next blog, I’ll talk about Trigger Power Automate Flow using JavaScript – Bi-Directional Steps to follow for Initial Setup Step 1: Let’s create a Power Automate Flow and define the input JSON schema.Go to: Power Automate Create an Instant Flow with the trigger ‘When a HTTP request is received‘ Step 2: Let’s outline the input schema and then focus on the output in a ‘Compose’ block. I’ll describe two types of inputs. (Strict and Dynamic).Our strict schema will be identified by a specific pattern indicating how the input should be given.Our dynamic schema will be recognised by an unknown pattern, and input will not always be fixed. Click on ‘Use sample payload to generate schema’. Apply the following code, click on Done and you will see the schema in ‘Request Body JSON Schema’. Add a Compose Block to check the output of the request and save the Flow. URL will be generated and is ready to be used. Let’s now proceed to create JavaScript to trigger this flow Steps to follow for calling Flow using JavaScript Since I’ll show the code snippet, adjust it as per your use case. Note: Copy your HTTP Post URL from the trigger as it will be used in the JavaScript Step 1: Type the following code Step 2: Execute the JS with ‘TriggerFlow.Main()‘. Note: Make sure you pass Execution Context to the JS Step 3: Check your Power Automate Flow History and open the Run. That’s how Power Automate is triggered using JavaScript. Hope this has helped you 🙂 Next blog – Trigger Power Automate Flow using JavaScript – Bi-Directional
