Hi @Anonymous , I just tried out your scenario and was successful after some trial and error. This is what I did:
1. After the trigger, initialize an array variable - "assignments_array" - with the "triggerOutputs()?['body/_assignments']".
2. Add a condition to check if the length of the array "length(variables('assignments_array'))"
is greater than 0. If yes, the task has been assigned. You can now send the email to the task creator inside the 'Yes' block.
3. If the above a condition evaluates to 'No', create a Do Until inside the 'No' block. The Do Until should have the condition "length(variables('assignments_array'))" is greater than or equal to 1.
4. Inside the 'Do Until', insert a delay of 1 day at the top. Since the task was just checked and no assignment was found, the Do Until should wait until the next day to check the task assignment again.
5. After the delay, insert a 'Get a Task' to get the task details again. Then set the "assignments_array" variable to the expression "outputs('Get_a_task')?['body/_assignments']".
6. Now insert a condition to check if the "length(variables('assignments_array'))" is greater than or equal to 1. If 'Yes', the task has been assigned, so send the email.
7. If the above condition evaluates to 'No', do nothing. The 'Do until' loop will automatically continue to wait for a day and then check if the task has been assigned until the task is actually assigned.
Hope this helps.