Fetch and Store MMS Attachment
This Step helps upload an MMS file provided via URL to Files. After you have uploaded the file, you can use it further in the Flow via the Merge field.
How does the Step work?
You provide the URL to the MMS file and define its status, name, and path. When the Flow reaches the Step, it uploads the file to Files and adds the information about its name, size, extension, and URL to the output. To store a file in another OneReach.ai account, use Cross-account settings.
TIP
This Step is not intended to fetch files stored on FTP/SFTP servers or cloud services like Google Drive, OneDrive, etc.
Prerequisites
To access another OneReach.ai account, make sure you meet the following requirements:
- Your account has the Super Admin role
- Your Flow has the Super Admin Flow permission level
- You have an Account ID or User/Flow Authentication token related to the OneReach.ai account you want to access
File settings
In this section, you define the uploaded file, its path, name, status, and, optionally, how long it will be stored.
The Files service limits the size of the file path to 1024B, equivalent to 1024 Unicode UTF-8 characters. However, Files has to reserve up to 124 characters. Therefore, the defined file path length in the Step, including the file name and extension, should not exceed 900 characters.
The size of the uploaded file is limited to 50 MB.
To set up this section, define the following inputs:
- File URL is the link to the uploaded file that must begin with
http:\\
orhttps:\\
. - File name should be defined without an extension or left empty to keep the original name.
- Folder is where the uploaded file will be stored in your Files.
- File status of the uploaded file that can be later changed
- Set auto-delete time is optional and allows setting a period after which the uploaded file is deleted.
Folder
To upload the file to an existing folder within Files, click Select folder, then choose the folder in the popup window.
Alternatively, the folder can be defined in the folder field in the foldername/
format. Use /
as the divider. If the defined path doesn’t exist, it will be created.
TIP
Enter the / character to upload the file to the root folder.
TIP
If a file with the defined name, extension, and path already exists, it will be overwritten.
Auto-delete time
By default, Files stores the uploaded file indefinitely. To limit the file's time to live (TTL) value, turn on the Set auto-delete time toggle, then define the TTL in the Delete file after field. After the Step has been executed and the set amount of time passes, the file is deleted from Files. TTL limits are between 1min and 365d. Here are examples of acceptable time formats: 1 week, 115h, or 5 min 30 sec.
WARNING
The file URL with expired TTL stays active for up to 5 min.
Cross-account settings
By default, you can upload a file only to your OneReach.ai account. To upload a file to a different OneReach.ai account, do the following:
- Make sure that your OneReach.ai account has the Super Admin role. To check your role, go to Action desk -> Users. The role is defined under the user name. If your role isn't Super Admin, contact OneReach.ai support to change it.
- Go to the General tab of the Flow, then open Deployment settings -> Flow permissions level and select Super Admin.
- Turn on the Use custom authentication token toggle.
- Choose one of the access types and provide respective data:
- For the Authentication token type, select the USER or FLOW type and provide the respective token. Reach out to OneReach.ai support to obtain the value for this token.
- For the Account ID type, provide the Account ID of the user you wish to access. The Account ID value is a unique UUID v4 format
string
value generated for each OneReach.ai account. You can find the option to Copy the account ID in the Profile settings of the OneReach.ai window under the Current account label.
- Save and activate the Flow.
Merge field settings
The Step returns the result as a JSON object and stores it in the Merge field. To learn more about Merge fields, their types, and how to work with them, follow this link.
Output example
The Step’s output includes the following properties:
Key | Type | Description |
---|---|---|
url | String | The link to the uploaded file in Files. |
size | Number | The size of the uploaded file in bytes. |
name | String | The File name of the uploaded file. |
extension | String | The file type and extension in type/extension format. |
ttl | Number | The auto-delete date of the uploaded file in timestamp format. |
See below an example of the Merge field object’s structure:
{
"url": "https://files.staging.api.onereach.ai/public/6d35064f-e424-42fe-9e97-145e4e3f72kb/4b91a186-152g-46eb-dr0d-1a8eb355e8d3/image.jpeg",
"size": 50482,
"name": "image.jpeg",
"extension": "image/jpeg",
"ttl": 1681300119268
}
{
"url": "https://files.staging.api.onereach.ai/public/6d35064f-e424-42fe-9e97-145e4e3f72kb/4b91a186-152g-46eb-dr0d-1a8eb355e8d3/image.jpeg",
"size": 50482,
"name": "image.jpeg",
"extension": "image/jpeg",
"ttl": 1681300119268
}
Error handling
By default, the Step handles errors using a separate exit. If an error occurs during the Step execution, the Flow proceeds down the error exit, e.g., if the file URL does not lead to a file. For more information on error handling, follow this link.
Reporting
The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more about Reporting events, follow this link.