Skip to main content
Question

Send Email with attachment

  • December 22, 2025
  • 2 replies
  • 8 views

Forum|alt.badge.img+5

Hello Community,

 

How do I pass a variable to the email attachment field when using Send Email?

The attachment is generated dynamically each time the bot runs and is stored in a variable(string: sfname). I want the email to use that variable so the file gets attached to the case.

I’ve tried using the variable directly, but it doesn’t work and the email is sent with no attachment at all or doesn’t return a list value.

thanks
 

2 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • December 22, 2025

@DanC25 Create a new List variable (based on String typing). Then user the List: Add item action, passing in your $sfname$ variable as the item. Then use the List variable for your attachment. A List is used so you could theoretically attach multiple files to an email. 


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • December 23, 2025

@Aaron.Gleason 

 

thanks, I will try it tomorrow and update you on the outcomes