n8n
Workflow
Sharepoint List Fetch With Oauth Token
This n8n workflow automates tasks and integrates with various services. Sharepoint List Fetch With Oauth Token - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow automates tasks and integrates with various services. Sharepoint List Fetch With Oauth Token - ready to import and run in your n8n instance.
Features:
- Makes HTTP requests to external APIs
- Scheduled automation with cron triggers
Source Code
{
"nodes": [
{
"id": "2654751b-aa66-40ce-b8a0-79063aa710ad",
"name": "Generate OAuth Token",
"type": "n8n-nodes-base.httpRequest",
"position": [
820,
460
],
"parameters": {
"url": "=https://accounts.accesscontrol.windows.net/{{ $json.tenant_id }}/tokens/oAuth/2",
"options": [],
"requestMethod": "POST",
"bodyParametersUi": {
"parameter": [
{
"name": "grant_type",
"value": "client_credentials"
},
{
"name": "client_id",
"value": "{{client_id}}"
},
{
"name": "client_secret",
"value": "{{client_secret}}"
},
{
"name": "resource",
"value": "https://{your-sharepoint-domain}.sharepoint.com"
}
]
}
},
"typeVersion": 2
},
{
"id": "6f713c65-8fbd-4d05-bbef-9b4a1f6248e9",
"name": "Fetch SharePoint List",
"type": "n8n-nodes-base.httpRequest",
"position": [
1160,
460
],
"parameters": {
"url": "https://{your-sharepoint-domain}.sharepoint.com/_api/web/lists/getbytitle('YourListTitle')/items",
"options": [],
"headerParametersUi": {
"parameter": [
{
"name": "Accept",
"value": "application/json;odata=nometadata"
},
{
"name": "Content-Type",
"value": "application/json;odata=verbose"
},
{
"name": "Authorization",
"value": "Bearer {{Token}}"
}
]
}
},
"typeVersion": 2
},
{
"id": "d11e9e92-2468-485c-87f5-6de7da7f9589",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
380,
460
],
"parameters": {
"rule": {
"interval": [
[]
]
}
},
"typeVersion": 1.2
},
{
"id": "8539f52c-2218-4a47-9678-3e3e8e9fd4c8",
"name": "setTenant",
"type": "n8n-nodes-base.set",
"position": [
600,
460
],
"parameters": {
"options": [],
"assignments": {
"assignments": [
{
"id": "399d42f3-41e0-4043-9a57-85771bf5cd07",
"name": "tenant_id",
"type": "string",
"value": ""
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5a4fa41c-0726-4528-99a3-b5e0c47c1960",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
220
],
"parameters": {
"color": "#FFF59D",
"width": 458,
"height": 404,
"content": "Configuration note: update with your credentials or endpoint."
},
"typeVersion": 1
}
],
"connections": {
"setTenant": {
"main": [
[
{
"node": "Generate OAuth Token",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "setTenant",
"type": "main",
"index": 0
}
]
]
},
"Generate OAuth Token": {
"main": [
[
{
"node": "Fetch SharePoint List",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow