Hi.
I am trying to create an event an a group calendar when an item is added to a list. I am able to do this using the "Create a group Event" action. However I need these events to occur on a "yearly" basis.
If you see the "Create a group event V2" below, there is no option for recurrence.
I cannot use the "Outlook 365 - Create an event" action because it will error out. But the "Outlook 365 - Create an event" action has the parameters I need (see below).
Can someone tell me how I can add the recurrence parameter into the "Create a group event" action?
If not, is there a way I can work around this using the "Send an HTTP request" for Office 365 Groups? (See below)
I know the HTTP request body content are in json format. So if this is our only method, can you give me a json template for creating a new group event WITH the yearly occurrence?
Thanks!
Solved! Go to Solution.
HTTP Request did the trick. Here's my json code if it helps anyone else.
{
"subject": "@{variables('varFirstName')} @{variables('varLastName')}",
"body": {
"contentType": "HTML",
"content": "Happy Anniversary @{variables('varFirstName')}!"
},
"start": {
"dateTime": "@{variables('varAnniversaryStart')}",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "@{variables('varAnniversaryEnd')}",
"timeZone": "Eastern Standard Time"
},
"isAllDay": true,
"responseRequested": false,
"showAs": "free",
"isReminderOn": false,
"allowNewTimeProposals": false,
"attendees": [
{
"emailAddress": {
"address":"@{variables('varEmailAddress')}",
"name": "@{triggerOutputs()?['body/Author/DisplayName']}"
},
"type": "required"
}
],
"recurrence": {
"pattern": {
"type": "absoluteYearly",
"interval": 1,
"month": @{int(formatDateTime(variables('varAnniversaryStart'),'MM'))},
"dayOfMonth": @{int(formatDateTime(variables('varAnniversaryStart'),'dd'))},
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "noEnd",
"startDate": "@{variables('varAnniversaryStart')}",
"endDate": "0001-01-01",
"recurrenceTimeZone": "Eastern Standard Time",
"numberOfOccurrences": 0
}
}
}
I just noticed that the Office 365 Groups actions do not have a "remove" or "update" action, only "create" is what they have. So this means my only way to make this work for our use case is either
So if anyone can provide me a guide on how to make a HTTP Request to create/delete office 365 group events, that would be great!
HTTP Request did the trick. Here's my json code if it helps anyone else.
{
"subject": "@{variables('varFirstName')} @{variables('varLastName')}",
"body": {
"contentType": "HTML",
"content": "Happy Anniversary @{variables('varFirstName')}!"
},
"start": {
"dateTime": "@{variables('varAnniversaryStart')}",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "@{variables('varAnniversaryEnd')}",
"timeZone": "Eastern Standard Time"
},
"isAllDay": true,
"responseRequested": false,
"showAs": "free",
"isReminderOn": false,
"allowNewTimeProposals": false,
"attendees": [
{
"emailAddress": {
"address":"@{variables('varEmailAddress')}",
"name": "@{triggerOutputs()?['body/Author/DisplayName']}"
},
"type": "required"
}
],
"recurrence": {
"pattern": {
"type": "absoluteYearly",
"interval": 1,
"month": @{int(formatDateTime(variables('varAnniversaryStart'),'MM'))},
"dayOfMonth": @{int(formatDateTime(variables('varAnniversaryStart'),'dd'))},
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "noEnd",
"startDate": "@{variables('varAnniversaryStart')}",
"endDate": "0001-01-01",
"recurrenceTimeZone": "Eastern Standard Time",
"numberOfOccurrences": 0
}
}
}
This looks like a good solution! Can I check if I'm understanding it right -
Do you use the JSON to actually create the event? (if so, how?) Update: found the answer - https://learn.microsoft.com/en-us/graph/api/calendar-post-events?view=graph-rest-1.0&tabs=http#reque...
Or do you create a group event in the flow; then use the event ID to do an HTTP request (GET); compose updated event details; HTTP request (PATCH)?
Thanks
User | Count |
---|---|
96 | |
40 | |
26 | |
23 | |
16 |
User | Count |
---|---|
129 | |
52 | |
48 | |
36 | |
24 |