n8n
n8n is an open-source workflow automation platform. It lets you connect services and applications without coding and automate work with S3-compatible storage. n8n has ready-to-use nodes for object-, prefix-, and bucket-level management.
Configure n8n
1. Configure access to S3
Access can be configured by the Account Owner or a user with the iam.admin role.
- Create a service user with a role with access to S3. If you use a service user with the
s3.user,object_storage_userors3.bucket.userrole, the bucket must have a configured access policy and its rules must allow access to this user. - Issue an S3 key to the user.
2. Prepare n8n
You can:
- purchase an n8n instance on the n8n website and install it on any server or device;
- or use a pre-configured cloud server with n8n.
3. Connect S3 to n8n
-
Open n8n.
-
In the left menu, click and select New credential.
-
In the search box, enter S3.
-
Click Continue.
-
At the Connection step:
5.1. In the S3 Endpoint field, specify the S3 API domain. The domain depends on the pool where S3 is located.
5.2. In the Region field, enter the pool where S3 is located.
5.3. In the Access Key ID field, enter the value of the Access key field from the S3 key that you obtained in step 1.
5.4. In the Secret Access Key field, enter the value of the Secret key field from the S3 key that you obtained in step 1.
5.5. Configure the Force Path Style toggle switch depending on the addressing type in the bucket. If you use:
- Virtual-Hosted addressing — leave the toggle disabled;
- Path-Style addressing — enable the toggle.
5.6. Make sure that the Ignore SSL Issues (Insecure) toggle switch is turned off.
5.7. Click Save → .
-
Check the connection:
6.1. In the left menu, click and select New workflow.
6.2. Click Add first step and select Trigger Manually.
6.3. To the right of the node, click and select S3.
6.4. In the Actions list, select Get many buckets.
6.5. Click Execute step. Upon successful connection, a list of buckets in the pool you specified in step 5.2 will be displayed.
Example of configuring scheduled data backup
In the example, n8n will retrieve data from an external service every day and save it to a bucket with the date in the object name.
-
If you do not have an S3 bucket yet, create one.
-
Open n8n.
-
Configure the Schedule Trigger node:
3.1. In the left menu, click and select New workflow.
3.2. Click Add first step and select Schedule Trigger.
3.3. In the Trigger Interval field, select the unit of time in which you will specify the trigger frequency.
3.4. Depending on the value selected in step 2.3, configure the trigger frequency in the additional fields.
3.5. In the top right corner, click . The data will be saved automatically.
-
Configure the HTTP Request node:
4.1. To the right of the Schedule Trigger node, click and select HTTP Request.
4.2. In the Method field, select GET.
4.3. In the URL field, enter the address from which data is retrieved for backup.
4.4. If the source:
- requires authentication — in the Authentication field, select an authentication method and enter credentials;
- does not require authentication — leave the value None.
4.5. If the request response is returned as a file, for example an archive, in the Options section, click Add option → Response and in the Response Format field, select File. The data will go into a binary field and can be uploaded to S3 as an object.
4.6. Check the node operation: click Execute step. If the node runs successfully, the files will be displayed in the Output section.
4.7. In the top right corner, click . The data will be saved automatically.
-
Configure the Upload a file node:
5.1. To the right of the HTTP Request node, click and select S3 → Upload a file.
5.2. Make sure that the Credential field contains the credentials you added in step 5 when connecting S3 to n8n in step 3.
5.3. In the Resource field, select File.
5.4. In the Operation field, select Upload.
5.5. In the Bucket Name field, enter the name of the bucket to which the files will be uploaded.
5.6. In the File Name field, enter the name template for the uploaded objects. You can specify a name template with a prefix. For example, for the template
backups/{{ $now.format('yyyy-LL-dd') }}.json:- the object will be uploaded under the prefix
/backups; - the expression in double curly braces will substitute the current date.
The object name will look like
backups/2026-06-02.json.5.7. If you specified File in the Response Format field in step 4.5, turn on the Binary File toggle switch.
5.8. If in step 5.7 you:
- turned on the Binary File toggle switch — in the Input Binary Field field, enter the name of the binary field from the HTTP Request node that you configured in step 3, by default
data; - did not turn on the Binary File toggle switch — in the File Content field, specify the key that contains the data to upload. For example, to reference the entire response, specify
{{ $json }}. To reference a specific field, for examplebody, specify{{ $json.body }}.
5.9. Check the node operation: click Execute step. If the node runs successfully, an object will appear in the bucket with a name like
backups/2026-06-02.json.5.10. In the top right corner, click . The data will be saved automatically.
- the object will be uploaded under the prefix
-
Check the operation of the node chain: click Execute workflow.
-
Start the backup automation:
7.1. In the top right corner, click Publish.
7.2. Enter the name of the automation version.
7.3. Click Publish.
Example of configuring automatic cleanup of old objects
In the example, n8n will delete objects with the prefix /backups uploaded more than 30 days ago once a day.
-
If you do not have an S3 bucket yet, create one.
-
Open n8n.
-
Configure the Schedule Trigger node:
3.1. In the left menu, click and select New workflow.
3.2. Click Add first step and select Schedule Trigger.
3.3. In the Trigger Interval field, select the unit of time in which you will specify the trigger frequency.
3.4. Depending on the value you selected in step 2.3, configure the trigger frequency in the additional fields.
3.5. In the top right corner, click . The data will be saved automatically.
-
Configure the Get many files node:
4.1. To the right of the Schedule Trigger node, click and select S3 → Get many files.
4.2. In the Resource field, select File.
4.3. In the Operation field, select Get many.
4.4. In the Bucket Name field, enter the bucket name.
4.5. Configure the number of objects the node will return. For the node to return:
- all objects — turn on the Return All toggle switch;
- limited number of objects — leave the Return All toggle switch turned off and in the Limit field, enter the number of objects to be returned.
4.6. To add a prefix, in the Options section, click Add field → Folder Key and enter the prefix for objects to be deleted, in the example
backup/.4.7. Check the node operation: click Execute step. If the node runs successfully, a list of objects will be displayed in the Output section.
4.8. In the top right corner, click . The data will be saved automatically.
-
Configure the Filter node:
5.1. To the right of the Get many files node, click and select Filter.
5.2. In the condition section, in the data type field, select Boolean → Is true.
5.3. In the value field, select Expression and enter the expression that will identify objects older than 30 days:
{{ $json.LastModified.toDateTime().toUTC() <= $now.minus({ days: 30 }).toUTC() }}5.4. Turn on the Convert types where required toggle switch.
5.5. Check the node operation: click Execute step. If the node runs successfully, the Output → Table section will display objects that pass the filter (the Kept block) and do not pass (the Discarded block).
5.6. In the top right corner, click . The data will be saved automatically.
-
Configure the Delete a file node:
6.1. To the right of the Filter node, click and select S3 → Delete a file.
6.2. In the Resource field, select File.
6.3. In the Operation field, select Delete.
6.4. In the Bucket Name field, enter the bucket name.
6.5. In the File Name field, select Expression and enter the expression
{{ $json.Key }}.6.6. In the top right corner, click . The data will be saved automatically.
-
Configure the Loop Over Items node:
7.1. To the right of the Delete a file node, click and select Loop Over Items.
7.2. Delete the empty nodes added alongside the Loop Over Items node.
7.3. Connect the output of the Loop Over Items node to the input of the Delete a file node.
-
Check the operation of the node chain: click Execute workflow.
-
Start the automation for deleting old files:
9.1. In the top right corner, click Publish.
9.2. Enter the name of the automation version.
9.3. Click Publish.