{
  "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": "REPLACE_WITH_AUTHORIZATION"
            }
          ]
        }
      },
      "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": 7,
        "width": 458,
        "height": 404,
        "content": "## Never expose or hard code below values \n**tenant_id,client_id,client_secret** \n\nAlways save these either in secure vault like hashicorp or GCP Secret Manager."
      },
      "typeVersion": 1
    },
    {
      "id": "9fc0886f-d5fe-5192-948b-5b6e7c3ed783",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# Never expose or hard code below values\n\n## Purpose and structure\nThis folder contains the **Never expose or hard code below values** workflow. Its executable nodes use `httpRequest`, `scheduleTrigger`, `set`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nSchedule Trigger\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Http/0626_HTTP_Schedule_Create_Scheduled.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 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
          }
        ]
      ]
    }
  },
  "active": false
}
