Raja.G
(Mr.RPABot)
September 20, 2024, 3:46am
1
Hi Team,
I am using “Get Email” and “Move Email” activity Office 365 scope outlook, I have input attachment name
Attachment name mail should move one folder to another.
Input: Attachment name = xxx.pdf
I tried "hasattachment eq true and contain(attachment, “xxx.pdf”)
I got error— “Activity type 'VisualBasciValue ‘1’ requires compilation in order to run. Please ensure that the workflow has been”
Please help me anyone for this.
Regards,
Raja G
Anil_G
(Anil Gorthi)
September 20, 2024, 3:49am
2
@Raja.G
As per error your inverted comma might be wrong …please check the same
Also its contains and not contain
Cheers
Anil_G
(Anil Gorthi)
September 20, 2024, 4:03am
4
@Raja.G
Can you please ahow a screenshot of your filter
Also I doubt if we can filter on attachment name directly
Cheers
Raja.G
(Mr.RPABot)
September 20, 2024, 4:06am
5
Hi @Anil_G ,
I am using Get email activity i pass to Query below
"hasattachment eq true and contain(attachment, “xxx.pdf”)
This query store one variable and pass to the Query option
Anil_G
(Anil Gorthi)
September 20, 2024, 4:21am
6
@Raja.G
Inside contains use single quote around name
Cheers
Raja.G
(Mr.RPABot)
September 20, 2024, 4:34am
7
Hi,
I am using below,
Variable = “xxx.pdf”
"hasattachment eq true and contain(attachment, ‘“+Variable+”’)
Not working
Anil_G
(Anil Gorthi)
September 20, 2024, 4:59am
8
@Raja.G
Contains and not contain
Also better filter name with linq
emails = emails.Where(Function(email) email.Attachments.Any(Function(att) att.Name.ToLower().Contains("xxx.pdf"))).ToList()
cheers
Raja.G
(Mr.RPABot)
September 20, 2024, 5:14am
9
Hi @Anil_G ,
What is variable type of “email”.
Raja.G
(Mr.RPABot)
September 20, 2024, 5:19am
10
Hi @lrtetala ,
Hi All,
I am using the ‘Get Mail’ activity from the ‘MS365 activity package’ to get emails and I want to get only those PDF attachments.
I have used “hasattachments eq true” Odata query to filter the emails with attachments but I am not getting the how to filter for PDF attachments only.
I have tried multiple Odata query but they are not working for me below -
“hasattachment=true and contains(attachment , ‘.pdf’)”
“hasattachment eq true and contains(attachment , ‘.pdf’)”
“hasattachment eq t…
Please provide the Variable of “email”.
Regards,
Raja G
lrtetala
(Lakshman Reddy)
September 20, 2024, 5:24am
11
Hi @Raja.G
Can you try this
Variable = "xxx.pdf"
emails = emails.Where(Function(email) email.Attachments.Any(Function(att) att.Name.ToLower().Contains(Variable.ToLower()))).ToList()
Regards,
Anil_G
(Anil Gorthi)
September 20, 2024, 5:27am
12
@Raja.G
Email is a function variable need not be declared
Emails is a list of office365mails
Cheers
Raja.G
(Mr.RPABot)
September 20, 2024, 6:18am
13
Hi @lrtetala ,
I am not sure how i can add “emails” what variabletype, i didnt get emails in property type as well
Anil_G
(Anil Gorthi)
September 20, 2024, 6:24am
14
@Raja.G
Emails is the output of get mails activity
Cheers