Skip to main content
Navigator | Tier 3
August 9, 2026
Question

Passing a Word/CSV File as Bot Input variable

  • August 9, 2026
  • 4 replies
  • 17 views

 

I know the API can trigger the bot. The only part I’m not sure about is how to pass a Word or CSV file to the bot as an input, especially since the file is not on the machine where the Bot Agent is running.

Any idea what the best way to handle that would be?

thanks

    4 replies

    Aaron.Gleason
    Automation Anywhere Team
    Automation Anywhere Team
    August 9, 2026

    @DanC25 You can pass a path and filename as an input variable (string), but that would have to point to a network UNC or a file on the local bot runner. If the file is a CSV, that is plain text -- you could pass the contents of the file as a string and, if you need the physical file, you could write a temp file to the bot runner computer. 

    DanC25Author
    Navigator | Tier 3
    August 9, 2026

    @Aaron.Gleason  thanks 

    If we pass the CSV contents to the bot as a string, how can we save that string as a CSV file ?

    Right now, scsvtablefile is a String variable marked as input var, but the CSV/TXT Open action expects an actual file path, not the CSV content itself.

    Is there a way to write the string value to a local txt file and then open it with the CSV/TXT package? Or is there a better way ?

     



    e.g source file cols - Customer Name, Data Protection Software, Version/Service Pack Level,Maintenance Release 

    DanC25Author
    Navigator | Tier 3
    August 9, 2026

    after poking around a bit, I figured out a way to do it using Log to File to save the string as a file. I’m just not sure if there’s a better or more direct way to accomplish the same thing.
     

     

    Aaron.Gleason
    Automation Anywhere Team
    Automation Anywhere Team
    August 9, 2026

    @DanC25 That's the best way I know. Good job!