Skip to main content
Andoni_1
Navigator | Tier 3
Navigator | Tier 3
June 26, 2023
Question

When running bot with e-mail trigger, is it possible to get the attachment(s) and save them?

  • June 26, 2023
  • 3 replies
  • 273 views

When running bot with e-mail trigger, is it possible to get the attachment(s) and save them?

I didn’t see this option at all…

Thanks!

3 replies

Navigator | Tier 3
June 27, 2023

No, it’s not currently possible with email triggers.

Triggers provide record variable with details of triggering event, in case of email:
Available keys: emailFrom,emailTo,emailSubject,emailMessage,emailReceivedDate,action,host,port

You would need to write logic inside the task to download attachment from email. Email trigger would just tell you: you have some email matching your criteria, further logic needs to be performed within the task.

Andoni_1
Navigator | Tier 3
Andoni_1Author
Navigator | Tier 3
June 27, 2023

No, it’s not currently possible with email triggers.

Triggers provide record variable with details of triggering event, in case of email:
Available keys: emailFrom,emailTo,emailSubject,emailMessage,emailReceivedDate,action,host,port

You would need to write logic inside the task to download attachment from email. Email trigger would just tell you: you have some email matching your criteria, further logic needs to be performed within the task.

I think this functionality should be added...lots of business cases rely on the attachment of the email received! The only solution that I can think of (moreover, if CR is a Cloud deployment one) is to use Power Automate for email triggering and attachment handling. After Power Automate handles the attachment and saves it, AA bot can be triggered. I can’t think of any other solution (because there is no direct way of getting the attachment of the trigger email in AA isn’t it?). Thanks for your answer btw!

Cadet | Tier 2
June 30, 2023

Technically, the trigger does not save the attachment(s). It just starts the BOT. I created a BOT that is triggered by an email then when in the “code”, I targeted the triggered email to download the attachment(s).