Hi
I need to use a excel sheet which has a header “Country Name” it has countries like ‘Argentina’, ‘Chile’, ‘Colombia.’
When I get mail with this country names in subject. I need to filter mails and save the attachments.
Another issue here is each country has many mails like “FW: Argentina Facturación AUG2023”,“Argentina Facturación SEP2023”
Hope the question is clear.
Thanks in advance!
Hi @abivanth.r ,
If you want to filter the mail on subject line you can do as below
"@SQL=(\"urn:schemas:httpmail:subject\" LIKE '%Argentina%')"
"@SQL=(""urn:schemas:httpmail:subject"" LIKE '%"+yourvairable+"')"
Regards,
Vinit Mhatre
Hi I am attaching my .xaml please check once
Main.xaml (19.3 KB)
Counrty list 3.xlsx (9.2 KB)
So as per my understanding process is as below tell me if i am not wrong…
- Read the Excel data with countries.
- Get the mail data whose subject line contains countries names one by one.
- save the attachment.
Correct?
yes. but the 1 st country name is argentina. and the mail argentina will eventually go down when other mails comes. so I am getting paused here
So can you tell me how many mails will be there for one Country?
two for argentina, 2 for chile, 4 for colombia. and so on… mails for countries changes
Hi @abivanth.r ,
Try the workflow below; maybe, it will help you. Feel free to ask any questions.
Main.xaml (31.5 KB)
Regards,
Vinit Mhatre
Getting this error at read range
- Check excel path
- Check Sheet name
- Check Range
Thanks for the help!
Worked
Can I get the Attachments saved in a new folder?
EX: Argentina has 2 mails and each contain 2 attachments. that 4 attachments need to be saved in a folder.
then for chile it has 2 mails and it contain 2 attachments as well. i need to put them in a seperate folder.
like this i need to do it for all country.
is it possible? if it is please help me up
cheers
Hi @abivanth.r ,
Yes you can do that also, just add one condition inside for each as below, it will check every time if folder is exist or not, if not then it will create a folder according to the country name
If condition:
path.Exists("Output\"+item("Country Name").ToString)
At last just pass the “Save_path” variable into save attachment
Regards,
Vinit Mhatre
Hi
The if is little confusing. Can you please share the .xaml