Getting following error on IF while using IMAP 'Object Reference not set to an instance of an object'

I am using Imap to move some of my mails from inbox to a folder.The rules are mentioned on an excel sheet .on If statement i am getting below error .Sequence2.xaml (8.0 KB)

image

@Navneetj3

This error generally occurs when you are trying to pass null value.

@lakshman Thanks lakshman for replying.i am having trouble locating it .I have attached the xaml file. could you be more precise .

Hi @Navneetj3
Check if statement variable values by printing it on the screen…it might help to find the cause

1 Like

@Navneetj3

Your workflow looks good. And also try like this inside IF condition:

m1.Sender.Address.Contains(row(“Sender”).tostring.trim)

Just try to print these values before IF condition and check once.

m1.Sender.Address.Tostring
row(“Sender”).Tostring

1 Like

@lakshman
getting the “object reference not set to instance of an object” error for "m1.sender.address.tostring " while i tried to print using write line .

I tried to test “getimapmailmessage” in seprate sequence .getting error reading mail.

.

@Navneetj3

Try this:

item.From.Tostring

2 Likes

This works :v:
but at move Imap mail message activity i tried all the combination for destination mail folder .But getting “the requested folder could not be found”.

image

1 Like

Hi buddy @Navneetj3

Mention like this buddy “Inbox\yourfolder” in the folder property
If its not in inbox, then just “foldername”

Hope this would help you buddy
Cheers

1 Like

@Palaniyappan I tried it but it is not working …

Buddy can i have a screenshot of your move mail activity property… @Navneetj3

This is the folder structure .
image

and i am using move imap mail message as below -

1 Like

Try with “ICICI” alone buddy, its a direct folder buddy. . kindly try this and let know buddy @Navneetj3

Cheers @Navneetj3

@Navneetj3

I guess ICICI is not subfolder of Inbox here. Simply specify ICICI alone and try.

did that work buddy @Navneetj3

1 Like

were you able to get now buddy @Navneetj3

@Palaniyappan Palaniyappan i tried with ICICI but the problem was still there .
image

thanks!

Can i have a view on this activity property once if possible
Cheers @Navneetj3

1 Like

@Palaniyappan
I was using wrong input (Fromfolder).Now it is working fine with “ICICI” .:v: Thanks for your help .I appreciate it.
Regards,
Navneet

1 Like

Fantastic
Cheers buddy @Navneetj3