Can you help me on how to loop this?

Hello! Im new here. can you help me on how to loop this? i want different values to show in output everytime it loops. and when it loops it create a folder in aws s3 and add itself to its specific folder.

{
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4b79b46830d9e6d34197e1462b4ad9be6cdde6210811b9a42b1875d8ee5b523b"
  },
  "nodes": [
    {
      "parameters": {
        "path": "d98a9b49-6b36-4f42-ac3b-f5c1d503e61a",
        "options": {}
      },
      "id": "fcbc9861-4b77-445b-973f-00189fedfefd",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        20,
        1220
      ],
      "webhookId": "d98a9b49-6b36-4f42-ac3b-f5c1d503e61a"
    },
    {
      "parameters": {
        "operation": "toJson",
        "options": {
          "format": true
        }
      },
      "id": "4a0c0786-c1fa-48e3-b132-0f2d04ad1402",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        680,
        1080
      ]
    },
    {
      "parameters": {
        "fieldToSplitOut": "detail[0].operatorid, detail[0].moduleName",
        "include": "=",
        "options": {}
      },
      "id": "b86b963f-cf80-48e6-aef5-0c845abc204e",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        420,
        1080
      ]
    },
    {
      "parameters": {
        "operation": "upload",
        "bucketName": "dev-ms-n8n-uploadfile-bucket",
        "fileName": "data.json",
        "additionalFields": {
          "parentFolderKey": "=ms/maintenance/uat/operatorid"
        }
      },
      "id": "4e4930ca-2237-4721-a13c-843567a7882e",
      "name": "AWS S32",
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        940,
        1080
      ],
      "credentials": {
        "aws": {
          "id": "onSWVCtLR0PeLQz2",
          "name": "AWS account 2"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "AWS S32",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {
    "Webhook": [
      {
        "type": "maintenance",
        "detail": [
          {
            "operatorid": 0,
            "moduleCode": "DPM",
            "moduleName": "Deposit Mobile",
            "startDate": "2023-11-28 12:50:00.000",
            "endDate": "2023-11-28 13:13:00.000"
          },
          {
            "operatorid": 0,
            "moduleCode": "DPW",
            "moduleName": "Deposit Web",
            "startDate": "2023-11-28 12:50:00.000",
            "endDate": "2023-11-28 13:13:00.000"
          },
          {
            "operatorid": 0,
            "moduleCode": "WPM",
            "moduleName": "Withdrawal Mobile",
            "startDate": "2023-11-28 12:50:00.000",
            "endDate": "2023-11-28 13:13:00.000"
          },
          {
            "operatorid": 0,
            "moduleCode": "WPW",
            "moduleName": "Withdrawal Web",
            "startDate": "2023-11-28 12:50:00.000",
            "endDate": "2023-11-28 13:13:00.000"
          }
        ]
      }
    ]
  }
}```

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

i dont know how to paste the workflow here…

@reve ,

i dont know how to paste the workflow here…

You almost did it. The triple back-ticks should be on its own line. Please, edit your original post and the workflow will be displayed.

image

1 Like

@reve , to split out the details in the webhook, use the field detail instead of detail[0].operatorid, detail[0].moduleName.

1 Like

thank you!!