This guide provides a step-by-step approach to integrate Clappia with SharePoint using OAuth.
This integration will allow Clappia users to access, create and update SharePoint lists and items. Follow the steps below to integrate Clappia with SharePoint:
Ex. https://clappia.sharepoint.com/_layouts/15/appregnew.aspx
Client ID: (93979341-6dcc-xxxxxx-xxx-xxxxxxxxxxxx)
Client Secret: (r0CkrXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
2.1. Go to https://[your domain].sharepoint.com/_layouts/15/appinv.aspx
2.2. Set the App ID as the Client ID obtained in Step 1
2.3. Add the following permission request XML:
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="FullControl" />
</AppPermissionRequests>
2.4. Check apps at
https://[your domain].sharepoint.com/_layouts/15/appprincipals.aspx?Scope=Web (for site, include site in URL)
3.1. Retrieve the Tenant ID by accessing https://[yourdomain].sharepoint.com/_vti_bin/client.svc/
(header: Authorization - Bearer)
3.2. If you face issues with the API authorization, use the method provided in [4]
3.3. Provide the Client ID, Client Secret, and Tenant ID (realm) to obtain the Access Token (refer [1 & 3])
3.4. After obtaining the Access Token, get the ListItemEntityTypeFullName for your list [5]
4.1. Use the Access Token to run the required APIs
4.2. To get EntityName, use this API: https://[Domain name].sharepoint.com/sites/[site]/_api/web/lists/GetByTitle('[list name]')?$select=ListItemEntityTypeFullName
4.3. Use the ListItemEntityTypeFullName to refer to the list for get items, create and update item operations
5.1 Now that we have the access token and the entity name we can use that to send post requests to share point and create new entries in a list. Follow the instructions provided below to achieve this.
5.2 Create a “Rest-API” node in Clappia’s workflow for the app whose submissions you like to enter into sharepoint.
ServerURL: https://[your domain].sharepoint.com/sites/[Site name]/_api/web/lists/GetByTitle('[list name]')/items
Ex: https://clappia0.sharepoint.com/sites/clappia_one/_api/web/lists/GetByTitle('clappia_sp')/items
Method type: POST
Headers: {"Authorization":"Bearer access token","Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","Content-type":"application/json"}
Body: {"Title": "{title}", "ROCC":"{ro_cc}","ROName":"{ro_name}" }
-> The above variable and labels are unique to my app and should be edited so that your field variables are used and it must include all the field you need to sync with SharePoint here.
5.3 Once completed configuring the api, whenever the user makes a submission it will immediately create the submission in SharePoint as well.
For more detailed information, including code snippets and examples, please refer to the following resources:
140L, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
140L, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031