Posts

Showing posts with the label Power Automate

Power Automate: Efficiently Retrieve Dataverse Lookup Values Using Expand Query

Image
Introduction When building Power Automate flows with Microsoft Dataverse, retrieving lookup column data is a very common requirement. However, many flows are designed in a way that retrieves only lookup GUIDs , forcing additional Dataverse calls to fetch related data. This approach increases complexity, execution time, and API usage. In this article, we’ll see how to efficiently retrieve lookup values in a single call using the Expand Query option in the Dataverse List rows action. The Challenge with Lookup Columns Consider a Dataverse table cs_ticket that has a lookup column cs_CustomerContact pointing to a Contact table.  When you retrieve rows using List rows without an expand query, the lookup column returns only the GUID . Sample output "_cs_customercontact_value" :  "7c8ffb96-00a7-47c0-b587-a6c652d66b34" Problems with this approach You cannot access contact details like email or contact number You need an additional “Get a row by ID” action Flow becomes...

Power Automate: People Picker in Teams Adaptive Cards Using Microsoft Graph API

Image
  Scenario In real-time automations, collecting user information such as names or email addresses is a common requirement. Relying on  plain text inputs  in Adaptive Cards forces users to manually enter these values, often resulting in  typos or invalid data , which can negatively impact downstream automation logic. Adaptive Cards do not natively support people picker functionality, which becomes a key limitation when posting cards to  Microsoft Teams via Power Automate  and requiring accurate user input. Solution To overcome this limitation, we can leverage  Microsoft Graph API  within  Power Automate  to retrieve user data dynamically and present it as a  dropdown (ChoiceSet)  in an Adaptive Card. This approach ensures controlled user selection and significantly reduces manual input errors. Step-by-Step Implementation Step 1: Create an Instant Cloud Flow Create an  Instant cloud flow  with a manual trigger (or any s...

Integrating ServiceNow with Power Automate via REST API

Image
In this article, we’ll explore the integration process of ServiceNow with Power Automate using the REST API and OAuth 2.0 Resource Owner Password Credentials, accompanied by an illustrative example — retrieving Service Request details from ServiceNow using Power Automate. Power Automate includes a built-in ServiceNow connector. In this blog post, we’ll explore an alternative method for establishing a connection with ServiceNow. Prerequisites: ServiceNow Instance:  Access to a ServiceNow instance with the necessary permissions to create and manage API integrations. Power Automate Account:  A Microsoft Power Automate account to create and manage automated workflows. Step 1: Register OAuth Application in ServiceNow Start by logging into your ServiceNow instance. Search for “ Application Registry ” and select the corresponding option. 3. Click on “ New ” 4. Select “ Create an OAuth API endpoint for external clients .” 5. Name your application (e.g., PowerAutomateApp) and leave the...

Step-by-Step Guide to Retrieve Data from SharePoint List with Over 5000 Items

Image
Managing large datasets in SharePoint lists can sometimes be a daunting task, especially when the list contains more than 5000 items. SharePoint imposes a limit on the number of items retrieved in a single request In this article, we will walk you through a step-by-step approach to retrieve data from a SharePoint list containing more than 5000 items. Understanding the Concept: 1.  Sending HTTP Request to SharePoint REST API:  To retrieve data from a SharePoint list, we’ll be utilizing the SharePoint REST API. 2.  Managing Data Exceeding 5000 Items:  SharePoint imposes a limit of 5000 items per request when querying a list. However, when the list contains more items, the HTTP response includes a property called  __next . This property is a URL that points to the next batch of records, enabling us to fetch data beyond the initial 5000 items. Steps: 1. Create a Power Automate Instant Flow 2. Initialize a boolean variable named ‘ varNextPageExists ’ with the value...