Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?

How to use a Workqueue in Power Automate

I’ve already spoke about how highly effective a workqueue in Energy Automate is right here, and this was earlier than Microsoft launched the performance within the Energy Platform. I used to be utilizing customized tables/lists, however now Microsoft has prebuilt these tables for you, with some added sparkle.

However now its on the whole launch I assumed I might share the best way to use a workqueue in Energy Automate, it’s extra geared toward Desktop flows (like different RPA instruments, e.g Blue Prism, as you’ve gotten restricted sources that should be managed), however that does not imply you possibly can’t or should not use them in your cloud flows.

  1. Setup
  2. How you can use
  3. Set off
  4. Move Motion
  5. Delete
  6. Instance



1. Setup

A few issues to know, Workqueues require a premium license, and every queue must be setup.

The workqueue will probably be both beneath Monitor (outdated) or within the left menu. If it is not there you should use this url:

https://make.powerautomate.com/environments/{your surroundings ID}/monitor/work-queues

We then create the workqueue (it may be used for one course of or in case you are courageous a number of), moreover you possibly can set an auto outing for gadgets (that means the expire and wont be used any extra, although I’ve by no means discovered a purpose for this but).

create workqueue

You now have your individual workqueue, and better of all its personal dashboard. This is likely one of the finest advantages to Energy Automate workqueues, from one display screen you possibly can see how your automation is performing. You too can share the workqueue so others can view the dashboard.

dashboard

The Superior Particulars exhibits the guid (workqueue id) and key for the workqueue, these will probably be wanted to course of the workqueue.

advanced details

On high of viewing you can too edit the workqueue, so you possibly can add gadgets, delete them, and edit them. It will probably develop into a form of management room for human within the loop actions in case you want. e.g. gadgets might be stacked up, when sufficient are prepared a operator may log in, view all of the prepared gadgets, categorise them after which launch them to be processed by the subsequent move. This is likely one of the strongest issues the Energy Automate Workqueue perform provides, as you possibly can replicate all of it your self with your individual Dataverse desk or SharePoint record, however you wont get the management room (with out perhaps a customized app).



2. How you can use

The workqueue has a number of predefined fields you should use:

fields

  • Title – I take advantage of as aircraft textual content key, it would not must be distinctive however ought to assist dashboard customers monitor e.g e mail topic
  • Precedence – Low/Medium/Heigh, self explanatory however helpful while you filter your queue
  • Distinctive Id or reference – this does should be distinctive and I take advantage of to hyperlink to different techniques e.g. E-mail message id
  • Expiration date – date & time while you wish to auto cease processing the merchandise
  • Enter – that is any information you might wish to use all through the method, I like to recommend making a JSON that you simply then parse
  • Processing notes – these are your tags, tags are used to determine the place within the course of the merchandise is and helps set off the subsequent step

Instance of enter for e mail

{
  "from":{emailAddress},
  "attachment hyperlink":{sharepoint url},
  "physique":{emailBody}
}
Enter fullscreen mode

Exit fullscreen mode

Instance of Processing notice tags for e mail

  • Excel
  • Phrase
  • PDF
  • RequestApproval



3. Set off

To set off our flows from the workqueue we’re going to use the When a row is added, modified or deleted motion.

trigger action

Our first move ought to be change kind created, all future flows Modified. To make sure that our flows run on the proper time we have to set set off situations. The situations ought to on the whole embrace 3 situations:

  • Workqueue ID (so we solely run on proper queue because the tables are shared, that is from our Superior Particulars)
  • Standing code (e.g so wont run if on Maintain)
  • Processing notes (makes use of the tag so runs proper move)

e.g.

@and(
    equals(triggerOutputs()?['body/processingresult'],'excel')
,
    equals(triggerOutputs()?['body/statuscode'],1)
,
    equals(triggerOutputs()?['body/_workqueueid_value'],parameters('workqueueID (workqueue)'))
)
Enter fullscreen mode

Exit fullscreen mode



4. Move Motion

As soon as triggered we have to full the motion and replace the merchandise in order that it could set off the subsequent move/name Human within the Loop. Inline with set off, we’re utilizing our commonplace Dataverse actions, this time Replace a row.

update row

We use triggerOutputs()?['body/workqueueitemid'] as our Row ID, and the replace our Processing Consequence with the subsequent tag, and if wanted the Standing & Standing Motive.

status drop

status reason drop

To get our enter information we use a easy Parse JSON

parse json

You’ll be able to replace the information if want, simply replace the enter discipline, although for finest observe I strive not too.



5. Delete

If we’re processing loads of gadgets we are able to find yourself with loads of information (and Dataverse will not be low-cost), so our workqueue shouldn’t be used as a knowledge repository. If it is advisable report the knowledge reserve it in a SharePoint record, SQL database, or one other Dataverse desk you probably have plenty of cash ­čśÄ.

There are 2 methods to maintain you queue tidy, delete every merchandise when performed, or clear the entire queue on the finish of the method.

Deleting one merchandise at a time we simply use the usual Dataverse Delete a rowmotion.

delete item

To do the entire queue might be extra difficult, fortunately Microsoft has your again with the Dataverse Carry out a sure motion motion.

cear work queue action

Simply choose the ‘Work Queues merchandise’ desk, ClearWorkQueue motion, and use the workqueue id from the superior particulars.



6. Instance

So when can/ought to we use a workqueue, I positively advocate for giant complicated processes with plenty of baby flows. I additionally assume something with plenty of Human within the Loop steps is a superb use case. The opposite is expounded situations.

A easy instance could be:

We now have a move that may solely run when 2 studies are obtained. They’ll come at anytime and in any order (so no dishonest and operating on the second report).

We now have 2 flows, one that’s triggered by emails. If the attachment will not be legitimate it creates an merchandise within the workqueue and units Maintain so a Human within the Loop can examine. In the event that they discover it’s the proper report, with one thing just like the mistaken file identify, they’ll replace the merchandise in order that it continues within the course of.

Subsequent it checks to see if there are any queued gadgets, if sure they replace it, else it creates a brand new merchandise.

The studies are added as tags, the second move solely runs when the Course of Notes incorporates each of the studies.

Image description

It is a very primary instance, and there are different methods to do it, however having the performance inbuilt, and straightforward to scale (extra studies, extra steps) is absolutely helpful.

Total workqueues could also be finest for Desktop flows (there as a result of you’ve gotten restricted sources, you should use extra actions like ‘get subsequent merchandise’ and cargo stability these sources), however they’re nonetheless very helpful for cloud flows.


Additional Studying

Add a Comment

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?