AutomationFlowsWeb Scraping › File Manager

File Manager

file manager. Uses s3, n8n-nodes-text-manipulation, compression, httpRequest. Event-driven trigger; 11 nodes.

Event trigger★★★★☆ complexity11 nodesS3N8N Nodes Text ManipulationCompressionHTTP RequestExecute Workflow Trigger
Web Scraping Trigger: Event Nodes: 11 Complexity: ★★★★☆ Added:

This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

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": "file manager",
  "nodes": [
    {
      "parameters": {
        "operation": "upload",
        "bucketName": "BUCKET_NAME",
        "fileName": "={{ $('When Executed by Another Workflow').item.json.workspace_id }}/{{ $json.fileName }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.s3",
      "typeVersion": 1,
      "position": [
        496,
        -352
      ],
      "id": "0038e792-ddfe-40a1-b119-4efdaba2e65f",
      "name": "Upload a file",
      "notesInFlow": false,
      "credentials": {
        "s3": {
          "name": "<your credential>"
        }
      },
      "notes": "the bucket must have file lock and versioning disabled!"
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "textsWithManipulations": {
          "textsWithManipulationsValues": [
            {
              "dataSources": {
                "dataSource": [
                  {
                    "text": "={{ $json.extractedText }}",
                    "destinationKey": "html"
                  }
                ]
              },
              "manipulations": {
                "manipulation": [
                  {
                    "action": "replace",
                    "substring": "images/",
                    "value": "=https://CDN_DOMAIN/{{ $('When Executed by Another Workflow').item.json.workspace_id }}/"
                  }
                ]
              }
            }
          ]
        }
      },
      "type": "n8n-nodes-text-manipulation.textManipulation",
      "typeVersion": 1,
      "position": [
        720,
        -224
      ],
      "id": "2eb84315-389a-4fb0-a479-9f65a5e716fa",
      "name": "TextManipulation"
    },
    {
      "parameters": {
        "jsCode": "const output = [];\n\nfor (const item of $input.all()) {\n  for (const key of Object.keys(item.binary ?? {})) {\n    output.push({\n      json: {\n        fileName: item.binary[key].fileName,\n        mimeType: item.binary[key].mimeType,\n      },\n      binary: {\n        data: item.binary[key],\n      },\n    });\n  }\n}\n\nreturn output;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        128,
        -288
      ],
      "id": "fcf45308-f80d-474b-bc5b-970050a7848e",
      "name": "Split files"
    },
    {
      "parameters": {
        "binaryPropertyName": "zip"
      },
      "type": "n8n-nodes-base.compression",
      "typeVersion": 1.1,
      "position": [
        -64,
        -288
      ],
      "id": "4b19a047-3e00-49df-8841-4158141323d5",
      "name": "Unzip"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "6a51e94f-a80c-4c03-b23d-1224b70ddae7",
              "leftValue": "={{ $json.fileName }}",
              "rightValue": "/\\.(jpg|jpeg|png|webp|gif)$/i",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        320,
        -352
      ],
      "id": "c3d8a037-24d9-4fc7-9e01-b68d3446018a",
      "name": "Only images"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "660e288a-bdb9-45bb-9ec2-58fb0f9b0b30",
              "leftValue": "={{ $json.fileName }}",
              "rightValue": "email.html",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        320,
        -192
      ],
      "id": "52219ef2-c352-482b-8402-2f68dfe1d91b",
      "name": "Only HTML"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const buffer = await this.helpers.getBinaryDataBuffer(0, 'data');\n\nconst textContent = buffer.toString('utf8');\n\nreturn {\n  json: {\n    extractedText: textContent\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        496,
        -192
      ],
      "id": "168510de-1691-4788-863e-9a01a6988e52",
      "name": "Binary to String"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://MJML_SERVICE_DOMAIN/html-to-mjml",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "text/html",
        "body": "={{ $json.html }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        976,
        -368
      ],
      "id": "4dd63e7f-9367-412c-a4ba-65769bf05364",
      "name": "HTML to MJML (json)",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://MJML_SERVICE_DOMAIN/html-to-mjml",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/xml"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "text/html",
        "body": "={{ $json.html }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        976,
        -224
      ],
      "id": "49022acb-5979-4baf-991c-d6b093591bb6",
      "name": "HTML to MJML (xml)",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -256,
        -288
      ],
      "id": "d1b751a0-d2c4-457b-9102-3c2434afa21f",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineAll",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1216,
        -288
      ],
      "id": "8115c493-4d49-40f1-a66b-1072d8347008",
      "name": "Merge"
    }
  ],
  "connections": {
    "TextManipulation": {
      "main": [
        [
          {
            "node": "HTML to MJML (json)",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTML to MJML (xml)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unzip": {
      "main": [
        [
          {
            "node": "Split files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split files": {
      "main": [
        [
          {
            "node": "Only images",
            "type": "main",
            "index": 0
          },
          {
            "node": "Only HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only images": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only HTML": {
      "main": [
        [
          {
            "node": "Binary to String",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Binary to String": {
      "main": [
        [
          {
            "node": "TextManipulation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to MJML (xml)": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Unzip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to MJML (json)": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        []
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "timeSavedMode": "fixed",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "saveDataSuccessExecution": "none"
  },
  "versionId": "42d3b597-93bc-4d9c-ad6a-b8894ded0329",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "YHo1opOPxowH9B9Z",
  "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

file manager. Uses s3, n8n-nodes-text-manipulation, compression, httpRequest. Event-driven trigger; 11 nodes.

Source: https://gist.github.com/rallisf1/3be5169bcc4f00f0ab32d7b5c4b57aef — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.

Execute Workflow Trigger, HTTP Request, Sea Table
Web Scraping

This template is a powerful, reusable utility for managing stateful, long-running processes. It allows a main workflow to be paused indefinitely at "checkpoints" and then be resumed by external, async

HTTP Request, Execute Workflow Trigger
Web Scraping

Upload files from any source to your account Kommo or AmoCRM with a simple and reusable workflow. It can split a large file into small ones and upload chunks. Works for Kommo and amoCRM There are 3 re

HTTP Request, Execute Workflow Trigger, Stop And Error
Web Scraping

Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.

HTTP Request, GitHub, Execute Workflow Trigger +1
Web Scraping

Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates.

Execute Workflow Trigger, HTTP Request, GitHub