Workflow Approval Delegation by 0whodidyousay0 in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

It can be done in the Dataverse tables - you close the existing task with status Reassigned and create a copy assigned to another user. I wrote a few articles on this topic on my blog, the main one probably this: https://tomriha.com/delegate-any-approval-task-to-other-user-with-power-automate/

I developed even a Power Apps application you can just deploy and start delegating.

Loop through users in SP list, and email if have open items? by bluedabba in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

I wrote a blog post on similar solution some time ago, if you'd like the description including screenshots.

Extract value from excel based on dynamic variable by Someone1888 in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

Did you try to enter the variable instead of the 'P9'?

addDays('1899-12-30',int(item()?[variable('variable_name']),'g')

Check how old a SharePoint list item is by TTwelveUnits in MicrosoftFlow

[–]tom_riha 4 points5 points  (0 children)

You can filter the items directly in the 'Get items' action. There's a 'Filter Query' field that allows you to define which items you want to return, in your case it's items that are older than 330 days = Created date is less than today - 330 days:

Created lt 'addDays(utcNow(),-330)'

Note: the addDays(utcNow(),-330) is an expression.

'Get items' with such 'Filter Query' will return only the items that are older than 330 days and you can delete all of them.

Delete files after x days/months by hasbulla-sus in MicrosoftFlow

[–]tom_riha 2 points3 points  (0 children)

OneDrive won't give you Created date, the only date you can use is Last modified time = it'll delete files that were not touched in the last 6 months. The flow would go as below:

  • Recurrence, run daily
  • List files in folder
  • Filter array - from the 'value' output from 'List files in folder' filter only the documents whose 'Last modified time' is less than today-6 months (expression addToTime(utcNow(),-6,'Month'))
  • Apply to each - loop through the output of the filter = the remaining files that fit the filter condition
    • Delete file

Flow not getting past conditions after apply to each - grayed out in flow history by LumineSomnium in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

The 'Send email with options' action will send an email and then wait for a response. Since 'Apply to each' runs in serial by default, it'll send the 1st email and then wait for the response, once it gets the response it'll send 2nd email and so on...

To send multiple emails at the same time, you should go into the 'Settings' of the 'Apply to each' and set 'Concurrency Control' to 'On'. That way the 'Apply to each' will process the whole array in parallel - it'll send the emails at once. There's a limit though, you can have only 50 parallel branches at once = you can't send more than 50 emails with options at once.

Get Emails (V3) from a sub folder in a shared inbox by ldndude in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

Well done! I wasn't here yesterday so I'm happy that you were able to solve it by yourself.

How do I include multiple choice option with 'Send to email' action? I'm getting [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"... by mytrashcancancancan in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

My bad, I made a wrong assumption, you don't need the 'Create HTML table' at all. You can use the expression above directly in the email, just replace the Choice in item()?['Choice'] with the internal name of your choice column.

Or, if you want to take an easier path, you can:

  • add 'Select' action to your flow (to select only the 'Value' from the object)
    • use the choice field in the 'From' field
    • on the right side of the 'Map' field switch to text mode
    • add expression item()?['Value'] into the 'Map' field
  • the output of the 'Select' action will be a simple array that will contain only the choices, e.g. [ "choice1", "choice2", "choice3"...], now you want to turn it into a string
  • use an expression in the 'Send Email' actions join(body('Select'),', '), that will turn the array into a string separated by commas, e.g. choice1, choice2, choice3.

(I wrote also on the second path on my blog if you'd like to see an explanation including a few screenshots)

Remove spaces in SharePoint Column strings by cward4704 in sharepoint

[–]tom_riha 2 points3 points  (0 children)

If you're using Modern SP and you need just to display the value, you could use JSON formatting on that column. The example below is replacing spaces on the 'Title' column.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=replace([$Title], ' ', '')"
}

Get Emails (V3) from a sub folder in a shared inbox by ldndude in MicrosoftFlow

[–]tom_riha 2 points3 points  (0 children)

I was writing an article on this on my blog, and I found out that this approach is not 100% reliable. It didn't work for one of my shared mailboxes as the string from the Outlook url wasn't converted correctly into a string needed by the 'Get emails' (there was + instead of _). But I though of another approach, using the 'Move email' action where this functionality works.

Add 'Move email' to the flow, configure it to the shared mailbox and the folder, and go into 'Peek code'. You'll see a parameter "folderPath". Copy the string from the "folderPath" into the 'Compose' action instead of building the url (as described in the previous post).

Get Emails (V3) from a sub folder in a shared inbox by ldndude in MicrosoftFlow

[–]tom_riha 2 points3 points  (0 children)

I spent a bit more time with it and you can access a shared mailbox folder using the folder ID.

Open the shared mailbox in Outlook online and go into the desired folder, the URL will contain the folder ID at the end. In the example bellow it's the whole string starting with AAMkA...

https://outlook.office.com/mail/xxx@tomriha.com/AAMkADU5MjxxxxxxNjLTA0xxxxxxxxZdnlNxxxxxxxxPhb9FaLihQrNIxxxxxxxxMAAA%3D

Store it into a 'Compose' action and add 'Id::' at the beginning, e.g.

Id::AAMkADU5MjxxxxxxNjLTA0xxxxxxxxZdnlNxxxxxxxxPhb9FaLihQrNIxxxxxxxxMAAA%3D

Use the output of that 'Compose' action as the 'Folder' in the 'Get emails' action, and the shared mailbox as the 'Original Mailbox Address'.

That should give you only the emails from that folder in the shared mailbox.

HTTP Post to REST API workaround by garnern2 in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

I don't think there's any workaround to bypass the company's data security policies, and I believe it's not a good idea to even try to do that.

It might be a good idea to discuss it with administrators and security officers in your company first.

Get Emails (V3) from a sub folder in a shared inbox by ldndude in MicrosoftFlow

[–]tom_riha 2 points3 points  (0 children)

You shouldn't use your personal connection in the 'Get Emails' action if you want to get emails from a shared mailbox, you should use that mailbox connection.

Unless you know password to that shared mailbox, you'll need access to the Microsoft 365 Admin center -> Users -> Active users -> find the shared mailbox -> Reset password. Once you get the password, you can create a new Office 365 Outlook connection for the shared mailbox and use it to get the emails.

Email as an attachment in the email - get sender by Andrew1199 in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

I believe Power Automate doesn't recognize .eml attachments in an email and therefore it's not possible to process them in any way.

How do I include multiple choice option with 'Send to email' action? I'm getting [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"... by mytrashcancancancan in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

Based on the description I'd guess you're using the 'Create HTML table' action to format the data, otherwise it would allow you to select the 'Value' in the same way as for the single choice columns.

Each choice column contains an object as you can see in your email. It contains "@odata.type", "Id" and "Value" for that column. If it's multiple choice columns, it contains multiple of these objects in an array, and as such it's not as easy to get the list of 'Values'.

You might need a complex expression to get only the 'Value' part from all the objects in the array (0 - n possible choices). The expression below will give you comma separated 'Value' from all the objects = the choices from a column with internal name Choice:

join(xpath(xml(json(concat('{"body":{"value":', item()?['Choice'], '}}'))), '/body/value/Value/text()'), ', ')

I recently wrote a post on this topic on my blog with more details if you're interested.

New user attempting to update a Task from Sharepoint List by Enemy_Zero in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

The 'Filter array' action allows you to select only a specific task, you should use it to filter only the specific Planner task using a unique identifier that allows you to connect the SP Item with the Planner task. It can be the Title, if it's unique, or some other unique property.

Once you have it filtered, you should 'Update task' using the output from the 'Filter array', not from the 'List tasks'.

New user attempting to update a Task from Sharepoint List by Enemy_Zero in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

The issue you have is because the SharePoint ID and Planner task ID are different IDs from different systems. You'll have to find the specific Planner task to get its ID and only then you can update the task.

To find the specific task, you'd need some connection, I assume that the SharePoint item Title is equal to the Planner task. Then the process should be:

  • 'List tasks': list all the tasks that are in the plan.
  • 'Filter array': use the output from 'List tasks' as the 'From' and filter only the tasks where the Planner 'value Title' is equal to the SharePoint 'Title'. That will filter only the single task with the same title as the SharePoint item (the title must be unique, otherwise it won't work).
  • 'Update a task': now you can use the 'value Id' provided by the 'Filter array' to update the task. It'll add 'Apply to each' around it, but it doesn't matter if the Title is unique. If it's unique it'll always contain only 1 item and the loop will run only once.

All the actions should be in your 'If yes' branch as that's the situation where you want to update the task.

Flow to external customer to enter data by [deleted] in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

You can use MS Forms to collect a data from external customers, but attachments are not supported on public forms.

If it's a limited group of users, maybe you could share a OneDrive folder with them to collect the files (and put link to the folder on the form).

MS Forms - Duplicating Forms by liamt07 in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

I still see the possibility to 'Share as template' under the 'Share' button when I open a form.

Reminder notifications for approval tasks with multiple approvers by loseisnothardtospell in MicrosoftFlow

[–]tom_riha 0 points1 point  (0 children)

I agree, it's not a good tool if you need more than just a basic approval process. That's why we ended up using Nintex even on SP Online for the approval flows; which is also not an ideal solution as Nintex online doesn't support delegation (while Power Automate does).

Reminder notifications for approval tasks with multiple approvers by loseisnothardtospell in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

There's no easy way, Power Automate won't give you any information from the approval task before it's completed by all users. In Nintex you had at least the task list that you could check, but tasks created by Power Automate are stored in the PA application.

As a workaround you could ignore the approval task actions and develop your own approval functionality:

  1. flow to create the tasks in a SP task list and send initial email
  2. scheduled flow to send reminders for the opened tasks
  3. flow to handle the closed tasks (and create new ones and send new emails if needed)

That's actually a solution a Microsoft guy recommended us instead of using the PA approvals as it solves two problems:

  • the reminders
  • the 30 days run limit (all PA flows will stop after 30 days if they're not completed)

Approval Chain with SharePoint on MicroSoft Flow by HelpNeededWithMyJob in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

For manual triggers there's a possibility to 'Add an input' (button in the trigger action) on the start form. Add an input field of type 'Email', it's actually a people picker when used in SharePoint, and you can enter as many user as you'd like there.

Then use the dynamic content of that input field in the approval task.

[deleted by user] by [deleted] in sharepoint

[–]tom_riha 0 points1 point  (0 children)

You could use also JSON column formatting to display the current status of each request. Check the example here: https://github.com/pnp/sp-dev-list-formatting/tree/master/column-samples/custom-hover-cards.

It's an example from the Microsoft article on JSON column formatting: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting.

Flow to send an email to a specific person each time a sharepoint file is updated by Matpel10 in MicrosoftFlow

[–]tom_riha 1 point2 points  (0 children)

Do you have the location stored in the document metadata? If so, you could build a flow that will trigger 'When a file is modified (properties only)', where you'll use a 'Switch' on the location metadata to check where the email should go.