Trying to trigger catalog item (and workflow) from inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:22 PM
I'm working on trying to trigger a catalog item (and the associated workflow) via an inbound email action. I've got to where it will create the request and RITM are created but the workflow and catalog items don't get created. Here's my script:
createRequest();
function createRequest() {
//Create Request
var grRequest = new GlideRecord("sc_request");
grRequest.initialize();
grRequest.requested_for = '5136503cc611227c0183e96598c4f706';
grRequest.short_description = email.subject.toString();
grRequest.description = "received from: " + email.origemail + "\n\n" + email.body_text;
var requestSysId = grRequest.insert();
//Create Request Item
current.requested_for = '95a20ff34776301063df0923846d431d';
current.short_description = email.subject.toString();
current.description = "received from: " + email.origemail + "\n\n" + email.body_text;
current.cat_item = '570b0c4e97358d1030fd307e6253afaf';
current.parent = requestSysId;
current.request = requestSysId;
current.insert();
}
I've been going around in circles with this for a while now and it's making me crazy! Any help is greatly appreciated!!
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:28 PM
Check out the below post
Please mark helpful/correct if this has helped you.
Thanks,
Logan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 05:28 PM
Hello KeithM,
Is there anything else I can assist you with? If not, would you mind marking my reply as correct so that it shows as solved for others who may have the same question in the future.
Thanks,
Logan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:24 AM
The video had a lot of good information in it but still wouldn't create the catalog tasks. I've even dummied it down to the point where all there is on the catalog item is a short description and description field. Here's where I'm at:
I've created the inbound email flow:
Here's the action to create the Catalog Item Request
Here's the flow for the New Hire Catalog Item Request:
Whenever I get an email with the subject line of New Hire, it doesn't create anything. I have no idea why.
Any help is greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:39 AM
Hello Keith,
That looks fine. What happens if you test your flow in the top right of designer? (Note, you don't need to send a whole email, just click the + beside email record and create one on the spot as received).
Also, if you've published your flow already and sent a test email into your instance, can you locate the email in the logs and do you see where the flow executed under "Executions"?
Please mark my answer as correct/helpful if it has helped you.
Thanks,
Logan