
Hi I would like to ask you if you can help me, I wanted to create Flow for import task from excel table to Planner. This task would be recurring every working day (same task) for whole month. I wanted to put in all in once, e.g. I will run flow 1st of every month and it will create tasks for each day in once. Can you help me? Here is my flow:
Hi @adrian8,
You can use a PATCH request with the Update plannerTask method of the Graph API for this and add a recurrence schedule in the recurrence property.
The recurrence property/plannerRecurrenceSchedule resource type are still in preview though so it looks like you are not able to set an enddate for the range within the schedule yet:
https://learn.microsoft.com/en-us/graph/planner-task-recurrence-overview
Below is an example of how to create a weekdays pattern.
1. Like mentioned earlier, the API methods are still in preview. So, this example will continue even after that first month.
2. This app also requires an app registration in Entra Id with the appropriate Graph API permissions and uses the client & secret of that app in the Authentication section of the HTTP action.
3. Below is the setup of the HTTP action
URI
https://graph.microsoft.com/beta/planner/tasks/@{outputs('Create_a_task')?['body/id']}
Headers
{
"Content-Type": "application/json",
"If-Match": "@{outputs('Create_a_task')['headers']['ETag']}",
"Prefer": "representation"
}
Body
{
"recurrence": {
"schedule": {
"pattern": {
"type": "weekly",
"daysOfWeek": ["monday","tuesday","wednesday","thursday","friday"],
"firstDayOfWeek": "sunday",
"interval": 1
},
"patternStartDateTime": "@{utcNow()}"
}
},
"dueDateTime": "@{addDays(utcNow(),30)}"
}
4. The test result, as you can see the weekdays option is now selected after patching the task.