RPA bot fails to attach invoice PDF to outgoing email in automated billing workflow

Our RPA bot successfully generates invoice PDFs and completes all the data entry tasks, but consistently fails when attempting to attach the generated PDF to the outgoing email. The bot runs through the invoice generation process, saves the PDF to the designated folder, and proceeds to the email composition step. However, the email is sent without the attachment, causing our billing process to fail.

I’ve verified the file path and the PDF is definitely being created in the correct location with proper permissions. The script timing includes a 3-second wait after PDF generation before attempting the attachment. I’m wondering if there’s an attachment size limit I’m hitting, or if the file handle isn’t being released properly before the attachment attempt. This is blocking our entire automated billing workflow and we’re having to manually attach invoices, which defeats the purpose of the automation.

I increased the wait time to 10 seconds but still seeing the same behavior. The email sends successfully but without the attachment. I checked the RPA execution logs and there’s no error message at all - the bot thinks it completed successfully. Could this be a permissions issue where the bot can create the file but the email service can’t read it?

Three seconds might not be enough wait time depending on your PDF generation library. Some PDF generators write to temporary files first and then move them to the final location, which can take longer than expected. Try increasing the wait to 10 seconds and see if that helps.

Check the file permissions on the generated PDFs. The RPA bot service account needs read access, but the email service (which runs under a different account in Creatio) also needs read permissions. Use icacls command to verify both service accounts have proper access to the folder and files. Also check if there’s antivirus software scanning the folder that might be locking the files temporarily.

Good catch on the service account permissions. I verified both accounts have read access, and temporarily disabled antivirus scanning on that folder - still no luck. I’m now wondering if the issue is in how I’m specifying the file path in the attachment step. Should I be using an absolute path or a relative path from the Creatio application directory?