20-02-23 06:39 AM
I have a scenario like multiple invoices will be attached to a single email. Upon successful posting of a invoice the email will be moved to subfolder and remaining invoices errored out as the mail was already in the destination folder, Consider I have 4 invoices in a mail, out of which 3 have posted successfully by bot and one failed, then mail likely has to moved to 2 subfolders, Is there a viable solution to this.
Regards
Surendharan K
01-03-23 06:35 PM
In order to get a recommendation here, some additional information would be useful:
02-03-23 03:38 PM
Hi @SurendharanKuga ,
Can you please clarify what you mean by "Upon successful posting of a invoice the email will be moved to subfolder and remaining invoices errored out as the mail was already in the destination folder"? The reason I'm asking is that when we have multiple files to be attached to a single email communication, we generate a CSV string of the file list and then attach it in one shot to the email being sent.
We confirm that the file exists before adding the path of that file to that CSV string. Therefore, by the time the multiple files are attached to an email, we are in a position to determine how many files failed to be attached from the total number of files expected to be attached to that email communication.
I'm attaching snippets of flows that do something similar to your case, but in our situation if the total number of attachments is not equal to the number of files in the source system, we do not send the email and mark that record as failure (and manual processing).
Hope this helps.