Scitor + Microsoft Teams
Post new tickets to a Teams channel
The same idea as the Slack integration, for teams on Microsoft Teams: when Scitor applies its spam:clean label, a GitHub Actions workflow posts a sentiment-colored card to your chosen channel via a Teams Incoming Webhook.
What this workflow does
It fires on every clean incoming ticket and POSTs a MessageCard payload directly to a Teams webhook URL — no marketplace action, just a fetch call. The card is color-coded by AI-assigned sentiment: green for positive, amber for neutral, red for negative.
What it does not do
It does not read replies from Teams back into the ticket. And it depends on a webhook URL, not a marketplace action — Microsoft has been retiring the legacy Office 365 Connectors in Teams, so create the webhook via your channel's Workflows app ("Post to a channel when a webhook request is received") rather than the old Connectors settings page, and confirm it's still active for your tenant before relying on this in production. That retirement schedule was not independently re-verified beyond the general deprecation notice. It also doesn't de-duplicate — removing and re-applying the trigger label on the same ticket posts a second Teams card, so treat the label as a one-shot trigger.
The workflow file
Save this as .github/workflows/teams-ticket-feed.yml in your Scitor-connected repository.
# New ticket Teams notification
#
# Posts a color-coded card to a Microsoft Teams channel for every clean
# incoming Scitor ticket — green for positive sentiment, amber for neutral,
# red for negative.
#
# What this does:
# - Fires once per ticket, when Scitor applies the `spam:clean` label.
# - POSTs a MessageCard payload directly to a Teams Incoming Webhook URL —
# no marketplace action, just a fetch() call.
#
# What this does NOT do:
# - It does not read replies from Teams back into the ticket.
# - Microsoft has been retiring "Office 365 Connectors" (the legacy
# connector type) in favor of Workflows-based webhooks in Teams. Before
# relying on this in production, create the webhook via your target
# channel's Workflows app ("Post to a channel when a webhook request is
# received") rather than the legacy Connectors settings page, and confirm
# it's still active for your tenant — Microsoft's rollout/retirement
# schedule for legacy connectors was not independently re-verified in
# this session beyond the general deprecation notice.
# - It does not de-duplicate: removing and re-applying the trigger label on
# the same ticket posts a second Teams card. Treat the label as a
# one-shot trigger.
#
# Required secret:
# TEAMS_WEBHOOK — the webhook URL from your Teams channel's Workflows
# (or Incoming Webhook connector, where still available).
#
# Source: Scitor's own documented example at
# https://support.scitor.io/guides/github-actions#microsoft-teams-notification
name: New ticket Teams notification
on:
issues:
types: [labeled]
jobs:
teams:
if: >
github.event.label.name == 'spam:clean' &&
github.event.issue.user.login == 'scitor-customerops[bot]'
runs-on: ubuntu-latest
steps:
- name: Post to Teams
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.issue.labels.map(l => l.name);
const category = labels.find(l => l.startsWith('category:'))?.replace('category:', '') ?? 'Uncategorized';
const sentiment = labels.find(l => l.startsWith('sentiment:'))?.replace('sentiment:', '') ?? 'unknown';
const color = { positive: '00B870', neutral: 'F5A623', negative: 'D63C1E' }[sentiment] ?? 'B0B8C8';
const res = await fetch(process.env.TEAMS_WEBHOOK, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
'@type': 'MessageCard',
'@context': 'https://schema.org/extensions',
themeColor: color,
summary: context.payload.issue.title,
sections: [{
activityTitle: `New support ticket — ${category}`,
activitySubtitle: context.payload.issue.title,
facts: [
{ name: 'Sentiment', value: sentiment },
{ name: 'Opened', value: new Date(context.payload.issue.created_at).toUTCString() },
],
}],
potentialAction: [{
'@type': 'OpenUri',
name: 'View ticket',
targets: [{ os: 'default', uri: context.payload.issue.html_url }],
}],
}),
});
if (!res.ok) core.setFailed(`Teams webhook returned ${res.status}`);
env:
TEAMS_WEBHOOK: ${{ secrets.TEAMS_WEBHOOK }} Required secret
| Secret | Where to get it |
|---|---|
| TEAMS_WEBHOOK | Your Teams channel's Workflows app → "Post to a channel when a webhook request is received". Add the resulting URL under Settings → Secrets and variables → Actions in your repository. |
Questions about this integration
- Do I need an Office 365 Connector for this?
- No — and that's deliberate. Microsoft has been retiring the legacy Office 365 Connectors in Teams. Create the webhook through your channel's Workflows app ("Post to a channel when a webhook request is received") instead, which produces the same kind of webhook URL this workflow posts to.
- Why does the card color change?
- The card's theme color reflects Scitor's AI-assigned sentiment label on the ticket (green for positive, amber for neutral, red for negative), so your team gets a signal without opening the card. This requires AI analysis to be enabled (ai: true in scitor.yaml, Pro plan) — without it, tickets fall back to the neutral gray color shown in the workflow.
Your support inbox, visible in Teams
Takes under 5 minutes. Free tier available. No credit card required.