How To Replace Sharepoint Workflow With Power Automate Flows

SharePoint 2010 workflows are on the way out, and it’s a great time to start looking to replace them with Power Automate Flows. This is something everyone on Microsoft 365 already has as part of their license. We’ve put together some guidance to help map from SharePoint Designer workflows and replace them with Power Automate Flows, but before diving in, there are a few things to know.

Pro’s, the great reasons to move now

  • Flows includes more logic options
    • Loops
    • Apply to each
    • Switch
    • Do Until
    • Parallel branches
    • Conditions
      Actions can be configured to run depending on the success of a preceding action (e.g. If an email fails to send, the actions that follow can be different than if it succeeds)
  • Rather than creating tasks, Flow has an approvals connector. All of the incomplete approvals assigned to you are stored in one central spot
  • Using the approvals connector, outcome options can be customized for each approval step (and just having one outcome is an option!)
  • If an action does fail, the number of retries can be set.
  • Flow has a graphical interface with actions that can be renamed or comments added to them
  • Any issues or problems in the Flow are highlighted with suggestions to fix automatically as the Flow is being built
  • Microsoft are releasing new features and actions to Power Automate all the time

Of course, there are some things to be aware of.

  • There are some limitations:
    • Run Duration is limited to 30 days, your workflows that haven’t completed in this time will time-out
    • Run history is stored for 30 days
    • No more than 500 actions per Flow
    • Apply to each actions cannot process more than 5,000 items at once (free license)
    • Apply to each actions cannot process more than 10,000 items at once (Plan 1, Plan 2 and Per User licenses)
    • 600 calls per connection to SharePoint
      Check out this link to find the details https://docs.microsoft.com/en-us/power-automate/limits-and-config
  • Flows are permission trimmed – if someone else needs to edit them, the Flow needs to be shared with them
  • Rather than a workflow history, Flows have a run history which can be reviewed. However, after 30 days, this is deleted.
  • Unlike tasks, approvals are only visible to the person they are assigned to – chasing up bottlenecks can be trickier
  • If you want to manage approvals via tasks, the supporting actions and Flows will need to be included to create the task and monitor the list to send reminders
  • Flows are not reusable, but they can be copied or a copy can be sent to a colleague.

In SharePoint Designer, we’re used to all the actions being SharePoint-focussed where everything we created was around SharePoint lists, libraries and sites. Flow, on the other hand is product all it’s own, which not only connects to SharePoint but also Outlook, Teams and Twitter among others.

What this means for your conversion to Flow is that some actions you want may not be listed with the SharePoint actions. For example, if your SharePoint designer workflow has the action ‘Add time to date’ you would look under DateTime for the action ‘Get Future Time’. The are some common connector groups which will help in your migration from SharePoint classic workflow to modern Power Automate Flows are:

  • Control: Logic actions such as switch, condition (if statement), or apply to each
  • Approval: All actions relating to approvals (even enables approval from an email!)
  • Variable: All the actions relating to variables such as Initialize a variable, Append to string variable
  • DateTime: Date-related actions such as Add to Time or Subtract from Time
  • Office 365 Outlook: Actions which relate to Outlook, such as send an email or Get an attachment.
  • Mail: The connector only has one action – Send an email notification (useful if you are not using Outlook 365)

With all these new actions and options, you might have a look at your workflows and see if Flow offers you a new way to achieve your goal. And given SharePoint 2010 Workflows are on the way out in Office 365, we have built up conversion table to help you find the equivalent action in Power Automate to make your Flows go!

replace-sharepoint-workflow

Replace SharePoint Workflow.... where to begin

Action comparison between SharePoint Workflow and Power Automate

SharePoint workflow action

Flow action

Create list item

Create item

Delete item

Delete item

Set field in current item

Update item

Update list item

Update item

Wait for event in list item

Do Until (Control)

Wait for Field change in current item

Do until (Control)

Check in item

Check in file

Check out item

Check out file

Copy document

Copy file

Copy folder

Discard check out item

Discard check out

Translate document

Translator

Capture version of the document set

Not available

Start document set approval process

Not available as a stand alone action, but this can be achieved using the approval connector

Sent document set to repository

Not available

Lookup manager of a user

Get manager (uses the Office 365 connection)

Add list item permissions

Grant access to an item or a folder

Inherit list item parent permissions

Remove list item permissions

Replace list item permissions

Not available as stand alone actions

 

However, permissions can be changed in the SharePoint environment using the SharePoint API and the ‘Send an HTTP request to SharePoint’ action

 

Flow can also add or remove members from Office 365 Groups

Declare a record

Not available

Undeclare a record

Not available

Add a comment

Flow actions can have comments added to them

Set workflow status

Flow does not have a workflow status, but could still update a column with the Flow status

Set workflow variable

Flow has a collection of actions to do with variables:

·         Initialize a variable

·         Append to string

·         Append to array

·         Set variable

·         Increment variable

·         Decrement variable

There is also a collection of build-in actions for data operations (e.g. create csv table, create HTML table, select, parse JSON etc.)

Log to history list

Flow does not keep a workflow history list. Instead, it can log out to a list on the site to help track the actions of the Flow

 

You can also review Flow history and trace which actions the Flow ran and whether they were successful or not. This is deleted after 30 days

