Data Providers
...
MS Graph
Graph Calendar
Create Event Item
6min
Creates a new calendar event item in a user's specified calendar using the Microsoft Graph POST REST function. A default jig uses a form component to capture the event details.
Resource links:
Required OAuth scope (least to most privilege):
Calendars.ReadWrite

Create event
index
1name: ms-graph-demonstrator
2title: MS Graph Demonstrator
3description: A sample solution that uses the Microsoft Graph API. You can deploy and use this solution without any additional configuration.
4category: business
5tabs:
6 home:
7 jigId: view-user-jigx
8 icon: home-apps-logo
9 calendar:
10 jigId: calendar-summary
11 icon: calendar
12
13onFocus:
14 type: action.action-list
15 options:
16 isSequential: true
17 actions:
18 - type: action.sync-entities
19 options:
20 provider: DATA_PROVIDER_REST
21 entities:
22 - entity: user-profile
23 function: get-user-profile
24 functionParameters:
25 accessToken: microsoft.OAuth
26 - entity: profile-picture
27 function: get-profile-picture
28 functionParameters:
29 accessToken: microsoft.OAuth
30 userId: [email protected]
31 - entity: next-week-calendar-events
32 function: get-calendar-events-next-week
33 functionParameters:
34 accessToken: microsoft.OAuth
35 startdatetime: =$fromMillis($millis())
36 enddatetime: =$fromMillis($millis()+604800000)
37 - entity: calendars
38 function: get-calendar-list
39 functionParameters:
40 accessToken: microsoft.OAuth
41
42onRefresh:
43 type: action.action-list
44 options:
45 isSequential: true
46 actions:
47 - type: action.sync-entities
48 options:
49 provider: DATA_PROVIDER_REST
50 entities:
51 - entity: user-profile
52 function: get-user-profile
53 functionParameters:
54 accessToken: microsoft.OAuth
55 - entity: profile-picture
56 function: get-profile-picture
57 functionParameters:
58 accessToken: microsoft.OAuth
59 userId: [email protected]
60
61 - entity: next-week-calendar-events
62 function: get-calendar-events-next-week
63 functionParameters:
64 accessToken: microsoft.OAuth
65 startdatetime: =$fromMillis($millis())
66 enddatetime: =$fromMillis($millis()+604800000)
67 - entity: calendars
68 function: get-calendar-list
69 functionParameters:
70 accessToken: microsoft.OAuth
71
MS Graph Create Event function in GitHub.
create-calendar-event
1provider: DATA_PROVIDER_REST
2method: POST
3url: https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events
4inputTransform: |
5 $.{
6 "subject": subject,
7 "body": {
8 "contentType": "HTML",
9 "content": description
10 },
11 "start": {
12 "dateTime": startDateTime,
13 "timeZone": startDateTimeTimeZone
14 },
15 "end": {
16 "dateTime": endDateTime,
17 "timeZone": endDateTimeTimeZone
18 },
19 "location":{
20 "displayName": location
21 }
22 }
23useLocalCall: true
24parameters:
25 accessToken:
26 location: header
27 required: true
28 type: string
29 value: microsoft.OAuth #Use manage.jigx.com to define credentials for your solution
30 calendarId:
31 type: string
32 location: path
33 required: true
34 subject:
35 type: string
36 location: body
37 required: true
38 description:
39 type: string
40 location: body
41 required: true
42 startDateTime:
43 type: string
44 location: body
45 required: true
46 startDateTimeTimeZone:
47 type: string
48 location: body
49 required: true
50 endDateTime:
51 type: string
52 location: body
53 required: true
54 endDateTimeTimeZone:
55 type: string
56 location: body
57 required: true
58 location:
59 type: string
60 location: body
61 required: true
62
MS Graph Create Calendar Events in GitHub .
create-calendar-event.jigx
1title: Create new calendar event
2description: Create a new calendar event in the selected calendar.
3type: jig.default
4icon: calendar
5
6header:
7 type: component.jig-header
8 options:
9 height: small
10 children:
11 type: component.image
12 options:
13 source:
14 uri: https://support.content.office.net/en-us/media/f1c4b693-4670-4e7a-8102-bbf1749e83fe.jpg
15
16onRefresh:
17 type: action.sync-entities
18 options:
19 provider: DATA_PROVIDER_REST
20 entities:
21 - entity: calendars
22 function: get-calendar-list
23 functionParameters:
24 accessToken: microsoft.OAuth
25 userId: [email protected]
26
27datasources:
28 availableCalendars:
29 type: datasource.sqlite
30 options:
31 provider: DATA_PROVIDER_LOCAL
32 entities:
33 - entity: calendars
34 query: |
35 SELECT id,
36 '$.id' as calId,
37 '$.name',
38 '$.color',
39 '$.hexColor',
40 '$.isDefaultCalendar',
41 '$.canShare',
42 '$.canViewPrivateItems',
43 '$.canEdit',
44 '$.allowedOnlineMeetingProviders',
45 '$.defaultOnlineMeetingProvider',
46 '$.isRemovable',
47 '$.owner'
48 FROM [calendars]
49 WHERE '$.canEdit' = true
50
51children:
52 - type: component.form
53 instanceId: newEeventForm
54 options:
55 isDiscardChangesAlertEnabled: false
56 children:
57 - type: component.dropdown
58 instanceId: calendarId
59 options:
60 label: Calendar
61 data: [email protected]
62 item:
63 type: component.dropdown-item
64 options:
65 title: [email protected]
66 value: [email protected]
67 isRequired: true
68 - type: component.text-field
69 instanceId: subject
70 options:
71 label: Subject
72 - type: component.text-field
73 instanceId: description
74 options:
75 label: Description
76 isMultiline: true
77 textArea: medium
78 - type: component.text-field
79 instanceId: location
80 options:
81 label: Location
82 - type: component.date-picker
83 instanceId: startDateTime
84 options:
85 label: Start
86 mode: datetime
87 format: LLL
88 - type: component.date-picker
89 instanceId: endDateTime
90 options:
91 label: End
92 mode: datetime
93 format: LLL
94actions:
95 - children:
96 - type: action.execute-entity
97 options:
98 title: Create Event
99 provider: DATA_PROVIDER_REST
100 function: create-calendar-event
101 entity: calendarEvents
102 method: functionCall
103 functionParameters:
104 accessToken: microsoft.OAuth
105 userId: [email protected]
106 calendarId: [email protected]
107 subject: [email protected]
108 description: [email protected]
109 startDateTime: [email protected]
110 startDateTimeTimeZone: [email protected]
111 endDateTime: [email protected]
112 endDateTimeTimeZone: [email protected]
113 location: [email protected]
114 onSuccess:
115 description: "Event Created"
116 title: "Event Created"
Updated 12 Feb 2025


Did this page help you?