File size: 3,549 Bytes
51d1d83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
  "meta": {
    "instanceId": "9e331a89ae45a204c6dee51c77131d32a8c962ec20ccf002135ea60bd285dba9"
  },
  "nodes": [
    {
      "id": "5dbcd30b-7f84-4932-9dff-b5e9865f9b07",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        860,
        680
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "639dd225-ae36-4d2b-b341-8662ffe39836",
      "name": "List ALL Files*",
      "type": "n8n-nodes-base.awsS3",
      "position": [
        1080,
        680
      ],
      "parameters": {
        "options": {
          "folderKey": "=yourFolder"
        },
        "operation": "getAll",
        "returnAll": true,
        "bucketName": "=yourBucket"
      },
      "typeVersion": 2
    },
    {
      "id": "cb8b4b07-af86-45b0-9621-a02c22107741",
      "name": "Download ALL Files from Folder*",
      "type": "n8n-nodes-base.awsS3",
      "position": [
        1300,
        680
      ],
      "parameters": {
        "fileKey": "={{ $json.Key }}",
        "bucketName": "=yourBucket"
      },
      "typeVersion": 2
    },
    {
      "id": "df2a3f56-7656-427c-a3b1-df3f1f4997e9",
      "name": "All into one Item (include Binary)",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1520,
        680
      ],
      "parameters": {
        "options": {
          "includeBinaries": true
        },
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "ca0085aa-77f0-4339-8821-11b8e53588da",
      "name": "Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        560
      ],
      "parameters": {
        "width": 367.15098241985504,
        "height": 363.66522445338995,
        "content": "## Instructions\n\nThis workflow downloads all Files from a specific folder in a S3 Bucket and compresses them so you can download it via n8n or do further processings.\n\nFill in your **Credentials and Settings** in the Nodes marked with _\"*\"_.\n\n![Image](https://let-the-work-flow.com/logo-64.png)\nEnjoy the Workflow! ❤️ \nhttps://let-the-work-flow.com\nWorkflow Automation & Development"
      },
      "typeVersion": 1
    },
    {
      "id": "9b12152d-46b8-4e03-9a4b-5bbc0289c78c",
      "name": "Compress all of them to a ZIP",
      "type": "n8n-nodes-base.compression",
      "position": [
        1740,
        680
      ],
      "parameters": {
        "fileName": "=s3-export.zip",
        "operation": "compress",
        "binaryPropertyName": "={{ Object.keys($binary).join(',') }}"
      },
      "typeVersion": 1.1
    }
  ],
  "pinData": {},
  "connections": {
    "List ALL Files*": {
      "main": [
        [
          {
            "node": "Download ALL Files from Folder*",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download ALL Files from Folder*": {
      "main": [
        [
          {
            "node": "All into one Item (include Binary)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "List ALL Files*",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "All into one Item (include Binary)": {
      "main": [
        [
          {
            "node": "Compress all of them to a ZIP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}