Overview
The Caspio File Create operation node allows you to upload files to a specified folder in your Caspio account via the Caspio API. This is useful for automating file uploads, such as storing documents, images, or other binary data within Caspio applications. Common scenarios include integrating with workflows that generate or process files and need to store them in Caspio for further use or sharing.
Example Use Cases:
- Uploading user-submitted documents from a form to Caspio.
- Saving generated reports or exports directly into a Caspio folder.
- Automating backup of files from another system into Caspio.
Properties
| Name | Type | Meaning |
|---|---|---|
| Folder Id | String | The ID of the Caspio folder where the file will be uploaded. This determines the destination location for the uploaded file. |
| Binary Property | String | The name of the binary property containing the file data to upload. For multipart uploads, you can specify multiple properties in the format: "sendKey1:binaryProperty1,sendKey2:binaryProperty2". Default is data. |
Output
- The output is a JSON object representing the result of the file upload operation as returned by the Caspio API.
- If the upload is successful, the
jsonfield contains details about the uploaded file (such as its metadata). - If an error occurs and "Continue On Fail" is enabled, the
jsonfield will contain anerrorproperty with the error message. - Binary Data: This operation does not output binary data; it only consumes it for uploading.
Example Output:
{
"json": {
// Caspio API response about the uploaded file
"FileId": "12345",
"FileName": "example.pdf",
"FolderId": "67890",
// ...other metadata fields
}
}
If an error occurs:
{
"json": {
"error": "No binary data exists on item!"
}
}
Dependencies
- External Service: Requires access to the Caspio API.
- Credentials: You must configure Caspio credentials in n8n (API key/token).
- n8n Configuration: The node expects binary data to be present on the input item under the specified property name.
Troubleshooting
Common Issues:
Missing Binary Data:
Error:No binary data exists on item!
Resolution: Ensure that the incoming item has a binary property with the file data before this node executes.Incorrect Binary Property Name:
Error:No binary data property "<property>" does not exists on item!
Resolution: Double-check the "Binary Property" value matches the property name containing your file data.Multipart Format Error:
Error:If more than one property should be send it is needed to define the in the format: "sendKey1:binaryProperty1,sendKey2:binaryProperty2"
Resolution: When uploading multiple files, use the correct format for the "Binary Property" field.Authentication/Authorization Errors:
If your credentials are invalid or lack permissions, the Caspio API may return errors.
Resolution: Verify your Caspio credentials and ensure they have permission to upload files.