The purpose of this app is to monitor a specific folder (key) on an s3 storage for new files. If new files are present, they are downloaded and injected into Switch as a new job.
Afterwards, the files on the S3 storage will either be deleted or moved.
Switch Fall 2022 and higher.
Use our sample flows.
Attach email addresses
field of the 'Error' folder)Action after download
If the file is successfully downloaded and deleted / moved to a different location, it will be send to the data out connection of the flow element.
Download error:
If the file could not be downloaded a dummy job with the name of the file will be send to the outgoing connection.
Delete / Move error:
If the file was downloaded successfully but it could not be deleted or moved to a different location, the file itself will be send to data out.
The light version of the S3 Downloader may not support all of those properties
Property | Value | Description |
---|---|---|
Credentials mode | Enum [Define | Select | Delete] | Define: Allows to define s3 credentials, which will be stored as global data on flow start. Select: Allows to select one of the previous defined credentials. Delete: Allows to delete one or more credentials |
Folder | String | Defines the directory (key) that should be checked for new files every X seconds |
Check every (seconds) | Number | Defines how often the defined folder should be checked for new files. Default=60 |
Minimum file size (KB) | Number | Process only files that have more than X kilobyte. Default=0 |
Process these files | String | Only process files that match the defined regular expression. |
Ignore these files | String | Only process files that do not match the defined regular expression. |
Action after download | Enum [Delete | Move] | Defines if the processed files should be deleted or moved to a different location. |
Property | Value | Description |
---|---|---|
Name | String | Defines the name of the credentials that will be stored |
Server URL | String | Defines the server URL of the storage |
Access key id | String | S3 access key id |
Secret access key | String | S3 Secret access key |
Region | String | S3 region |
Bucket | String | S3 bucket name |
Property | Value | Description |
---|---|---|
Name | String | Defines the name of the credentials to be used by the app |
Property | Value | Description |
---|---|---|
Names | String[] | Defines the names of the credentials to be deleted on flow start |
Property | Value | Description |
---|---|---|
Move files to | String | Move processed files to this location. |
This app uses two types of errors:
The following private data tags will be set if an error occurs:
Tag | Value | Type | Description |
---|---|---|
lastErrorElement | String | the name of the flow element |
lastErrorId | jsonCreateError | |
lastErrorCode | Number | an error code that defines the type of error that occured |
lastErrorMessage | String | detailed error message |
Error Codes:
export enum ERROR_CODES {
downloadError = 6,
deleteError = 7,
moveError = 8
}