Skip to main content

Upload File

Upload a file to OpenAI file storage for use with assistants, fine-tuning, or batch operations.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. Default: false.
warning

This node requires your own OpenAI API key. It does NOT work with Robomotion AI Credits, as file operations access your OpenAI account storage.

Inputs

  • Connection Id - Connection identifier from Connect node (must use own API key).
  • File Path - Local file path to upload to OpenAI storage.

Options

  • Purpose - Purpose for which the file will be used:
    • assistants - For use with Assistants API (default)
    • fine-tune - For fine-tuning models
    • batch - For batch API operations
    • vision - For vision tasks

Outputs

  • File ID - Unique identifier for the uploaded file.
  • File Object - Complete file object with metadata from OpenAI.

Supported File Formats

c, cpp, css, docx, gif, go, html, java, jpeg, jpg, js, json, md, pdf, php, pkl, png, pptx, py, rb, tar, tex, ts, txt, webp, xml, zip

  • csv, xlsx - May fail despite being in some documentation
  • Audio files (mp3, wav, etc.) - Use Transcribe Audio or Translate Audio nodes instead

How It Works

Uploads a file to your OpenAI account storage:

  1. Validates connection is using your own API key (not Robomotion Credits)
  2. Checks file exists and has supported extension
  3. Uploads file to OpenAI
  4. Returns file ID for use with other OpenAI features

Usage Examples

Example 1: Upload Document for Assistant

Input:
- File Path: "C:/documents/knowledge_base.pdf"
- Purpose: assistants

Output:
- File ID: "file-abc123xyz"
- File Object: {
id: "file-abc123xyz",
object: "file",
bytes: 245632,
created_at: 1234567890,
filename: "knowledge_base.pdf",
purpose: "assistants"
}

Example 2: Upload Training Data

Input:
- File Path: "C:/training/dataset.json"
- Purpose: fine-tune

Output:
- File ID: "file-def456uvw"

Requirements

  • Connection with your own OpenAI API key (Robomotion Credits NOT supported)
  • File in supported format
  • File must exist and be accessible
  • Sufficient storage quota in your OpenAI account

Error Handling

"Upload File is not supported with Robomotion AI Credits"

  • You must use your own OpenAI API key for file operations
  • Create a new connection with your API key from the Vault

"Unsupported file extension"

  • Convert file to a supported format (see list above)
  • For CSV/XLSX, try converting to JSON or TXT

"Audio files cannot be uploaded"

  • Use Transcribe Audio or Translate Audio nodes directly
  • Audio files don't need to be uploaded to file storage

"File extension '.csv' is known to cause issues"

  • CSV support is unreliable; convert to JSON or another format

Tips for RPA Developers

  • Format Selection: Use PDF for documents, JSON for data, PNG/JPEG for images
  • File Size: Check OpenAI's file size limits for your purpose
  • Purpose: Match purpose to your use case for proper access control
  • File ID Storage: Save file_id for reuse across multiple operations
  • Cleanup: Use Delete File node to remove files when no longer needed
  • CSV Issues: Known to be problematic - use JSON or other formats instead
  • Testing: Test file uploads in development before production use

Common Errors

"File Path cannot be empty"

  • Provide a valid local file path

"File does not exist"

  • Verify the file path is correct and file exists