Question

Getting error "Field 'content' must not be null." During loop through mail

  • 29 November 2023
  • 5 replies
  • 192 views

Badge +1

Hi all, I am trying to get the email body but when I run the loop through the mail folder I am facing this error. Is there any solution??

 

 


5 replies

Userlevel 7
Badge +13

Hi @Tayyab 2153 ,

 

From the screenshot, I can see that you are referring the Email dictionary key to display the content incorrectly. For displaying email body, you should use the emailMessage dictionary key. You can also refer the remaining key value pairs here.

 
 
Badge +1

Hi @Tayyab 2153 ,

 

From the screenshot, I can see that you are referring the Email dictionary key to display the content incorrectly. For displaying email body, you should use the emailMessage dictionary key. You can also refer the remaining key value pairs here.

 
 

Hi I want to read the latest email thread data from an email thread. and the first email thread from an email thread.

Userlevel 7
Badge +13

Hi @Tayyab 2153 ,

 

From the screenshot, I can see that you are referring the Email dictionary key to display the content incorrectly. For displaying email body, you should use the emailMessage dictionary key. You can also refer the remaining key value pairs here.

 
 

Hi I want to read the latest email thread data from an email thread. and the first email thread from an email thread.

 

As I mentioned, you need to correct the Dictionary key value in order to get the mail content to be displayed.

 
Userlevel 3
Badge +7

Hi @Tayyab 2153,

I kind of have a logic for you, see if it works.

  1. Filter the email with the subject. whose dictionary key will be “emailSubject”
  2. Get the time of the email receive using dictionary key “emailReceivedTime” and if you want date then “emailReceivedDate”
  3. Then we take a difference of the Received Date and Time with the current date and time using Datetime package
  4. more the difference earliest the email.

 

 

Badge +1

Hi @Tayyab 2153,

I kind of have a logic for you, see if it works.

  1. Filter the email with the subject. whose dictionary key will be “emailSubject”
  2. Get the time of the email receive using dictionary key “emailReceivedTime” and if you want date then “emailReceivedDate”
  3. Then we take a difference of the Received Date and Time with the current date and time using Datetime package
  4. more the difference earliest the email.

 

 

I don't have any specific time, and I don't know when I will receive the email like in the below thread, i want to get the data values with keywords ([EXTMSG],POD and Tenx ). How can I get all the values that have ([EXTMSG],POD and Tenx). And sometimes the user reply the value once and sometimes twice or more.

 

email 5:
App 
  
[EXTMSG] 434343sdf454 
whats 
POD 1324182333 
  
Tenx srgdgg6446645 
there 
Manually 
  
  
Tayyab Imtiaz 
Senior Software Engineer 

  
 
  
From: Muhammad Tayyab Imtiaz 
Sent: Friday, November 24, 2023 4:37 PM 
To: Muhammad Tayyab Imtiaz 
Subject: RE: UBBE 

  email 4:
Tenx srgdgg6446645 
there 
[EXTMSG] 434343sdf454 
whats 
POD 1324182333 
App 
Manually 
  [EXTMSG] 434343sdf454 
whats 
POD 1324182333 
  
Tenx srgdgg6446645 
there 
Manually 
  
  
Tayyab Imtiaz 
Senior Software Engineer 

  
 
  
 
From: Muhammad Tayyab Imtiaz 
Sent: Friday, November 24, 2023 4:36 PM 
To: Muhammad Tayyab Imtiaz 
Subject: RE: UBBE 
 
email 3: 
POD 13241828 
[EXTMSG] ub40226277774 
Tenx 753977553445 
  
  [EXTMSG] 434343sdf454 
whats 
POD 1324182333 
  
Tenx srgdgg6446645 
there 
Manually 
  
Tayyab Imtiaz 
Senior Software Engineer 

  
 
  
From: Muhammad Tayyab Imtiaz 
Sent: Friday, November 24, 2023 4:36 PM 
To: Muhammad Tayyab Imtiaz 
Subject: UBBE 
  
  email 2:
POD 13241818 
[EXTMSG] ub4022620534 
Tenx 090075601 
  
  
Tayyab Imtiaz 
Senior Software Engineer 

  

  

From: Muhammad Tayyab Imtiaz 
Sent: Friday, November 24, 2023 4:36 PM 
To: Muhammad Tayyab Imtiaz 
Subject: UBBE 

email 1:
  
POD 13241818 
[EXTMSG] ub4022620534 
Tenx 090075601 
  
  
Tayyab Imtiaz 
Senior Software Engineer 
 

Reply