When Email Is sent create incident record

Abhijeet Pawar
Tera Contributor

Hello All,

When a new email is sent to the email address xyz123.com a new Incident record should be created.  
 In the Incident form:
The email Subject should populate the Short description field on the Incident. The email Body should populate the Description field on the Incident. The email Sender should populate the Caller field on the Incident (if not from a registered user this will log as being from an unidentified guest). The Assignment group field on the Incident form should default to Service Desk. The Contact type field on the Incident form should default to Email.

Thank You.

3 REPLIES 3

BharathChintala
Mega Sage

@Abhijeet Pawar 

Create a new inbound action which is easy to configure

BharathChintala_0-1674231682922.png

Please set type to new that means consider new emails not reply(RE: )

From fill email xyz123 whatever or else you can use conditions also

BharathChintala_1-1674231762432.png

Script use below this is reference you can modify sligtly

BharathChintala_2-1674231846137.png

Thanks,

Bharath

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

Basheer
Mega Sage

Hi @Abhijeet Pawar ,

You can achieve this through inbound email inbound actions

Go to application navigator

System policy > Email > Inbound Actions

Create new

Give it a proper name as " Incident creation through mail"

target table as incident

Action type as record action

type as new

Keep the condition if you want else leave it as is. 

I'm not populating from as it can be different emails, if you think there is only one email address which is sending mails to servicenow then enter that mail id

 

Come to actions

current.short_description = email.subject;

current.description = email.body_text

current.caller_id = email.from;

current.assignment_group = "SysID of Service Desk"

current.contact_type = "email";

 

If the current object is not working then directly glide into incident table instead of writing above code and insert, let me know if you need help in this coding as well.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

ricker
Tera Guru

@Abhijeet Pawar,

What have you tried on your own?  Where are you stuck?