Skip to main content

Teams Integration

Configure Microsoft Teams notifications to receive job failure alerts directly in your Teams channels. Teams integration uses Power Automate Workflows (formerly Connectors) for reliable message delivery.


Prerequisites

Before configuring Teams notifications:

  1. Microsoft Teams Access: You need access to the target Teams channel

  2. Workflow Creation Permission: Ability to create workflows in Teams

  3. Job Queue Admin Setup Complete: Privacy acknowledged and extension enabled


Creating a Teams Workflow

Step 1: Open Teams Channel

  1. Open Microsoft Teams

  2. Navigate to the channel where you want notifications

  3. Access Workflows using one of these methods:

    Method A: Click the ... (More options) menu next to the channel name, then select Workflows

    Method B: Click the + (Add a tab) button at the top of the channel, then select Apps and search for "Workflows"

image-20260208-161407.png

Step 2: Create Webhook Workflow

  1. In the Workflows panel, search for "Send webhook alerts to a channel"

  2. Click on the workflow template

  3. Click Add workflow

image-20260208-162255.png

Step 3: Configure Workflow

  1. Give the workflow a name (e.g., "JQA Notifications")

  2. Select the target Team and Channel

  3. Click Add workflow

  4. Copy the webhook URL - you'll need this for Job Queue Admin

image-20260208-162456.png

After creating the workflow, verify it saved correctly: open the workflow in Power Automate, click the last step "Post card in a chat or channel", and confirm the Team and Channel fields show the correct names. Sometimes these values are replaced with @ symbols and must be re-selected manually.

Important: The webhook URL looks like:

https://prod-XX.westeurope.logic.azure.com:443/workflows/...

Keep this URL secure - anyone with the URL can post to your channel.


Creating a Teams Channel in Job Queue Admin

Step 1: Open Notification Channels

  1. Search for Notification Channels

  2. Or from Job Queue Admin Setup: Actions > Navigate > Notification Channels

Step 2: Create New Channel

  1. Click New to create a new channel

  2. Fill in the required fields:

FieldValue
CodeUnique identifier (e.g., TEAMS-OPS)
Channel TypeTeams
DescriptionDescriptive name (e.g., "IT Operations Teams")
Teams Workflow URLPaste the webhook URL from Step 3 above
EnabledYes

image-20260208-181354.png

Step 3: Save and Test

  1. Click OK to save the channel

  2. Use Send Test Notification action to verify delivery

  3. Check your Teams channel for the test message


Teams Channel Fields

Identification

FieldDescriptionRequired
CodeUnique channel identifierYes
Channel TypeMust be "Teams"Yes
DescriptionHuman-readable nameNo
EnabledActive/inactive toggleYes

Teams Settings

FieldDescriptionRequired
Teams Workflow URLPower Automate webhook URLYes

Teams Workflow URL Format:

  • Must start with https://

  • Typically contains logic.azure.com or office.com

  • Full URL from workflow creation


Teams Message Format

Adaptive Card Structure

Teams notifications are sent as Adaptive Cards directly to Power Automate Workflows:

{ "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.4", "body": [ { "type": "TextBlock", "text": "Job Queue Error", "weight": "Bolder", "size": "Medium", "color": "Attention" }, { "type": "TextBlock", "text": "Test Notification from Job Queue Admin", "wrap": true }, { "type": "FactSet", "facts": [ {"title": "Object", "value": "Codeunit 50000"}, {"title": "Company", "value": "CRONUS"}, {"title": "Error", "value": "This is a test notification..."} ] }, { "type": "ActionSet", "actions": [ { "type": "Action.OpenUrl", "title": "Restart Now", "url": "{Signed Action URL}" }, { "type": "Action.OpenUrl", "title": "Put On Hold", "url": "{Signed Action URL}" }, { "type": "Action.OpenUrl", "title": "View in BC", "url": "{Deep Link to BC}" } ] } ] }

Note: The Adaptive Card is wrapped in a message envelope with type: "message" and attachments array, as required by Teams Workflows. Job Queue Admin handles this wrapping automatically.

Example Teams Message

image-20260208-181649.png

The message includes:

  • Header: "Job Queue Failure" with alert styling

  • Job Details: Description, error, timestamp, company

  • Action Buttons: Interactive buttons for quick actions


