Bot not generating email due to file not found but see file in directory

I have bot configured to create several csv files and save them to the "Routes" folder and then generate an email with the attached files and the email isn't generating due to the following error in AppSheet Monitoring. I've confirmed the file names are exact and the file does save to the directory. Below is the email file  name format.  Not sure what I'm missing.

Daisy_Ramirez_1-1656547813495.png

 

Daisy_Ramirez_0-1656547762751.png

Daisy_Ramirez_2-1656548257543.png

 

0 5 81
5 REPLIES 5

Steve
Platinum 4
Platinum 4

Possible that the files haven't been fully-created by the time you try to attach them to the mail? Try inserting a wait for 30 seconds and see if that improves things.

Thanks Steve. I thought there was a minimum 5 min on the bot wait
condition? I also have other files in the same workflow with no issues.

Ah, you're right about the wait minimum. You'll have to go with that, then.

Looks like the Wait Condition isn't resolving the issue.  The bot creates 5  files and then attaches them to an email and sends the email.  The client does not want a file to be created if the file is empty (no data) and so I've created a branch condition that checks to see if there are records for each file and then creates the file if yes. If no records, it goes to the next file creation task.

Outside of one file, the files are being created as expected in the directory but the email with attached files is not generating.  My guess is because I've configured the files to be attached but in some cases a file will not be attached. What's the correct expression for the file attachment?  Here's the one I attempted but it doesn't work with TRUE or FALSE.

IF(
[vir_count_missed_scans]>0,
"Files/Routes/"&[Division]&"_MissedStops_"&[route_id]&"_"&[Route Barcode]&".csv",
TRUE)

Daisy_Ramirez_1-1656708490845.png

 

Daisy_Ramirez_0-1656708465411.png

 

 

 

 

FWIW, this is common issue in the Microsoft ecosystem--e.g., when using Power Automate/OneDrive/Excel. Could apply here as well.

Top Labels in this Space