Below you will find pages that utilize the taxonomy term “Power Automate”
posts
Get Library Drive Id using Power Automate
When using Power Automate with Excel for Business actions, the drive ID for a library is automatically determined. However, if you deploy a Power Automate solution across different environments and use a library as a datasource environment variable, referencing this variable in the flow can result in an error due to an invalid drive ID.
Referencing the variable in the Power Automate flow, it will throw an error message failing to work our the drive id of the library.
posts
Power Automate: Filter Array to Exclude First Approver from List of Approvers
Introduction In Power Automate, there are scenarios where a specific item needs to be excluded from an array to exclude. This blog post will guide you through the process of filtering an array to exclude the first approver from a list of approvers. This can be particularly useful in approval workflows where same person does not approve multiple stages.
Step-by-Step Guide Add Filter Array Action This action will allow filtering out the first approver from the list of approvers.
posts
Power Automate: Using Arrays as Environment Variables
Introduction In Power Automate/Power Platform, environment variables within solutions are essential for managing and configuring flows across different environments. However, there is no direct way to declare an environment variable as an array. This blog post will cover how to use JSON to store arrays as environment variables, enabling you to manage complex data structures efficiently.
Available Environment Variable Types Power Automate offers various types of environment variables you can select and configure:
posts
Power Automate: Get Page Author Details
Introduction In Power Automate, retrieving details about the author of a SharePoint page can be essential for various workflows. This blog post will guide you through the steps to get the page author details using Power Automate.
Add Send an Http request to SharePoint action and rename it to Get Page Author Details.Configure the action with the following settings: Site Address: triggerOutputs()?[‘body/SiteUrl’] Method: Get Uri : /_api/web/_api/Web/GetUserById(body(‘Parse_Page_Details_JSON’)?[’d’]?[‘AuthorId’]) Output of the API
posts
Power Automate: Export Flow within solution as package (.zip)
I had a flow created in the default environment that needed to be moved into a solution in a managed environment. However, the export link for Package (.zip) was missing as the flow was within a default solution (preferred).
It was a huge flow, and manually recreating each action would have taken a considerable amount of time.
I checked another flow where the Package (.zip) was available.
Upon clicking the link, I noticed that /export was appended to the URL of the flow.
posts
Power Automate : Move File bypassing locked issue using CreateCopyJobs endpoint
The SharePoint - Move file action can be used to move files, however the file can’t be moved if the file was accessed by the current Power Automate flow for any processing reslutng in a locked file error.
{ “status”: 400, “message”: “File ‘Shared Documents/Attendances/To Be Processed/Attendance -16072024.xlsx’ cannot be moved because it is in locked mode.\r\nclientRequestId: d6df7566-881f-4f14-8548-c5fac1eda46d\r\nserviceRequestId: 606841a1-40f0-9000-9c69-507df9b21720” }
Handling Locked Files There are two options to handlelocked files when using SharePoint - Move file action:
posts
JSON Data Handling in Power Automate: Double Quotes
When using Power Automate action Send an Http request to SharePoint specially to send data in the body to a REST API call, for instance to create a news link from a SharePoint List Item, you might encounter issues if the body contains double quotes in the title or description. This blog post will walk you through the problem and provide solutions to handle double quotes in JSON strings.
Problem Overview Using the Send an Http request to SharePoint action to create a news link can fail if the JSON body contains double quotes.
posts
Power Automate: Create and Publish a News Link
This post covers how to leverage SharePoint REST API to create and publish a news link from Power Automate using the Send an Http request to SharePoint action.
Within a Power Automate flow follow the steps below to create and publish a news link details.
Send an Http request to SharePoint action renamed to Get Page Details. Site Address : site url Method : GET Uri : /_api/web/lists/GetByTitle(‘Site%20Pages’)/items(10) Parse JSON renamed to Parse Page Details JSON Add the action Parse JSON and refer to the content from previous steps
posts
Power Automate: Retrieve User Details
This post covers how to leverage SharePoint REST API to get user details from Power Automate using the Send an Http request to SharePoint action.
Within a Power Automate flow follow the steps below to retrieve a user details.
Send an Http request to SharePoint action renamed to Get Page Author Details Site Address: https://test.sharepoint.com Method: GET URI: _api/Web/GetUserById(14) Here’s the output from the API:
Here’s the output from the API:
posts
Power Automate: Retrieve Users from a SharePoint Group
This post covers how to leverage SharePoint REST API to get users from a SharePoint group from Power Automate using the Send an Http request to SharePoint action. In the example below a SharePoint Group has been defined for approvers of a particular process and needed to be retrieved to be assigned an approval task.
Within a Power Automate flow follow the steps below to retrieve users from a SharePoint group.
posts
Power Automate : Update Author and Editor of a Page
This post outlines how to use Power Automate to update author and editor of a Page within SharePoint using the Send an Http request to SharePoint action.
Within a Power Automate flow, follow the following steps
Add Send an Http request to SharePoint renamed to Update Author Properties Property Value Site Address The SharePoint site URL Method POST Uri See Uri below Headers See Headers table below Body See Body below Uri _api/web/lists/GetByTitle(‘Site%20Pages’)/items(1)/ValidateUpdateListItem()`
posts
Update A row action from Dataverse connector missing in Power Automate flow
Update A row action from Dataverse connector was not available to an older Power Automate.The requirement was to add ability to cancel an approval task created via action ‘Create Approval’ within 30 days as Power Automate flows timeout after 30 days. I noticed the action Update a Row in Selected Environment and decided to try it instead.
Unfortunately it threw the forbidden error for no apparent reason with no obvious permissions to grant.
posts
Power Automate copy actions across different environments
Power Automate copy actions across different environments If an action is copied from a different environment, the action is not avaible from the My Clipboard, if not you are presented with the following message only.
Save time and paste your most-used Flow code snippets here.
Select the ellipsis menu on any trigger or action, then choose Copy to my Clipboard.
Note: Pasted code clears each time you log out of Power Automate.
posts
Handling Locked Office Files issue In Power Automate
Handling Locked Office Files issue In Power Automate Inspired by the workaround described by Pieter Veenstra System Updates in SharePoint from Power Automate using the ValidateUpdateListItem endpoint to help with the locked file issue, this post covers file version creation as well.
File Locked Issue File lock issues in Power Automate can occur due to:
The file being opened by a user. The file being updated by a Power Automate flow, which may take up to 6 minutes to release the lock.
posts
Power Automate updating multi line field with more than 255 characters
Power Automate flow succeeded despite failure to update multi line text field within a SharePoint Library Updating multi-line text fields in a SharePoint Library from Power Automate flows, especially when the content exceeds 255 characters might fail if the field is not updated to allow unlimited length. This can cause workflows to fail silently.
In a recent scenario, an action was added to a Power Automate flow to update a SharePoint Library’s multi-line text field named ‘ErrorLog’ with error details captured during the flow’s execution.
posts
DateTime Handling in Power Automate
DateTime Handling in Power Automate Manipulating dates and times in Power Automate is a requirement at times. This post covers a few useful scenerios.
Add To Time For instance, adding a specific number of months to a date retrieved from an action using AddToTime function:
addToTime(body(‘Wait_for_an_approval_2’)?[‘completionDate’], int(body(‘Get_file_properties’)?[‘ReviewFrequency’]?[‘Value’]), ‘Month’, ‘dd/MM/yyyy HH:mm’)
Substract Time Specific number of months can be substracted from the date retrieved from an action
string(subtractFromTime(items(‘Apply_to_each’)?[‘DueDate’],1,‘Month’,‘dd/MM/yyyy HH:mm’))
Format Date Time Formatting date to a specific string format is essential otherwise update of data fields might fail because of culture differences.
posts
Power Automate fix for InvalidTemplate: Unable to process template language expressions
Power Automate fix for InvalidTemplate: Unable to process template language expressions InvalidTemplate. Unable to process template language expressions in action can happen with actions within PowerAutomate. In my scenerio I added the encodian action ‘Convert_to_PDF’ and was resubmitting a flow for testing and kept getting the error message.
InvalidTemplate. Unable to process template language expressions in action ‘Convert_to_PDF’ inputs at line ‘0’ and column ‘0’: ‘The template language expression ‘json(decodeBase64(secrets(‘X-MS-APIM-Tokens’)))[’$connections’][‘shared_encodiandocumentmanager’][‘connectionId’]’ cannot be evaluated because property ‘shared_encodiandocumentmanager’ doesn’t exist, available properties are ‘shared_sharepointonline, shared_office365, shared_approvals, shared_teams_1’.
posts
Publishing Major Versions of Files in SharePoint with Power Automate
Publishing Major Versions of Files in SharePoint with Power Automate This post covers how to publish major versions for Office documents (Word, Excel, or PowerPoint) in SharePoint using Power Automate, especially after an approval task using the checkin and publish REST endpoints. This applies to libraries having minor versions enabled
Just for context, a Power Automate approval flow with trigger for a selected file needed publishing for the selected file as major version after being approved.
posts
JSON Data Handling in Power Automate: outputs versus body
JSON Data Handling in Power Automate : outputs versus body In Power Automate, JSON data output from various actions is key to connect each other.
Accessing Action Outputs Accessing the outputs of a specific action, such as the action ‘Get file properties’, the spcific property can be accessed via the outputs, for instance file name with extension.:
outputs(‘Get_file_properties’)?[‘body/{FilenameWithExtension}’]
Referencing Action Body A streamlined way is to reference the body directly making it simpler.
posts
Optimizing Email HTML for Outlook
Optimizing Email HTML for Outlook using the ‘Send Email’ action within Power Automate When crafting attention-grabbing emails, the HTML structure plays a pivotal role. I recently encountered challenges in achieving consistent formatting across Outlook desktop and web versions using the Send Email action within Power Automate.
Using div Tags for Responsiveness At first, I experimented with divs to ensure responsiveness and modern HTML formatting. The code appeared as follows:
<style> .
posts
Exploring some Limitations of Copilot in Power Automate
Exploring some Limitations of Copilot in Power Automate I was thrilled when Copilot became available in the UK region within Power Automate around mid-November 2023. To understand its functionalities and limitations, I started exploring. Please refer to Understanding the Cloud Flows Designer, which outlines some limitations and described the Flows Designer experience.
Creating New Flows While creating a new flow using the prompt “Start an approval process and update the item in a SharePoint list when a new item is created,” I noticed a functional flow generated.