- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:42 PM
In my inbound email action, I am trying to populate the short description of the incident with email subject and a line from the email body.
Say the email body contains the line "Test:123" and the email subject is "Email Subject". I would like to append both "Test:" value and entire email subject both separated by a comma. How do I achieve this in an inbound email script?
Finally, a short description should look like
123, Email Subject
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:54 PM
Hi Nitish,
You can try using below lines
var bodytxt=email.body.test; //stores value 123 from the mail body
current.short_description=bodytxt+' ,'+email.subject;
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:49 PM
Hi nitesh,
In your inbound action, you reference the various parts of the email as email.subject, email.body, etc. Similarly assuming that your rule has a target table of incident, you simply set current.short_description, etc. to your desired values.
Pulling a value from the body of the email is pretty standard scripting and putting the Test value and email subject together is just a matter of string concatonation, e.g.
current.short_description = stringFromBody + ", " + email.subject;
where stringFromBody is the text you've parsed out of the email body.
Please let me know if you need help finding the Test: string.
Hope this helps.
:{)
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2020 08:37 AM
can you please help here :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:54 PM
Hi Nitish,
You can try using below lines
var bodytxt=email.body.test; //stores value 123 from the mail body
current.short_description=bodytxt+' ,'+email.subject;
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2020 08:37 AM
can you please help here :