Event triggering from workflow but email notification not generating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 09:32 AM - edited 11-02-2022 07:59 AM
Hi,
I have a workflow where I want to send out a custom email notification to approvers that allows them to Approve/Reject a requested item from the links in the email. The goal is to allow customers to appeal (approve) or not appeal (reject) a previous rejection in the workflow via email.
1. I have an Email Template 'New Software Request Approval' used by a custom Email Notification that uses the Approve/Reject links:
2. I have an Email Notification 'Notification - New Software Request Approval' on table 'sysapproval_approver'. It is set to send when Event 'New Software Request Appeal Approval' is fired. There are no conditions. It is sent to 'Approver' and 'Send to event creator' is checked:
3. I have an Event 'New Software Request Appeal Approval' on table 'sysapproval_approver':
EDIT: I have changed the event name to have no spaces - 'new_software_request_appeal'
4. I first tried using the 'Create Event' workflow activity to trigger the event. As per Event Logs, the event triggers on table 'sc_req_item' when using the 'Create Event' workflow activity. I read on another similar post here that the same table as the Email Notification ('sysapproval_approver') may have to be passed to the Event using gs.eventQueue(), so I tried doing this using a 'Run Script' workflow activity, but this results in the Event showing as 'error' in Event Log:
Event Log showing Event triggers and is 'processed' when using 'Create Event' workflow activity:
And Event Log showing Event triggers and is in 'error' state using 'Run Script' workflow activity with gs.eventQueue('New Software Request Appeal Approval', approvalTable, '', '');
So the Event is definitely being triggered (although when using gs.eventQueue() it errors out) but when I check email logs, the Email Notification is not being triggered or sent:
Things I have verified that have been mentioned in other related posts:
- Yes, email is enabled in our test environment. All of the emails pictured in the Email Log above have been sent to my email, and other workflows that contain basic 'Notification' workflow activities are sent to me successfully.
- Yes, the users in the approval group have working emails, and I am a member of the group that the Email Notification is being sent to. I have gotten the Email Notification to function by sending when the OOB event 'req_item.approval.insert' or similar events are fired, but I need to use my custom event and trigger it at a certain point in the workflow.
Sorry for a duplicate post that is similar to what others have already posted, but I have followed all suggestions in other similar posts and I cannot get this to work.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 11:02 AM
Not sure if this is the issue or not, but event names should not have spaces in it. Can you update your event name in the event registry and everywhere else where it is referenced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 01:29 PM
Thanks. I have changed the Event name to have no spaces, but still in the exact same boat.