Hi buddy @Rene_Nielsen
Welcome to UiPath community.
Fine
Once after getting the mail messages as a collection from any of the get mail Activities with a variable named outmailmessages
Now use a for each loop and pass the above variable as input and chanthe tyoe argument of for each loop as mailmessage
If use a assign Activity as you said like this Out_Id = Split(item.Subject.ToString," ")(0).ToString and this works only if the subject is 12345678 House this…as the number is in first position we have mention the split index as 0
Then to save the category use a assign activity like this Out_category = Split(item.Subject.ToString," ")(1).ToString
Then use a save attachment Activity where mention the mail input as item the variable from for each loop and attachmen folder like this Out_category\+“yourfilename”
Or Out_Id\+“yourfilename”
Either of the you want
6. This will save the file from the mail to the folder named with Id or category as per our choice.
Kindly get the cursor to that blue symbol at the edge of the activity, we can see the error message buddy…kindly share that screen shot
We are almost done…
Cheers @Rene_Nielsen
Just change ‘item’ in your expression editor to ‘mail’
that should fix it.
Regards
PS : Explanation :- you are looping the whole collection in a ‘for each’ loop. So it is defined as 'for each item in ‘‘your collection’’ ’ which apparently you changed the ‘item’ variable to ‘mail’.
No worries buddy @Rene_Nielsen
The reason is there is a change been made in the variablename in FOR EACH LOOP, where the actual name would be item, but its been changed now to mail, and the expression that i was suggesting takes on variablename item…
Fine
Just we need a small change
Change it to like this with the expression in the assign Activity Split(mail.Subject.ToString," ")(0).ToString