We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

need to fetch task number from the email body

srinidhi
Tera Guru

Hello All,

 

I need to fetch sctask number from the email body and I need to update the record.

please help me with the script.

example number: SCTASK1234567.

 

Thanks.

1 ACCEPTED SOLUTION

Musab Rasheed
Kilo Patron

Hello,

Below is example of fetching number from Subject, you can replicate for body as well.

https://www.servicenow.com/community/service-management-forum/need-to-extract-incident-number-or-cha...

Please hit like and mark my response as correct if that helps
Regards,
Musab

View solution in original post

13 REPLIES 13

Ankur Bawiskar
Tera Patron

@srinidhi 

email is on which table? need to update record what it means?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello @Ankur Bawiskar ,

 

When ServiceNow receives email, I need to fetch the sctask number from the mail body and  need to update the worknotes of the task.

table name: sc_task.

Musab Rasheed
Kilo Patron

Hello,

Below is example of fetching number from Subject, you can replicate for body as well.

https://www.servicenow.com/community/service-management-forum/need-to-extract-incident-number-or-cha...

Please hit like and mark my response as correct if that helps
Regards,
Musab

@Musab Rasheed 

let me try and get back to you

Thanks.