AutomationFlowsWeb Scraping › Triggerimageanalyze

Triggerimageanalyze

Triggerimageanalyze. Uses awsS3, httpRequest. Webhook trigger; 20 nodes.

Webhook trigger★★★★☆ complexity20 nodesAWS S3HTTP Request
Web Scraping Trigger: Webhook Nodes: 20 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
{
  "nodes": [
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "Qwle5LF0CXTrArUy",
          "mode": "list",
          "cachedResultUrl": "/workflow/Qwle5LF0CXTrArUy",
          "cachedResultName": "firstSubworkflow_analyzeImages"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        288,
        320
      ],
      "id": "b7dcc17f-5127-42c0-aa40-4c1b5f37b6b7",
      "name": "Execute sub_Workflow1",
      "retryOnFail": false
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "Fpwl8Kviz5luVoS4",
          "mode": "list",
          "cachedResultUrl": "/workflow/Fpwl8Kviz5luVoS4",
          "cachedResultName": "secondSubworkflow_analyzeImages"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        288,
        -208
      ],
      "id": "82a8198d-7a09-4308-a92d-1471ef3b6bcb",
      "name": "Execute sub_Workflow2",
      "retryOnFail": false
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "JWlh1EdlXa1MRmav",
          "mode": "list",
          "cachedResultUrl": "/workflow/JWlh1EdlXa1MRmav",
          "cachedResultName": "thirdSubworkflow_analyzeImages"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        288,
        -32
      ],
      "id": "4ae8d879-ee3f-4075-8766-a1011e2b21b7",
      "name": "Execute sub_Workflow3",
      "retryOnFail": false
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "zIOu7RQZudRbNUqh",
          "mode": "list",
          "cachedResultUrl": "/workflow/zIOu7RQZudRbNUqh",
          "cachedResultName": "fourthSubworkflow_analyzeImages"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        288,
        144
      ],
      "id": "f43b19bf-8b53-45f7-a719-44e34fe5f4c0",
      "name": "Execute sub_Workflow4",
      "retryOnFail": false
    },
    {
      "parameters": {
        "bucketName": "<YOUR-S3-BUCKET>",
        "fileKey": "={{ $json.Key }}"
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        -1216,
        -64
      ],
      "id": "2fbbbf6f-8606-486f-aafa-b87696ea150f",
      "name": "Download a file",
      "executeOnce": false,
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// n8n Function Node code to extract only the filename from the Key path\n\n// Get the input data\nconst inputData = $input.all();\n\n// Process each item in the input\nconst outputData = [];\n\ninputData.forEach((item, index) => {\n  // Check if the item has json data (the array)\n  if (item.json && Array.isArray(item.json)) {\n    // Extract filenames from the Key paths\n    item.json.forEach(obj => {\n      if (obj.Key) {\n        // Extract filename from path (everything after the last '/')\n        const filename = obj.Key.split('/').pop();\n        \n        outputData.push({\n          json: {\n            name: filename\n          },\n          binary: item.binary\n        });\n      }\n    });\n  } else if (item.json && item.json.Key) {\n    // If it's a single object with a Key property\n    const filename = item.json.Key.split('/').pop();\n    \n    outputData.push({\n      json: {\n        name: filename\n      },\n      binary: item.binary\n    });\n  }\n});\n\nreturn outputData;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1008,
        -64
      ],
      "id": "5feab33b-4000-4ec0-81ea-11d96c7e9446",
      "name": "extract only images name"
    },
    {
      "parameters": {
        "jsCode": "const inputData = $input.all();\n\n// Process each item in the input\nconst outputData = [];\n\ninputData.forEach((item, index) => {\n  // Check if the item has json data (the array)\n  if (item.json && Array.isArray(item.json)) {\n    // Extract only the Key values from each object in the array\n    const keys = item.json.map(obj => obj.Key);\n    \n    // Add each key as a separate item to the output\n    keys.forEach(key => {\n      outputData.push({\n        json: {\n          Key: key\n        }\n      });\n    });\n  } else if (item.json && item.json.Key) {\n    // If it's a single object with a Key property\n    outputData.push({\n      json: {\n        Key: item.json.Key\n      }\n    });\n  }\n});\n\nreturn outputData;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1392,
        -64
      ],
      "id": "8d8c6157-f954-4998-8b9d-006796f8e253",
      "name": "filter only to get the key"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconsole.log('Total items received:', items.length);\n\n// Calculate chunk sizes for 4 chunks\nconst chunkSize = Math.ceil(items.length / 4);\n\n// Create four chunks\nconst chunk1 = items.slice(0, chunkSize);\nconst chunk2 = items.slice(chunkSize, chunkSize * 2);\nconst chunk3 = items.slice(chunkSize * 2, chunkSize * 3);\nconst chunk4 = items.slice(chunkSize * 3);\n\n// Return as four separate outputs with proper item structure\nreturn [\n  ...chunk1.map((item, index) => ({\n      json: {\n        ...item.json,  // Preserve original JSON data\n        chunkIndex: index,\n        chunkNumber: 1\n      },\n      binary: item.binary\n  })),\n  ...chunk2.map((item, index) => ({\n      json: {\n        ...item.json,\n        chunkIndex: index,\n        chunkNumber: 2\n      },\n      binary: item.binary\n  })),\n  ...chunk3.map((item, index) => ({\n      json: {\n        ...item.json,\n        chunkIndex: index,\n        chunkNumber: 3\n      },\n      binary: item.binary\n  })),\n  ...chunk4.map((item, index) => ({\n      json: {\n        ...item.json,\n        chunkIndex: index,\n        chunkNumber: 4\n      },\n      binary: item.binary\n  }))\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -816,
        -64
      ],
      "id": "ec8d4191-ea45-4856-9911-a8ff85dd2e56",
      "name": "Get only partial of the images"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1fb30555-cb22-463b-b438-04e7e8a172af",
              "leftValue": "={{ $json.chunkNumber }}",
              "rightValue": 2,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -608,
        -64
      ],
      "id": "13214143-0439-40ca-a5b6-6762bf2de820",
      "name": "If batches is 2",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1fb30555-cb22-463b-b438-04e7e8a172af",
              "leftValue": "={{ $json.chunkNumber }}",
              "rightValue": 3,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -304,
        0
      ],
      "id": "f44bb029-9c44-4ae6-87ed-400db89f609d",
      "name": "If batches is 3",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1fb30555-cb22-463b-b438-04e7e8a172af",
              "leftValue": "={{ $json.chunkNumber }}",
              "rightValue": 4,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -176,
        160
      ],
      "id": "c60015bc-4371-4d8e-89d1-1d19ed4b0b26",
      "name": "If batches is 4",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "trigger-image-analyze",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -2240,
        -64
      ],
      "id": "b158411d-f46e-43f0-9897-396c0528225a",
      "name": "Webhook"
    },
    {
      "parameters": {
        "operation": "getAll",
        "bucketName": "<YOUR-S3-BUCKET>",
        "returnAll": true,
        "options": {
          "folderKey": "=preprocessed/images/{{ $('Webhook').first().json.body.companyName }}/"
        }
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        -1552,
        -64
      ],
      "id": "7ae1e184-fc75-476a-8e65-ea4b4469523a",
      "name": "Get many files",
      "alwaysOutputData": true,
      "retryOnFail": false,
      "executeOnce": true,
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cdbeaed1-a283-41c9-b9e2-826b996322da",
              "name": "data",
              "value": "={{ $json.name }}",
              "type": "string"
            },
            {
              "id": "8b6508ba-0072-4ce2-8175-3eb8e5d763a1",
              "name": "companyId",
              "value": "={{ $('Webhook').item.json.body.companyId }}",
              "type": "string"
            },
            {
              "id": "19809515-1d8c-4ecb-afcb-053dff16a384",
              "name": "jobId",
              "value": "={{ $('Webhook').item.json.body.jobId }}",
              "type": "string"
            },
            {
              "id": "5b5ace21-6801-4656-99a1-5848b4afb073",
              "name": "companyName",
              "value": "={{ $('Webhook').item.json.body.companyName }}",
              "type": "string"
            },
            {
              "id": "049ffda7-3800-45bc-b046-2b3871156066",
              "name": "timeStamp",
              "value": "={{ $('Webhook').item.json.body.timestamp }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        48,
        -208
      ],
      "id": "3686735e-55df-4b6b-9771-33fc85b52143",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cdbeaed1-a283-41c9-b9e2-826b996322da",
              "name": "data",
              "value": "={{ $json.name }}",
              "type": "string"
            },
            {
              "id": "5b5ace21-6801-4656-99a1-5848b4afb073",
              "name": "companyName",
              "value": "={{ $('Webhook').item.json.body.companyName }}",
              "type": "string"
            },
            {
              "id": "3d3a049f-31aa-492b-ba79-bc44ef383d26",
              "name": "timeStamp",
              "value": "",
              "type": "string"
            },
            {
              "id": "b34cd872-c467-4d09-b5bd-1531070f4980",
              "name": "timeStamp",
              "value": "={{ $('Webhook').item.json.body.timestamp }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        48,
        320
      ],
      "id": "37c47a87-1776-4c9a-b0b2-9f158f685c9d",
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cdbeaed1-a283-41c9-b9e2-826b996322da",
              "name": "data",
              "value": "={{ $json.name }}",
              "type": "string"
            },
            {
              "id": "5b5ace21-6801-4656-99a1-5848b4afb073",
              "name": "companyName",
              "value": "={{ $('Webhook').item.json.body.companyName }}",
              "type": "string"
            },
            {
              "id": "049ffda7-3800-45bc-b046-2b3871156066",
              "name": "timeStamp",
              "value": "={{ $('Webhook').item.json.body.timestamp }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        48,
        -32
      ],
      "id": "333775e5-dd82-4c1e-ac8c-6843172e7252",
      "name": "Edit Fields3"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cdbeaed1-a283-41c9-b9e2-826b996322da",
              "name": "data",
              "value": "={{ $json.name }}",
              "type": "string"
            },
            {
              "id": "5b5ace21-6801-4656-99a1-5848b4afb073",
              "name": "companyName",
              "value": "={{ $('Webhook').item.json.body.companyName }}",
              "type": "string"
            },
            {
              "id": "049ffda7-3800-45bc-b046-2b3871156066",
              "name": "timeStamp",
              "value": "={{ $('Webhook').item.json.body.timestamp }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        48,
        144
      ],
      "id": "352c9408-e88d-43d0-aa8e-d7aa910da90c",
      "name": "Edit Fields4"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://<YOUR-AWS-API>/fields",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "companyId",
              "value": "={{ $json.body.companyId }}"
            },
            {
              "name": "jobId",
              "value": "={{ $json.body.jobId }}"
            },
            {
              "name": "fieldToUpdate",
              "value": "image2textStatus"
            },
            {
              "name": "updatedValue",
              "value": "1"
            },
            {
              "name": "tables",
              "value": "jobs,companies"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -2064,
        -64
      ],
      "id": "700826f9-631f-4e66-93d6-6d7c22605ae0",
      "name": "image2textStatus -> 1",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "operation": "delete",
        "bucketName": "<YOUR-S3-BUCKET>",
        "fileKey": "={{ $json.Key }}",
        "options": {}
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        -1712,
        -64
      ],
      "id": "90ae2877-fd2d-43cd-8e89-989a98371774",
      "name": "Delete a file",
      "executeOnce": false,
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "bucketName": "<YOUR-S3-BUCKET>",
        "returnAll": true,
        "options": {
          "folderKey": "=image2text/{{ $('Webhook').first().json.body.companyName }}/"
        }
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        -1888,
        -64
      ],
      "id": "968a8526-443c-4b03-a866-3d59b3c716f6",
      "name": "Get many files1",
      "alwaysOutputData": true,
      "executeOnce": true,
      "credentials": {
        "aws": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Download a file": {
      "main": [
        [
          {
            "node": "extract only images name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract only images name": {
      "main": [
        [
          {
            "node": "Get only partial of the images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "filter only to get the key": {
      "main": [
        [
          {
            "node": "Download a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get only partial of the images": {
      "main": [
        [
          {
            "node": "If batches is 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If batches is 2": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If batches is 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If batches is 3": {
      "main": [
        [
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If batches is 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If batches is 4": {
      "main": [
        [
          {
            "node": "Edit Fields4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "image2textStatus -> 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many files": {
      "main": [
        [
          {
            "node": "filter only to get the key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Execute sub_Workflow2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Execute sub_Workflow1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "Execute sub_Workflow3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields4": {
      "main": [
        [
          {
            "node": "Execute sub_Workflow4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "image2textStatus -> 1": {
      "main": [
        [
          {
            "node": "Get many files1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete a file": {
      "main": [
        [
          {
            "node": "Get many files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many files1": {
      "main": [
        [
          {
            "node": "Delete a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}

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

Triggerimageanalyze. Uses awsS3, httpRequest. Webhook trigger; 20 nodes.

Source: https://github.com/thomaschuckle/adspy_intelligence/blob/0e6977922d3a59765a20b3a6d6af65e90b73209b/n8n/triggerImageAnalyze.json — 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

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

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

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request
Web Scraping

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Execute Command, HTTP Request, Read Write File +1