Skip to content

Teams Notifications

Nemu-x edited this page Jul 24, 2026 · 1 revision

Teams Notifications

SwissKnife can post a summary card to a Microsoft Teams channel every time a playbook (onboarding / offboarding) finishes: who was processed, how many steps ran, what failed. The whole IT team sees the result without opening the app.

How it works

The app sends a plain HTTPS POST with an Adaptive Card to a Teams incoming webhook created via Power Automate (Workflows). No extra Graph permissions are required, and no data leaves your tenant except the POST to your own flow URL.

Why a webhook and not the Graph API? Sending channel messages app-only via Graph is a protected API that requires special Microsoft approval. The webhook path works for everyone, today.

Setup (about 2 minutes)

  1. In Teams, open the target channel → ⋯ → Workflows.
  2. Pick the template “Send webhook alerts to a channel” (trigger: When a Teams webhook request is received).
  3. Choose the Team and channel, create the flow, and copy the HTTP URL shown in the trigger step.
  4. In SwissKnife: Settings → Teams notifications
    • paste the URL,
    • click Save, then Send test card.
  5. A “SwissKnife test notification” card appears in the channel. Enable Notify on playbook completion and you are done.

Troubleshooting

Symptom Fix
Test card never arrives In the flow's trigger, set Who can trigger the flow → Anyone. The app posts without Teams authentication.
Card arrives empty / as raw JSON The flow must post attachments[0].content as an Adaptive Card. The stock “Send webhook alerts” template does this out of the box; custom flows need the Post card in a chat or channel action.
webhook answered HTTP 4xx The flow URL was regenerated or the flow is turned off — copy the current URL from the trigger step again.
Nothing posts after a playbook Check that Notify on playbook completion is enabled and the playbook actually finished (the card is sent once per run, including failed runs).

What gets posted

  • Title with status color: ✅ success, ❌ steps failed, ⏹ canceled
  • Facts: user (UPN), number of steps, result
  • A red line per failed step with its error message
  • Footer with the app name and timestamp

The webhook URL is stored locally in %APPDATA%\SwissKnifeGraph\notify.json (user-scoped permissions). Treat the URL like a secret: anyone who has it can post to your channel. It never appears in the app's logs.

Clone this wiki locally