Interactive Action Buttons

Teams notifications include interactive buttons that let you take action directly from the notification:

Available Actions

ButtonActionDescription
Restart NowRestarts the jobSets job status to Ready and triggers the scheduler
Put On HoldPuts job on holdPrevents automatic restart, requires manual action
View in BCOpens BCDeep link to the Job Queue Entry card

How It Works

  1. Click an action button in the Teams notification

  2. A browser window opens briefly showing the action result

  3. The job status is updated in Business Central

  4. You can close the browser tab and return to Teams

image-20260208-181815.png

Button Security

  • Action buttons use signed URLs that expire after 7 days

  • Each notification has unique action links

  • Links cannot be forged or tampered with

  • After expiry, you'll see a friendly error asking you to use a more recent notification

Troubleshooting Action Buttons

IssueCauseSolution
"Link has expired"Notification older than 7 daysTrigger a new notification or restart job manually in BC
"Invalid action link"Link was modifiedUse the original link from the Teams notification
"Action failed"BC permissions or job stateCheck you have permissions and job is not currently running
Browser doesn't openTeams security settingsTry right-click > Open in browser

Testing Teams Channel

Using Send Test Notification

  1. Open the Teams Channel card

  2. Click Send Test Notification in the action bar

  3. A test notification is sent immediately

  4. Check your Teams channel for the test message

Verifying Delivery

  1. Check the target Teams channel

  2. Message should appear within seconds

  3. Review Notification Log for send status

Troubleshooting Test Failures

Symptom

Possible Cause

Solution

No message in Teams

Workflow URL incorrect

Verify URL copied correctly

401 Unauthorized

Workflow deleted/disabled

Recreate workflow in Teams

400 Bad Request

Invalid message format

Update to latest extension version

Timeout error

Network connectivity

Check firewall rules

"teamId needs to be a valid GUID"

Workflow Team/Channel values lost (shows @ symbols)

Edit workflow in Power Automate, open "Post card in a chat or channel" step, re-select Team and Channel

"No app ids found on host team"

Using private channel

Must use standard (public) channel - private channels don't support Workflows

"Property 'type' must be 'AdaptiveCard'"

Old app version

Update to latest extension version

Important: Private channels (with lock icon) do not support Power Automate Workflows. You must use a standard/public channel for Teams notifications.


Workflow Management

Viewing Workflow History

  1. Open Teams > Channel > Workflows

  2. Find your JQA workflow

  3. Click to view run history

  4. See success/failure of each notification

image-20260208-181931.png

Updating Webhook URL

If you need to recreate the workflow:

  1. Create new workflow in Teams

  2. Copy new webhook URL

  3. Update Teams Workflow URL in the channel card

  4. Test the channel

Deleting Workflows

Warning: Deleting the workflow in Teams will break notifications.

If you delete the workflow:

  1. Notifications will fail with 401/404 errors

  2. Create a new workflow

  3. Update the URL in the channel card


Multiple Teams Channels

You can create multiple Teams channels for different purposes:

Example: Routing by Team

Channel CodeTeams ChannelDescription
TEAMS-SALES#sales-alertsSales integration failures
TEAMS-OPS#it-operationsGeneral job failures
TEAMS-CRITICAL#critical-alertsCritical system failures

Use Job Configuration to route specific jobs to specific Teams channels.


Best Practices

Workflow Setup

  1. Use dedicated workflows: One workflow per JQA channel

  2. Name clearly: Include "JQA" in workflow name

  3. Document URL location: Note where the URL is stored

Channel Selection

  1. Use appropriate channels: Don't spam general channels

  2. Create dedicated alert channels: Easier to manage

  3. Consider permissions: Who should see job failures?

Trigger Configuration

  1. Start with Error only: Reduce noise initially

  2. Add Cooldown for critical jobs: Important awareness


Security Considerations

Webhook URL Protection

  • Treat URL as sensitive: Anyone with URL can post

  • Don't share publicly: Keep in channel configuration only

  • Rotate if compromised: Create new workflow, update channel configuration

Message Content

  • Error messages visible: Consider what errors contain

  • Deep links require BC access: URL alone doesn't grant access

  • Company name included: Multi-company considerations


Next Steps: Consider adding Slack integration if your team uses both platforms, or configure Job Configurations for channel routing.