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 are using a service user with the
s3.user,object_storage_userors3.bucket.userrole, an access policy must be configured in the bucket 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 preconfigured 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 step Connection:
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 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 is disabled.
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 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 a bucket in S3 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 time unit for specifying 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 upper-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 where backup data is retrieved from.
4.4. If the source:
- requires authorization — in the Authentication field, select the authentication method and enter the credentials;
- does not require authorization — leave the value as None.
4.5. If the response to the request is returned as a file, for example an archive, in the Options block, click Add option → Response, and in the Response Format field, select File. The data will be placed into a binary field and can be uploaded to S3 as an object.
4.6. Test the node operation: click Execute step. If the node runs successfully, the files will appear in the Output.
4.7. In the upper-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 data you added in step 5 when connecting S3 to n8n in stage 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 where files will be uploaded.
5.6. In the File Name field, enter a name template for 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 with 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 in step 4.5 in the Response Format field you specified File, enable the toggle switch Binary File.
5.8. If in step 5.7 you:
- enabled the Binary File toggle — in the Input Binary Field field, enter the name of the binary field from the HTTP Request node configured in step 3, by default
data; - did not enable the Binary File toggle — in the File Content field, specify the key containing the data to upload. For example, to reference the entire response, specify
{{ $json }}. To reference a specific field, such asbody, specify{{ $json.body }}.
5.9. Test the node operation: click Execute step. If the node runs successfully, an object with a name like
backups/2026-06-02.jsonwill appear in the bucket.5.10. In the upper-right corner, click . The data will be saved automatically.
- the object will be uploaded with the prefix
-
Test the node chain operation: click Execute workflow.
-
Start the backup automation:
7.1. In the upper-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 /backups prefix uploaded more than 30 days ago once a day.
-
If you do not have a bucket in S3 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 time unit for specifying 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 upper-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 — enable the toggle Return All;
- a limited number of objects — leave the Return All toggle disabled and in the Limit field, enter the number of objects to be returned.
4.6. To add a prefix, in the Options block, click Add field → Folder Key and enter the prefix with which objects will be deleted, in the example
backup/.4.7. Test 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 upper-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 block, 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. Enable the toggle Convert types where required.
5.5. Test 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 those that do not (the Discarded block).
5.6. In the upper-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 upper-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.
-
Test the node chain operation: click Execute workflow.
-
Start the automation for deleting old files:
9.1. In the upper-right corner, click Publish.
9.2. Enter the name of the automation version.
9.3. Click Publish.