AutomationFlowsGeneral › Schedule Contract Sync to OneDrive

Schedule Contract Sync to OneDrive

Original n8n title: Contratos

Contratos. Uses microsoftSql, microsoftOneDrive. Scheduled trigger; 10 nodes.

Cron / scheduled trigger★★★★☆ complexity10 nodesMicrosoft SqlMicrosoft One Drive
General Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Contratos",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 3,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "id": "af48bdbc-b98c-497b-92e2-7044f1e75f1d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        380,
        540
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "folderName",
              "value": "C:/gestion/Cuadros de control/Contratos/"
            }
          ]
        },
        "options": {}
      },
      "id": "5a377d0e-f8f7-4fdd-852b-1aa4c7311a08",
      "name": "Names",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        540
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## Variables",
        "height": 201,
        "width": 329.5405405405405
      },
      "id": "39cda131-0b3e-400e-9e18-e8e484668e48",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        560,
        480
      ]
    },
    {
      "parameters": {
        "jsCode": "return [\n    { json: { procedureName: \"SP_PS_OBLIGACIONES_CON_COMPROMISOS_Y_DISPONIBILIDADES\", \n              fileName: \"obligaciones\",\n              extName: \".xlsx\",\n              Year: 2026,\n              folderID: \"014SRZLAMIILWVL56EJ5DZRFOFFMFR2JVT\"} }\n];"
      },
      "id": "ec3a79c9-0004-4cbf-b312-f62f7d5aab8f",
      "name": "Procedures",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        580,
        540
      ]
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "EXEC [{{ $json.procedureName }}] '{{ $json.Year }}'"
      },
      "id": "3b4ad67a-4a60-4b56-84ad-c32e54b6d504",
      "name": "Microsoft SQL",
      "type": "n8n-nodes-base.microsoftSql",
      "typeVersion": 1.1,
      "position": [
        580,
        780
      ],
      "credentials": {
        "microsoftSql": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "xlsx",
        "options": {
          "compression": true,
          "fileName": "={{ $('Names').item.json.fileName }}_{{ $('Names').item.json.Year }}{{ $('Names').item.json.extName }}"
        }
      },
      "id": "29d912fd-dfe6-4e7a-8416-f76fc74abd73",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        980,
        780
      ]
    },
    {
      "parameters": {
        "fileName": "=",
        "parentId": "={{ $('Names').item.json.folderID }}",
        "binaryData": true
      },
      "id": "e6b27274-0708-445d-b1a9-a3ac4d24040b",
      "name": "Microsoft OneDrive",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "typeVersion": 1,
      "position": [
        1180,
        780
      ],
      "credentials": {
        "microsoftOneDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Consulta",
        "height": 201,
        "width": 328.5405405405405
      },
      "id": "a8983ec1-f588-4633-8a47-899371b900e1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        560,
        740
      ]
    },
    {
      "parameters": {
        "content": "## Cargue",
        "height": 201,
        "width": 348.5405405405405
      },
      "id": "310a71d6-cccc-4eeb-998d-afc7f6542789",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        961,
        740
      ]
    },
    {
      "parameters": {
        "jsCode": "// C\u00f3digo para el nodo \"Code\"\n// Convertir en texto\n\nreturn items;"
      },
      "id": "c6fc2e1e-28c6-47d4-a976-2bd5f66a8bd9",
      "name": "Text",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        780,
        780
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Procedures",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Names": {
      "main": [
        [
          {
            "node": "Microsoft SQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Procedures": {
      "main": [
        [
          {
            "node": "Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Microsoft SQL": {
      "main": [
        [
          {
            "node": "Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Microsoft OneDrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "timezone": "America/Bogota",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "versionId": "3d28af09-7913-449f-83eb-c92ee6e60552",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "QMdqeJiNO6Nqzpny",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Contratos. Uses microsoftSql, microsoftOneDrive. Scheduled trigger; 10 nodes.

Source: https://github.com/alfarodaniel/ETL-Ambulatorios/blob/3a6b3cd9839a5a04c6bd1aaa78b844455f7c0b41/n8n/Contratos.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

This template is an interactive playground designed to help you master the most useful keyboard shortcuts in n8n and supercharge your building speed. Forget boring lists—this workflow gives you hands-

General

Workflow 2469. Uses moveBinaryData, googleDrive, itemLists, n8n. Scheduled trigger; 33 nodes.

Move Binary Data, Google Drive, Item Lists +1
General

Perfect for content publishing with organic scheduling patterns, social media automation, API systems that need to avoid rate limiting, or any automation requiring randomised timing control across mul

n8n, Read Write File, Stop And Error +1
General

Complete backup solution that saves both workflows and credentials to local/server disk with optional FTP upload for off-site redundancy.

Read Write File, Email Send, Execute Command +3
General

todoist automate. Uses todoist, executionData. Scheduled trigger; 27 nodes.

Todoist, Execution Data