I am able to create a single outlook calendar event but how to create multiple at the same time, is there is any way using Microsoft graph api?
I have tried passing an array of events to api, throwing JSON error
var event = {
"subject": "Let's go for lunch",
"body": {
"contentType": "HTML",
"content": "Does late morning work for you?"
},
"start": {
"dateTime": "2017-04-15T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-15T14:00:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [{
"emailAddress": {
"address": "samanthab@contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}]
}
client
.api('/me/events')
.post(event, (err, res) => {
console.log(res)
})
for one event it's working but I need to add multiple events lets say 2 pm to 3 pm and 6 pm to 7 pm, for loop consuming too much time