N
n8n Store
Workflow Market
Released: [SUB] Dropbox upload links

Released: [SUB] Dropbox upload links

by usascholar0 views

Description

Categories

⚙️ Automation

Nodes Used

n8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.noOpn8n-nodes-base.dropboxn8n-nodes-base.dataTablen8n-nodes-base.stickyNote
PriceKostenlos
Views0
Last Updated11/28/2025
workflow.json
{
  "id": "McIM3fyCBUnCR97N",
  "meta": {
    "instanceId": "42bde649da4575cc0d49afcf8affcdbece40e5e40061aa2c9b7a8b3639284dfe"
  },
  "name": "Released: [SUB] Dropbox upload links",
  "tags": [],
  "nodes": [
    {
      "id": "50809acd-5528-44cf-b2d8-993cddae08a9",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1568,
        -16
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "eacbf743-344e-4ec7-8711-bbf3cbd28b27",
      "name": "Normalize Path1",
      "type": "n8n-nodes-base.set",
      "position": [
        -1264,
        -16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "5b40d0d7-f20f-4510-9e1a-05d5db31f4aa",
      "name": "Upload & Path Processing1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1568,
        -192
      ],
      "parameters": {
        "color": 4,
        "width": 416,
        "content": "## Upload & Path Processing\n\n1. **Read Binary File**: Reads file from local filesystem\n2. **Upload a file**: Uploads to Dropbox using OAuth2\n3. **Normalize Path**: Prepares path for sharing API calls"
      },
      "typeVersion": 1
    },
    {
      "id": "72d5f167-520b-417b-b2c0-0cd00f34c296",
      "name": "Sharing Link Management1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -256
      ],
      "parameters": {
        "color": 2,
        "width": 480,
        "height": 224,
        "content": "## Sharing Link Management\n\n1. **List Shared Links**: Check if link already exists\n2. **Get Existing linlk (if any)**\n3. **IF Node**: Branch based on link existence\n5. **Get Access Token** for shared link creation. Its stored in a data table that you will need to create called cred-Dropbox with a single row, your token and an id of 1\n4. **Create Shared Link**: Generates new link if needed"
      },
      "typeVersion": 1
    },
    {
      "id": "98b3b6d6-9918-46bf-bb71-569088f54081",
      "name": "Direct Link Processing1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 496,
        "content": "## Direct Link Processing\n\n1. **Rewrite Host**: Process existing links\n2. **Build Direct Link**: Convert Shared to direct download URL\n3. **Success Response**: Return final formatted direct download URL"
      },
      "typeVersion": 1
    },
    {
      "id": "9678708f-8a78-423b-8877-4cb98814fe37",
      "name": "Dropbox: Create Shared Link",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -432,
        144
      ],
      "parameters": {
        "url": "https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"path\": \"{{ $('Normalize Path1').item.json.path_lower }}\",\n  \"settings\": {\n    \"requested_visibility\": \"public\"\n  }\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d873e83d-7d0e-4264-bf4e-93700ae3c88c",
      "name": "If: Link Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        -688,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ce8a640e-90ae-4337-9110-0e23262a649c",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.links[0].url }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ab00f2f0-5e52-4213-9ab1-4e03eb6a42b2",
      "name": "Extract Existing Link",
      "type": "n8n-nodes-base.set",
      "position": [
        -832,
        -16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "cb96c7eb-763d-4cd6-9198-bc7b54bf1f00",
      "name": "Dropbox: List Shared Links",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -992,
        -16
      ],
      "parameters": {
        "url": "https://api.dropboxapi.com/2/sharing/list_shared_links",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"path\": \"{{ $json.path_lower }}\",\n  \"direct_only\": true\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "dropboxOAuth2Api"
      },
      "credentials": {
        "oAuth2Api": {
          "id": "WFxoxqeBfeh341Mm",
          "name": "Dropbox2"
        },
        "dropboxOAuth2Api": {
          "id": "LimqAedb7vyPhqJ2",
          "name": "Dropbox account X"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "108812a1-f6e4-4fb6-838f-d6c43d2e7ec2",
      "name": "Rewrite Dropbox Host",
      "type": "n8n-nodes-base.set",
      "position": [
        -432,
        16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "574020e5-9928-41c0-be49-a58033dd8b3b",
      "name": "Build Direct Link",
      "type": "n8n-nodes-base.set",
      "position": [
        -272,
        16
      ],
      "parameters": {
        "fields": {
          "values": [
            {
              "name": "shared_link_direct",
              "stringValue": "={{ String($json.links[0].url || '').trim().replace(/^https:\\/\\/(?:www\\.)?dropbox\\.com\\//, 'https://dl.dropboxusercontent.com/') }}"
            }
          ]
        },
        "include": "none",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4f2228ce-d31e-4a1a-bd55-c18d90851dc5",
      "name": "Final Response",
      "type": "n8n-nodes-base.set",
      "position": [
        -112,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success_response",
              "name": "response",
              "type": "string",
              "value": "={{ $json.shared_link_direct }}"
            },
            {
              "id": "216b1279-56bc-45a5-9edd-3aeded1c516f",
              "name": "url",
              "type": "string",
              "value": "={{ $json.shared_link_direct }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "528ab43e-04f8-44e4-a4b4-64aba2d924c0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1696,
        176
      ],
      "parameters": {
        "width": 608,
        "height": 576,
        "content": "## Sample code to upload and host on dropbox \n**This works on both remote and local installs of N8N**\n\nInput: the file we are hosting on DropBox.\nOutput: the direct shared link in Dropbox.\n\nTo Do For You: \nModify this workflow to make sure the uploaded filenames are unique, otherwise the shared links you get are going to be wrong, as dropbox will extract the existing link to an older file with the same name.\n\nCredentials needed: Dropbox OAuth2 API is needed for the \"upload a file\" node and the \"Dropbox: List Shared Links\" node. The refresh token will be needed for the \"Dropbox: Create Shared Link\" node, which we will get from the 'cred-Dropbox\" table created for the \"Dropbox Token Refresher\" workflow that refreshes the tokens for us, so we don't have to manually refresh them. \n\nIf you dont have a dropbox app yet, create one here as you will need it for the App Key (aka Client ID) and the App Secret for your OAuth2 and access tokens. For permissions, give it all permissions under \"Files and folders\" and \"Collaboration\". Make sure you set your (callback) Redirect URI's to your N8N instance and generate your first 'access token' manually to test your upload workflow first. Once that is working you use the \"Refresh Token Workflow\" to manually kickstart the refresh process, and auto-refresh the tokens for you so you don't have to do this manually again.\n\nCreate your dropbox app here for the credentials and access token:\nhttps://www.dropbox.com/developers/apps"
      },
      "typeVersion": 1
    },
    {
      "id": "2002c9c4-e6a6-4cd2-af23-bcfc0828d695",
      "name": "Upload a file",
      "type": "n8n-nodes-base.dropbox",
      "position": [
        -1408,
        -16
      ],
      "parameters": {
        "path": "=/Automate/N8N/host/{{ $json['Upload file'][0].filename }}",
        "binaryData": true,
        "authentication": "oAuth2",
        "binaryPropertyName": "=Upload_file"
      },
      "credentials": {
        "dropboxOAuth2Api": {
          "id": "LimqAedb7vyPhqJ2",
          "name": "Dropbox account X"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3da92dc4-669e-42eb-846c-d4e77462742e",
      "name": "Get DropBox access token",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -576,
        96
      ],
      "parameters": {
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "hZbk3Yqoqdn3lIJ4",
          "cachedResultUrl": "/projects/w1o5aCEZlpQzzMF5/datatables/hZbk3Yqoqdn3lIJ4",
          "cachedResultName": "cred-Dropbox"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "107a77a9-c3c7-4d5b-9e8c-5ce85fc62a6d",
      "name": "Upload File",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -848,
        576
      ],
      "webhookId": "dfc36d64-a5ed-49d7-952d-8287a1f26748",
      "parameters": {
        "options": {},
        "formTitle": "Upload File To DropBox",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Upload file",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "c85db16f-40dd-4a64-8bf4-84e4b7d449a7",
      "name": "Completed",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -480,
        576
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7f00f7d0-bed1-4660-9e3d-5ed9284d7575",
      "name": "Call '[SUB] Dropbox upload links'",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -656,
        576
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "DsRqr6QdhNM0TRaQ",
          "cachedResultUrl": "/workflow/DsRqr6QdhNM0TRaQ",
          "cachedResultName": "[SUB] Dropbox upload link"
        },
        "workflowInputs": {
          "value": {},
          "mappingMode": "defineBelow"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "35566c40-1451-4953-9935-6598baab7f94",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        432
      ],
      "parameters": {
        "width": 496,
        "height": 128,
        "content": "## Test workflow \n**Copy this out to its own workflow** then run it to test this workflow, remember to link the subworkflows together. "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "67f62d86-0ca8-4320-84a2-14c5c3e668fc",
  "connections": {
    "Upload File": {
      "main": [
        [
          {
            "node": "Call '[SUB] Dropbox upload links'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload a file": {
      "main": [
        [
          {
            "node": "Normalize Path1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Path1": {
      "main": [
        [
          {
            "node": "Dropbox: List Shared Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Link Exists?": {
      "main": [
        [
          {
            "node": "Get DropBox access token",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Rewrite Dropbox Host",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Direct Link": {
      "main": [
        [
          {
            "node": "Final Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rewrite Dropbox Host": {
      "main": [
        [
          {
            "node": "Build Direct Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Existing Link": {
      "main": [
        [
          {
            "node": "If: Link Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get DropBox access token": {
      "main": [
        [
          {
            "node": "Dropbox: Create Shared Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dropbox: List Shared Links": {
      "main": [
        [
          {
            "node": "Extract Existing Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dropbox: Create Shared Link": {
      "main": [
        [
          {
            "node": "Dropbox: List Shared Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call '[SUB] Dropbox upload links'": {
      "main": [
        [
          {
            "node": "Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流