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.