Facing issue to upload .eml file to Box folder

Hi everyone,

We are trying to upload a .eml file to Box using the UiPath Integration Service (Box connector), and we’re running into an issue that only occurs for .eml files — not for other formats like .pdf.

Here’s the setup and what we’ve tried so far:

  1. We are downloading emails from Office 365 (Outlook) Integration Service and saving them locally as .eml files.
  2. Once the email is saved on disk, we use the Get File or Folder activity to fetch that file from the local path.
  • This activity returns an ILocalResource variable as output.
  1. We then try to pass that resource variable directly into the Box → Upload File activity, which expects an IResource input.

However, during upload, we’re getting the following error:

Error Message:

Upload File: Request failed with error:
ProviderMessage : type - error, status - 400, code - bad_request,
context_info - {errors=[{reason=missing_parameter, name=file_data, message=‘file_data’ is required}]},
help_url - http://developers.box.com/docs/#errors,
message - Bad Request, request_id - [masked]
ProviderErrorCode : 400
RequestId : [masked]
Message : Bad Request
Status code: BadRequest. Error code: DAP-RT-1101.

Interestingly, this issue only happens for .eml files.
If we use the exact same approach for a .pdf file (download → Get File → Upload to Box), the upload works perfectly fine.

What we’ve observed / tried:

  • The Box Upload File activity expects an IResource.
  • The Get File activity only gives an ILocalResource.
  • For .eml files, it seems file_data might not be getting populated internally even after conversion or direct pass.
  • Tried reading bytes manually and recreating a FileResource, but the constructor (New FileResource(file_name := ..., file_data := ...)) isn’t resolving in the Integration Service SDK.

Questions:

  1. Is this a known limitation or bug with .eml file uploads via the Box connector?
  2. Has anyone found a reliable way to convert an ILocalResource to a valid IResource (with file_data populated) for .eml files?
  3. Are .eml files treated differently in Integration Service serialization compared to other file types like .pdf?

Any suggestions or working examples would be appreciated!

Environment:

***UiPath Studio:[2024.10. and 2025.1]
***Integration Service: Office 365 (Outlook), Box
***Packages: UiPath.IntegrationService.Activities (latest)
***Error reproducible:


Yes, 100% when uploading .eml

Hi, @Abhijeet_Sharawat1 Welcome to community!

Use GetResourceForLocalPath: Instead of passing the output from “Get File or Folder” directly, use the GetResourceForLocalPath extension. This can be invoked in an Invoke Code activity:

Dim systemService As ISystemService = New SystemService()
Dim filePath As String = "[FULL_LOCAL_PATH_TO_YOUR_FILE]"
Dim resource As IResource = systemService.GetResourceForLocalPath(filePath, PathType.File)

Replace [FULL_LOCAL_PATH_TO_YOUR_FILE] with your actual .eml file path.
Pass resource to the Box Upload File activity’s “File resource” property

If the above fix does not work and this is a new Integration Service-specific bug, report it to UiPath Support

I was able to get this working with a simple adjustment.
Here’s what worked for me:

After saving the email locally as a .eml file using the Office 365 (Outlook) Integration Service, I used the Get File or Folder activity to retrieve the file from the local path. This returns an ILocalResource variable.

In the Box → Upload File activity, instead of trying to manually convert or reconstruct an IResource, you can simply pass the file name (String) in the “New File Name” property.

  • The file name can be either the original file name or any custom name you want to upload the file with.
  • The ILocalResource output from Get File or Folder can still be used as the input for the “File” property in the Upload File activity — no other changes are needed.
  • Also the same logic works fine for .msg extension files also.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.