Approving a request using inbound email action

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2022 03:55 AM
I want to approve a request using an inbound email action.
Below mentioned is my inbound action script:
Script:
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
// // Implement email action here
var arr=email.subject.split(" ")
var req_item=arr[0];
current.addQuery('sysapproval',req_item)
current.query()
while(current.next()){
current.state="approved"
}
current.update()
})(current, event, email, logger, classifier);
I For example, i am trying to approve the below mentioned record in sysapproval_approval table.
Below mentioned is the email template.
If there is any alternative and easiest way to approve any request item using inbound email action, please suggest the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2022 04:39 AM
Hi,
This is already happening OOB
I didn't get why new inbound action is created
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2022 11:26 AM
Hi Ankur,
It's not working for me.
Thanks