The emailing part is easy and can be built with logic as required. Use any reviewed Uipath Go component or microsoft O365 inbuilt activites.
For getting ‘all’ files from one directory or sub-directories here is the Syntax - Directory.GetFiles(targetDirectory, "*.txt", SearchOption.AllDirectories) in an assign statement which has the accepting variable as an array.
*.txt can be replaced by any file-type you want and if you want all file types to be iterated through then you can keep only ‘**’ for the purpose.
If you want only the sub-folders then you can use the following code - Directory.GetDirectories("yourParentFolderPath") and the resulting array elements will have the full path of the two or more sub-folders that you have in the parent folder. Then subsequently you can iterate through them using Directory.GetFiles("TheArrayItem1or2")
I can see in the error that there are no files in the given directory - so put your invoices with some unique naming system (like it should contain wither the reference ID or something through which you can get it in the conditional statement, that should work)