# On-prem file trigger - New file in folder
# 1. How it works
This trigger monitors an on-premises folder. Based on a schedule you define, this trigger will check if there is a new file inside that folder. It will read that file and output the file metadata and file contents.
Use this trigger when you have an on-premises folder to which you frequently add files. Examples of these files could be weekly sales reports, marketing videos, daily data dumps from other systems. Using this trigger, you can build a recipe to copy those files and transfer to other file storage systems (for example, Amazon S3, SFTP).
Important Notes:
This trigger supports streaming, which allows you to transfer huge files from your on-premises system to other systems.
Every time this trigger processes a file, it will rename the file and append the text
processing
at the end of filename. This is to prevent the trigger from picking up the file again in the next run, and make sure it only pickup new file in folder.
Trigger renames files when processing them
# 2. Input fields
For this trigger to work, you need to configure 2 main sections:
- Schedule settings
- Folder settings
# 2.1 Schedule settings
Configure this to tell the trigger how often it should check for new file in on-premises folder. There are 2 ways to schedule: interval and date/time.
Using interval, you are telling the trigger to check after certain amount of time.
Using date/time, you are telling the trigger to check at specific time every day.
Optionally, you can choose which days of the week the trigger should run. Use Add/remove optional fields
at the bottom of the form to add this.
# 2.2 Folder settings
Configure this to specify which on-premises folder the trigger should monitor for new file.
Optionally, you can define a naming pattern so the trigger only pick up files with certain names. Enable this input field using Add/remove optional fields
at the bottom of the form.
# 2.3 Other settings
# Chunk size
When you transfer your on-premises files to other systems, the file contents will be streamed to the destination systems in small chunks. This allows transferring files of unlimited size.
The optimal chunk size is automatically handled by Workato. However, if you need to optimize yourself, this Chunk size
field allows you to specify the size of each chunk.
Enable this field using Add/remove optional fields
at the bottom of the form.
# 3. Output
The following is how this trigger's output looks like:
Output pill | Description |
---|---|
File path (original) | File path before trigger processed this file. for example, C:/Program Files/sales_report.pdf |
File path (processed) | When trigger processes a file, it will rename the file and mark as processing . This is the file path after trigger processed the file. for example, C:/Program Files/sales_report.pdf.1526632883663.processing |
File name (processed) | When trigger processes a file, it will rename the file and mark as processing . This is the filename after trigger processed the file. for example, sales_report.pdf.1526632883663.processing |
File contents | Contents of the file. You can use this data pill in other actions, to upload the file to another app. |
File size (bytes) | File size in bytes. |
Created time | The time the file was created. |
Last modified time | The time the file was last modified. |
Last updated: 7/2/2021, 10:57:57 AM