cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UBJAN
Frequent Visitor

Assigning recurring task to person on shift that day

Hello,

I have to make recurring tasks for person on the shift each day. 

For example:

Shift example.jpg.

On Monday person Nr.2 when coming to work should have 10 assigned tasks assigned to him and on Tuesday person Nr.1 the same tasks (tasks with the same name) should be assigned to person Nr.1 and the start time of the task should be 1 hour before start of shift and end time 1 hour after the shift.

Tasks should appear only on the day that person works as shifts are sometimes changed during the month.

Could anyone help me with this? Could not find info on how to do this.

4 ACCEPTED SOLUTIONS

Accepted Solutions
UBJAN
Frequent Visitor

@anupam8555Thank you for your answer, I did managed to make recurring tasks, but for me the issue is to assign them to person who have the shift on that day.

I tried this:

powerautomate.jpg

But I get error with "get a shift" part.

 

Thanks

UBJAN

View solution in original post

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

You have used Shift ID as "Day" which is wrong. You  need to use Shift ID as GUID which would be your record ID. 

 

https://docs.microsoft.com/en-us/connectors/shifts/#get-a-shift-(preview)

 

If you don't know Shift ID than you can temporary call List all shifts api and than see what is Shift ID which you are trying to use. 

 

https://docs.microsoft.com/en-us/connectors/shifts/#list-all-shifts-(preview)

 

Thanks

Anupam

(Please mark resolved if it really helps you)

View solution in original post

UBJAN
Frequent Visitor

@anupam8555 

Thank you again for helping, it looks like I am moving forward, but now I have some error, that I do not understand. When I looked for error code, the it showed that I could have some limits, but I do not think so. Here is what I have:

test disp1.jpgtest disp2.jpgthe errorthe error

Thanks

UBJAN

View solution in original post

UBJAN
Frequent Visitor

Dear @anupam8555 

 

It turns out there was some kind of bug with my group. I created new group and now everything works as it should.

finalt.jpg

 

So I will mark it as complete, thank you very much!

 

UBJAN

View solution in original post

15 REPLIES 15
anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

You can use Recurrence flow in order schedule tasks for every day depending on your requirements. 

 

https://docs.microsoft.com/en-us/power-automate/run-scheduled-tasks

 

Your requirement is unique for your business and I am not sure you will find ready available resource. You have to create flow on your and if you have any difficulties than you can ask on communities. 

 

Thanks

Anupam

(please mark it as resolved if it helps you) 

UBJAN
Frequent Visitor

@anupam8555Thank you for your answer, I did managed to make recurring tasks, but for me the issue is to assign them to person who have the shift on that day.

I tried this:

powerautomate.jpg

But I get error with "get a shift" part.

 

Thanks

UBJAN

View solution in original post

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

You have used Shift ID as "Day" which is wrong. You  need to use Shift ID as GUID which would be your record ID. 

 

https://docs.microsoft.com/en-us/connectors/shifts/#get-a-shift-(preview)

 

If you don't know Shift ID than you can temporary call List all shifts api and than see what is Shift ID which you are trying to use. 

 

https://docs.microsoft.com/en-us/connectors/shifts/#list-all-shifts-(preview)

 

Thanks

Anupam

(Please mark resolved if it really helps you)

View solution in original post

UBJAN
Frequent Visitor

@anupam8555 

Thank you again for helping, it looks like I am moving forward, but now I have some error, that I do not understand. When I looked for error code, the it showed that I could have some limits, but I do not think so. Here is what I have:

test disp1.jpgtest disp2.jpgthe errorthe error

Thanks

UBJAN

View solution in original post

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

It looks there is issue with value of "Assigned User ID" field. can you try by passing Email address of user as a text and see if it works. 

 

https://docs.microsoft.com/en-us/connectors/planner/#create-a-task

 

Let me know . 

 

Thanks

Anupam 

(Please mark as resolved if it works really .)

UBJAN
Frequent Visitor

@anupam8555 

The issue is that every day the email address or user ID is different and it depends who will be working, and that is why I am trying to get it from shifts. The option to assign it manually every day is not an option.

Maybe there is other way to get user ID from shift on each day?

 

Thank you.

UBJAN

UBJAN
Frequent Visitor

@anupam8555 

Here is example how it works but it returns tasks for all the shifts planned with correct person on shift assigned, but if I put any time in "List all Shifts" start and end times, it does not return any tasks. What could be the problem?

final1.jpg

Thank You.

 

UBJAN

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

can you check daye format you are passing ? You might need to convert dates in UTC format? If you can post dates you are passing I can have a look . 

 

Thanks 

Anupam

UBJAN
Frequent Visitor

outputsn2.jpg

 

@anupam8555 

This is how it looks like after run.

 

Thank you,

UBJAN

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

You have to add Team ID for Team , you are entering text . This should be replaced with your Team ID (GUID). 

 

anupam8555_0-1614444706739.png

https://docs.microsoft.com/en-us/connectors/shifts/#list-all-shifts-(preview)

 

Thanks

Anupam

(Please mark resolved if it helps really)

UBJAN
Frequent Visitor

@anupam8555 

I choose it from drop down choices. And when I do not assign dates, everything works, so this should not be the issue.

 

Thanks

UBJAN

anupam8555
Responsive Resident
Responsive Resident

Hi @UBJAN ,

 

I see. Can you make sure that user from which you have connected PowerAutomate has shifts assigned ? List all shifts will return only shifts assigned to a user. 

 

Let me know. 

Thanks

Anupam

UBJAN
Frequent Visitor

Hi  @anupam8555

 

Yes, one of the users is myself and it does return all assigned users when I do not put any times. So I think the issue is with times.

 

Thanks

UBJAN

UBJAN
Frequent Visitor

Dear @anupam8555 

 

It turns out there was some kind of bug with my group. I created new group and now everything works as it should.

finalt.jpg

 

So I will mark it as complete, thank you very much!

 

UBJAN

View solution in original post

anupam8555
Responsive Resident
Responsive Resident

Glad to hear. Thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,153)