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)



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


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


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


1 Like

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.



Try this:



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”.


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

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 .

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


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 .


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

1 Like

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

1 Like

Cheers buddy @Navneetj3