Start a workflow

Start a site workflow

As part of the October 2019 release, the functionality for a Flow to call a second Flow was released, but it may not have hit your tenant yet

Uservoice request for one Flow to call another Flow

 

October Updates for Microsoft Flow

 

One Flow can call another using the HTTP connector, but that’s part of the premium collection of actions.

Collect data from a user

The easiest way to replicate this behaviour is to create a SharePoint list and include a link to create a new item

 

Another way is to use the Teams action ‘Post an adaptive card to a Teams user and wait for a response’

 

Or, the Outlook action ‘send email with options’ could be used

Go to a stage

Stages are not present in Flow, instead the same behavior can be achieved with a Switch statement inside a Do Until action

Pause for duration

Delay

Pause until date

Delay until

Add time to date

Get future time

Set time portion of date/time field

Get future time

Find interval between two dates

This is a little clumsier than in Classic workflows. It relies on using the ticks expression and the Set Variable Action

Do calculation

There are a collection of expressions for calculations which can be used with the Set Variable action (add, subtract, divide – even a randomizer!)

Trim string

There is a trim expression which can be used with the Set Variable action

Replace substring in string

There is a replace expression which can be used with the Set Variable action

Find Substring in String

Extract Substring from End of String

Extract Substring from Index of String

Extract Substring from Start of String

Extract Substring of String from index with Length

All string manipulations can be done with expressions in the set variable action

Build dictionary

Count items in a dictionary

Get an item from a dictionary

Flow has replaced dictionaries with arrays. These can be manipulated with the data operations actions

Compose

Create CSV table

Create HTML Table

Filter array

Join

Parse JSON

Select

There also expressions which can be used with these actions to provide the functionality (and more) of SharePoint Designer workflows

Start a task Process

Assign a task

Assign a to-do item

Start a custom task process

Start feedback process

Start Approval Process

Customisable approvals can be created using the Approval connector

 

Alternatively, tasks can be created in a task list using the Create Item action

Set content approval status

Set content approval status

Set content approval status for the document set

Set content approval status

Send an email

There are two options:

1.       Office 365 outlook ‘Send an email’ action

2.       Mail ‘Send an email notification’ action

 

The outlook email allows the Flow creator to determine the mailbox the email is sent from

Call HTTP Web service

Send an HTTP request to SharePoint can handle any HTTP web services call to the SharePoint environment (without messing around with authentication headers!)

 

For all other API calls, the HTTP actions are required which are part of the premium plan

Assign form to a group

There is no one replacement action for this, however there are a couple ways this can be done:

·         Using the Teams action to send a request to a channel or person

·         Using the Outlook 365 action ‘Send an email with options’

·         A separate SharePoint list can be set up with a link emailed as part of the Flow

Parallel Block

Parallel branches can be added to actions

If Statements

If/Else

Condition (under the Control connector)

If/Else is not present, but the same functionality can be achieved with the control actions.

Impersonation Step

An impersonation step is not available in Flow, however all Flow actions are run under the credentials used to authenticate the connection.

power-automate-flows

Bonus actions for SharePoint in Power Automate Flow!

These are PowerAutomate Flow actions which are not available in SharePoint Designer

What it’s called

What it does

Add attachment

Add an attachment to a list item

Create sharing link for a file or folder

Creates a link that can be used to share a file or folder

Get attachments

Get a list of the content of all attachments for a list item

Get changes for an item or file (properties only)

If versioning is turned on, this will return information about columns that have changed within a given timeframe

Get files (properties only)

Creates an array of the properties for all or a selection of files in a SharePoint library

Get Items

Creates an array of the items in a list

List folder

Returns the files in a specified SharePoint folder

Move file

Moves a file from one document library to another, even across sites or site collections

Move folder

Moves a folder from one document library to another, even across sites or site collections

Resolve person

Using a name or email, this searches for a matching user for use in a person column

Send an HTTP request to SharePoint

Sends an API call to SharePoint – no messing around with building dictionaries!

Stop sharing an item or file

Deletes all sharing links associated with a list item or file

Delete attachment

Deletes a specific attachment from a list item

Extract folder

Extracts an archive (e.g. .zip file) to a SharePoint folder

Get all lists and libraries

Creates an array of the lists and libraries for a site

Get attachment content

Extracts the content of an attachment from a list item

Get file content

Returns the content of a file from a SharePoint library

Get file metadata

Gets information about the file (size, created date, modified date etc.)

Get folder metadata

Gets information about the folder (size, created date, modified date etc.)

Get list views

Returns an array of the views on a particular list

Get lists

Creates an array of the lists for a site

List root folder

Returns information on the files in the root SharePoint folder

Approve hub site join request

Sets the hubs approval request to approved

Cancel hub site join request

If a hub join request was submitted incorrectly, this cancels the request

Join hub site

With an approval token, this actions adds a site to a hub site

Set hub site join status to pending

Updates a hub request status to ‘Pending’

We hope this mapping between SharePoint Designer actions and Flow actions helps, as well as provides some ideas to use other Flow connections to meet your business needs. Now is the time to have a look at your SharePoint Workflows and see if there are spots where Flow can slot in or identify points that can be streamlined as part of the conversion.