diff --git a/docs/nodes/credentials/S3/README.md b/docs/nodes/credentials/S3/README.md new file mode 100644 index 000000000..d9d2b5046 --- /dev/null +++ b/docs/nodes/credentials/S3/README.md @@ -0,0 +1,17 @@ +--- +permalink: /credentials/s3 +--- + +# S3 + +You can find information about the operations supported by the S3 node on the [integrations](https://n8n.io/integrations/n8n-nodes-base.se) page. You can also browse the source code of the node on [GitHub](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes/S3). + +## Prerequisites + +Create an account on S3 compatible server. + +## Using Access Token + +1. Retrieve your S3 endpoint, access key ID, and secret access key from your S3 compatible server. +2. Use the S3 endpoint, access key ID, and the secret access key in your S3 node credentials in n8n. +3. Click on the ***Save*** button to save your credentials. diff --git a/docs/nodes/nodes-library/nodes/S3/HTTPRequest_node.png b/docs/nodes/nodes-library/nodes/S3/HTTPRequest_node.png new file mode 100644 index 000000000..c4547c893 Binary files /dev/null and b/docs/nodes/nodes-library/nodes/S3/HTTPRequest_node.png differ diff --git a/docs/nodes/nodes-library/nodes/S3/README.md b/docs/nodes/nodes-library/nodes/S3/README.md new file mode 100644 index 000000000..3e48aec4b --- /dev/null +++ b/docs/nodes/nodes-library/nodes/S3/README.md @@ -0,0 +1,78 @@ +--- +permalink: /nodes/n8n-nodes-base.s3 +--- + +# S3 + +S3 is an object storage service that allows you to block public access to all of your objects at the bucket or the account level with S3 Block Public Access. S3 maintains compliance programs, such as PCI-DSS, HIPAA/HITECH, FedRAMP, EU Data Protection Directive, and FISMA, to help you meet regulatory requirements. + +::: tip 🔑 Credentials +You can find authentication information for this node [here](../../../credentials/S3/README.md). +::: + +## Basic Operations + +- Bucket + - Create a bucket + - Get all buckets + - Search within a bucket +- File + - Copy a file + - Delete a file + - Download a file + - Get all files + - Upload a file +- Folder + - Create a folder + - Delete a folder + - Get all folders + +**Note:** To attach a file for upload, you will need to use an additional node such as the [Read Binary File](../../core-nodes/ReadBinaryFile/README.md) node or the [HTTP Request](../../core-nodes/HTTPRequest/README.md) node to pass the file as a data property. + +## Example Usage + +This workflow allows you to upload a file to an S3 compatible server and get a list of all the files in a bucket using the S3 node. You can also find the [workflow](https://n8n.io/workflows/674) on n8n.io. This example usage workflow would use the following nodes. +- [Start](../../core-nodes/Start/README.md) +- [HTTP Request](../../core-nodes/HTTPRequest/README.md) +- [S3]() + +The final workflow should look like the following image. + +![A workflow with the S3 node](./workflow.png) + +### 1. Start node + +The start node exists by default when you create a new workflow. + + +### 2. HTTP Request node (GET) + +1. Enter the URL of the file in the ***URL*** field. +2. Select 'File' from the ***Response Format*** field. +3. Click on ***Execute Node*** to run the node. + +![Using the HTTP Request node to get a file](./HTTPRequest_node.png) + + +### 3. S3 node (upload: file) + +1. First of all, you'll have to enter credentials for the S3 node. You can find out how to do that [here](../../../credentials/S3/README.md). +2. Select 'Upload' from the ***Operation*** dropdown list. +3. Enter the bucket name in the ***Bucket Name*** field. +4. Click on the gears icon next to the ***File Name*** field and click on ***Add Expression***. +::: v-pre +5. Select the following in the ***Variable Selector*** section: Nodes > HTTP Request > Output Data > Binary > data > fileName. You can also add the following expression: `{{$node["HTTP Request"].binary.data.fileName}}` +6. Click on ***Execute Node*** to run the node. +::: + +![Using the S3 node to upload a file to a bucket](./S3_node.png) + +### 4. S node (getAll: file) + +1. Select the credentials that you entered in the previous node. +2. Select 'Get All' from the ***Operation*** dropdown list. +3. Enter the bucket name in the ***Bucket Name*** field. +4. Toggle ***Return All*** to true. +5. Click on ***Execute Node*** to run the node. + +![Using the S3 node to get a list of all the files in a bucket](./S_node.png) diff --git a/docs/nodes/nodes-library/nodes/S3/S3_node.png b/docs/nodes/nodes-library/nodes/S3/S3_node.png new file mode 100644 index 000000000..355216dec Binary files /dev/null and b/docs/nodes/nodes-library/nodes/S3/S3_node.png differ diff --git a/docs/nodes/nodes-library/nodes/S3/S_node.png b/docs/nodes/nodes-library/nodes/S3/S_node.png new file mode 100644 index 000000000..1e1e25a5e Binary files /dev/null and b/docs/nodes/nodes-library/nodes/S3/S_node.png differ diff --git a/docs/nodes/nodes-library/nodes/S3/workflow.png b/docs/nodes/nodes-library/nodes/S3/workflow.png new file mode 100644 index 000000000..2436a3669 Binary files /dev/null and b/docs/nodes/nodes-library/nodes/S3/workflow.png differ