Introduction

Managing job queues in Dynamics 365 Business Central can be seamless, until one fails. Job queue failures can impact automated processes, reporting tasks, and system integrations. The earlier you’re notified, the faster you can act.

In this blog, we'll walk you through a Power Automate flow that automatically sends an email alert via Outlook when a job queue failure occurs in Business Central. This proactive approach minimizes downtime and ensures that the right people are informed instantly.

How to Automatically Notify in Outlook

Step 1. Trigger: When a Job Queue Failed Event Occurs (V3)

The Power Automate flow starts with the trigger “When a job queue failed event occurs (V3)”. This step listens for failure events within Business Central’s job queue system. It uses the Business Central connector to hook into the system and monitor the status of scheduled jobs. The moment a failure is logged, the flow is triggered automatically.

When a Job Queue Failed Event Occurs (V3)

Parameters Section

Step 2. Action: Find the Job Queue Entry

Once the failure is detected, this action fetches the corresponding job queue entry, pulling relevant metadata such as job name, status, and related IDs.

Find the Job Queue Entry

This screen shows the configuration for the “Find the job queue entry” step in your Power Automate flow. This step comes right after the trigger "When a job queue failed event occurs (V3)" and is responsible for fetching detailed information about the failed job queue entry from Dynamics 365 Business Central.

Parameters

Step 3. Action: Find the User Contact Email

After identifying the failed job, the flow proceeds to “Find the user contact email”. This action locates the email address of the user who is responsible for the job. By doing so, we can ensure that the notification is sent directly to the person who can take the necessary corrective action, instead of broadcasting alerts to an entire team.

Find the User Contact Email

Step 4. Action: Find Job Queue Log Entry URL

We extract the URL to the job queue’s log entry in Business Central. This allows the recipient to click the link and investigate the error immediately, saving time and guesswork.

Find Job Queue Log Entry URL

Step 5. Action: Send an Email Notification

Finally, we send a professional email with the following contents:

Send an Email Notification

This screen shows the configuration for the “Send an email notification” action in your Power Automate flow. This is the final step of your flow, and it’s responsible for notifying the relevant user via Outlook when a job queue fails in Dynamics 365 Business Central.

Let’s walk through the setup in detail:

To (Recipient Email)

The To field is set to contactEmail, which was retrieved earlier in the flow using the action “Find the user contact email”. This ensures the email is sent directly to the user who scheduled or owns the failed job queue task.

Subject Line

The subject dynamically constructs a descriptive subject for the email. It reads something like:

“The job [Description] scheduled by [User] in [Company] failed”

Here’s how it's composed:

body/description: The name or description of the job from the failed queue entry.

body/userId: The user who scheduled or owns the job.

body/$company: The company in which the job was set up.

This makes it easy for the recipient to quickly understand what the email is about without opening the message.

Email Body

The body of the email provides a clear and actionable summary of the failure:

Failure Details

The first paragraph provides a detailed sentence like:

“The job [Description] scheduled by [User ID] in [Company] failed on [Date] after [X] trials.”

JobQueueEntrySystemId, userId, company, lastModifiedDateTime, and trial count (calculated via an expression) all help describe exactly what went wrong.

Quick Links

Two links are provided:

Job Queue Entry page – Takes the user to the record of the job queue task.

Job Queue Log Entry page – Takes the user directly to the error log entry for deeper troubleshooting.

These links are helpful for navigating directly to the source of the issue in Business Central.

Support Tip

There's a helpful note for users who might want to escalate this issue:

“If you are sharing this with the support team, make sure to include these details: [Error Message]”

This error message is dynamically pulled from the job queue log and will help support teams diagnose the problem faster.

Technical Context

At the bottom, it adds:

Microsoft Entra Tenant ID

Environment

These identifiers are particularly helpful in multi-environment or multi-tenant scenarios, allowing the IT team to know exactly where the failure occurred.

Advanced Parameters

There are more options available under advanced parameters, but only 2 of 7 are currently shown. You could use these to set CC/BCC addresses, importance, attachments, or custom headers if needed.

Conclusion

This Power Automate flow is simple but powerful. It bridges the gap between Business Central job queue monitoring and proactive team communication. With minimal effort, you can ensure that failures don’t go unnoticed, and that your team stays informed and empowered to act.