Skip to main content

Find the source of an email notification

Steps to follow to find which batch job or workflow an email is being sent from.

H
Written by Harry Ledger
Updated over 2 months ago

An email will have been sent from one of two places, a batch job or a workflow.

πŸ“Œ Note: Some batch jobs are scheduled to run workflows which may send an email.

Requirements

  1. The name of the person who received the notification/e-mail.

  2. The date and time the email was received.

  3. The header text of the email and body (whole copy of the actual email is even better).


Check if an email has been sent via a batch job

To check if the email has been sent via batch job, follow these steps.

  1. Create a new export- logging into the SelectSystem Database.

  2. Copy the following SQL to your clipboard.

  3. Click Options.

  4. Click Paste SQL from Clipboard:

Select Batch.Messages.Subject, Batch.Jobs.Description, Batch.Jobs.[Job Name], Batch.Jobs.[Job Number] From Batch.Messages Inner Join Batch.Jobs On Batch.Jobs.[Job Number] = Batch.Messages.[Job Number] Where Batch.Messages.Subject Like '%REPLACE WITH SUBJECT%'

This export will check the batch jobs for a configured email as it appears in the batch job configuration screen.


Check if an email has been sent via a workflow

To check if the email has been sent via workflow, follow the steps below.

  1. Create a new Export- logging into the SelectSystem Database.

  2. Copy the following SQL to your clipboard.

  3. Click Options.

  4. Click Paste SQL from Clipboard:

Select Batch.Jobs.[Job Name], Batch.Workflows.[Workflow Number], Workflow.MessagingActivities.[Workflow Name], Workflow.MessagingActivities.Subject, Workflow.MessagingActivities.Body From Batch.Jobs Right Join Batch.Workflows On Batch.Jobs.[Job Number] = Batch.Workflows.[Job Number] Right Join Workflow.MessagingActivities On Batch.Workflows.[Workflow Number] = Workflow.MessagingActivities.[Workflow Number] Where Workflow.MessagingActivities.Subject Like '%REPLACE WITH SUBJECT%'

This export will check workflows related to batch jobs for a configured email stage.

πŸ“Œ Note: If the email is sent using any kind of data for the employee like their name then you will need to adapt the query for this.

E.g An employee has received an email which has the subject reading as "Absence request for John Doe for 18th Dec".
​
Your query in the criteria column of the export should read as Like 'Absence request for%' to ensure the name and date do not interfere.

Did this answer your question?