Hello,
I have successfully created a MS Shift instance using MS Graph using this thread and the graph documentation.
However, I am trying to build several different larger scale schedule builders. I have one that runs this HTTP post some 1400 times to enter 10 weeks of schedule data for 20 employees. (7 days * 10 weeks * 20 employees). It takes about an hour and a half to run due to the numerous calls. I would like to build a single HTTP post call and post a built text string. So far, I can't get two manual shifts to create, though I have been able to get the first OR the second of 2 shifts to create.
Using the HTTP post action, I'm successfully posting:
{
"id": "",
"userId": "myId",
"schedulingGroupId": "myScheduleGroup",
"draftShift": {
"displayName": "test shift",
"notes": "",
"startDateTime": "2022-12-28T19:00:00Z",
"endDateTime": "2022-12-28T20:00:00Z",
"theme": "pink",
"activities": []
}
}
This works for the first shift:
{
"id": "",
"userId": "myId",
"schedulingGroupId": "myScheduleGroup",
"draftShift": {
"displayName": "test shift",
"notes": "",
"startDateTime": "2022-12-28T19:00:00Z",
"endDateTime": "2022-12-28T20:00:00Z",
"theme": "pink",
"activities": []
}
},
{
"id": "",
"userId": "myId",
"schedulingGroupId": "myScheduleGroup",
"draftShift": {
"displayName": "test shift",
"notes": "",
"startDateTime": "2022-12-29T19:00:00Z",
"endDateTime": "2022-12-29T20:00:00Z",
"theme": "pink",
"activities": []
}
}
And this works for the second shift (note the lack of a comma between the root {} 😞
{
"id": "",
"userId": "myId",
"schedulingGroupId": "myScheduleGroup",
"draftShift": {
"displayName": "test shift",
"notes": "",
"startDateTime": "2022-12-28T19:00:00Z",
"endDateTime": "2022-12-28T20:00:00Z",
"theme": "pink",
"activities": []
}
}
{
"id": "",
"userId": "myId",
"schedulingGroupId": "myScheduleGroup",
"draftShift": {
"displayName": "test shift",
"notes": "",
"startDateTime": "2022-12-29T19:00:00Z",
"endDateTime": "2022-12-29T20:00:00Z",
"theme": "pink",
"activities": []
}
}
I've tried wrapping the whole code snip in:
"value": {snip}
{snip}
"value": [snip]
[snip]
I've also tried building a compose action and an array variable. The compose will load, but runs into the above issues, the variable doesn't seem to be available.

Report
All responses (
Answers (