Store files from folder
Function: Store files from folder
This action allows you to automatically transfer files from a specified folder (like an FTP server, cloud storage, or a local directory) directly into your platform's Media Library. This is useful for centralizing your assets, archiving documents, or processing incoming files.
Input
- Folder: The location of the folder containing the files you wish to store. This could be a path to a folder on a connected service (e.g., FTP, cloud drive).
- Limit: (Optional) Specify the maximum number of files you want to process from the folder. If you leave this empty, the action will attempt to store all files found in the folder.
- Delete from folder: Choose whether the files should be removed from their original folder after they have been successfully stored in the Media Library. Select "Yes" to move files, or "No" to copy them.
Output
- Media library IDs: A list of unique identifiers for each file that was successfully stored in the Media Library. You can use these IDs to reference the uploaded files in other parts of your application.
- The status: Indicates the outcome of the action. It will show "SUCCESS" if all files were processed without critical errors, or an error message if something went wrong.
Execution Flow
Real-Life Examples
Example 1: Uploading New Product Images
You have a marketing team that regularly uploads new product images to an FTP folder. You want these images to automatically appear in your platform's Media Library for use on your website.
- Inputs:
- Folder:
ftp://yourcompany.com/product_images/new
- Limit: (empty)
- Delete from folder:
No
- Folder:
- Result: All images from the
new
folder on the FTP server are copied to your Media Library. The original images remain on the FTP server. TheMedia library IDs
variable will contain a list of IDs for the newly added images, andThe status
will be "SUCCESS".
Example 2: Archiving Monthly Reports
At the end of each month, your finance department places financial reports in a temporary cloud storage folder. You want to move these reports to your Media Library for long-term archiving and clear the temporary folder.
- Inputs:
- Folder:
cloud-storage://company-data/temp_reports/monthly
- Limit: (empty)
- Delete from folder:
Yes
- Folder:
- Result: All financial reports from the
monthly
folder are moved to your Media Library. Themonthly
folder in cloud storage will be empty. TheMedia library IDs
variable will contain the IDs of all archived reports, andThe status
will be "SUCCESS".
Example 3: Processing a Batch of Customer Documents
You receive a large batch of customer application forms (PDFs) in a shared network folder. You only want to process the first 100 forms for review and move them to the Media Library, leaving the rest for the next batch.
- Inputs:
- Folder:
network-drive://customer_applications/pending
- Limit:
100
- Delete from folder:
Yes
- Folder:
- Result: The first 100 application forms from the
pending
folder are moved to your Media Library. The remaining forms stay in thepending
folder. TheMedia library IDs
variable will contain the IDs of the 100 processed forms, andThe status
will be "SUCCESS".