Skip to main content
Solved

Control Room API - File Input Variable

  • November 12, 2025
  • 2 replies
  • 34 views

Forum|alt.badge.img+5

Hi folks,

Looking at integrating a task bot with one of my external APIs in order to trigger the /v4/automations/deploy endpoint. The task bot accepts an input string and input file, but I’m struggling to find any docs on how to handle the file and content inside the task bot. The task triggers successfully using the following botInput object:

"botInput": {
"sClient": {
"type": "STRING",
"string": client
},
"fFile": {
"type": "FILE",
"string": encoded_file,
"fileName": file.filename
}
}

Am I understanding this correctly? The file is strictly xls/xlsx, content is Base64 encoded.

Thanks!

Nick

Best answer by Padmakumar

Hi ​@Nick Kennedy,

 

Yes, you're mostly correct.

The FILE type in botInput is meant to pass a Base64-encoded file along with its fileName.
However, A360 bots can't directly use this as a file path. You need to:

  1. Accept the Base64 string and filename as STRING inputs.
  2. Decode the Base64 inside the bot (maybe through an inline script).
  3. Save it to a temp path.
  4. Use that path for Excel actions.

This method is more reliable than using type: FILE directly, which is under-documented and may not work as expected.

2 replies

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • 1170 replies
  • Answer
  • November 12, 2025

Hi ​@Nick Kennedy,

 

Yes, you're mostly correct.

The FILE type in botInput is meant to pass a Base64-encoded file along with its fileName.
However, A360 bots can't directly use this as a file path. You need to:

  1. Accept the Base64 string and filename as STRING inputs.
  2. Decode the Base64 inside the bot (maybe through an inline script).
  3. Save it to a temp path.
  4. Use that path for Excel actions.

This method is more reliable than using type: FILE directly, which is under-documented and may not work as expected.


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 13 replies
  • November 12, 2025

Thanks ​@Padmakumar that helped a lot!

For any future people looking for reference, I adjusted the bot inputs to:

"botInput": {
"sClient": {
"type": "STRING",
"string": client
},
"sFileName": {
"type": "STRING",
"string": f"{client}_{file.filename}"
},
"sFileContent": {
"type": "STRING",
"string": encoded_file
}
}

I couldn’t find a package to natively decode the Base64 so created a simple python script - note the Python package in A360 only allows a single argument, therefore $sInputArg$ was a pipe delimited string consisting of $sFileName$|$sFileContent$

import base64
import os

def base64_to_file(inputArg):
try:
fileName = inputArg.split('|')[0]
fileContent = inputArg.split('|')[1]
dir = '{YOUR DESIRED DIRECTORY PATH HERE}'
filePath = os.path.join(dir, fileName)
with open(filePath, "wb") as file:
file.write(base64.b64decode(fileContent))
return f"File saved successfully at {filePath}"
except Exception as e:
return f"An error occurred: {str(e)}"

This successfully created a copy of the original file in the chosen directory ready for use in the task bot.

Thanks again ​@Padmakumar !