Teams cards
A workflow can stop and ask a person a question. It posts a card in a Microsoft Teams channel and waits. This page shows how to set that up and how to use it for approvals.
Approval works this way in Anthara. There is no approve button in the web app.
Before you begin
Section titled “Before you begin”- An admin has set up the Microsoft Teams bot for your deployment. See Microsoft Teams.
- You know the ID of the Teams channel where cards should appear.
Make a step interactive
Section titled “Make a step interactive”Add interactive: true and the channel ID under the step’s config. Then tell the agent in the prompt when to ask.
name: Ticket Approvalslug: ticket-approvaltrigger: type: manual config: inputs: - name: issueKey type: string
steps: - name: ask-for-approval type: ai_task config: interactive: true teams_channel_id: "19:replace-with-your-channel-id@thread.v2" teams_service_url: "https://smba.trafficmanager.net/teams/" llm_config: system_prompt: | Use your tools. Ask the team before you act. prompt: | Ask the team whether work on {{inputs.issueKey}} may start. Call the tool mcp__anthara__ask_with_card once, with: - a card title "Approval needed" - a card description that names the ticket - one question, "Approve this ticket?", with the options "Approve" and "Reject" When the answer arrives, reply with one JSON object: {"issueKey": "{{inputs.issueKey}}", "decision": "<approved or rejected>"}| Setting | Required | Meaning |
|---|---|---|
interactive |
Yes | Set to true to give the agent the card tools. |
teams_channel_id |
Yes | The channel where cards are posted. |
teams_service_url |
No | The Teams service address for your region. |
card_title, card_description |
No | The title and description shown for the card in the run view. |
The two card tools
Section titled “The two card tools”The agent posts cards by calling a tool. Name the tool in your prompt so the agent uses it.
| Tool | What it does |
|---|---|
mcp__anthara__ask_with_card |
Posts a card with questions, then waits for the answer. |
mcp__anthara__notify_card |
Posts a card with a title and a description. It does not wait. |
A question card has a title, a description, and one to five questions. A question with options shows choices. A question without options shows a text box. The card has one button, Submit Response.
The agent may ask one question card per turn. Use notify_card once, as the last message of the run.
What happens while the workflow waits
Section titled “What happens while the workflow waits”- The agent posts the card.
- The worker saves its session and stops. Nothing runs while the workflow waits.
- The run shows the status Collaboration Loop.
- A person answers the card in Teams and selects Submit Response.
- A new worker starts, loads the saved session, and continues with the answers.
The first answer that is submitted is the one the workflow uses.
A scheduled workflow that is waiting on a card does not block its schedule. The next scheduled run starts on time.
Stop waiting
Section titled “Stop waiting”Open the run and select Stop to cancel it. See Runs.
Approve suggested fixes to your standards
Section titled “Approve suggested fixes to your standards”A step with review_fixes: true under config gets two more tools. mcp__anthara__ask_fix_approval posts a card that lists suggested changes to your AI Coding Standards. mcp__anthara__apply_review_fixes applies the changes that were approved.
This card has stricter rules than an ordinary card:
- Only an Anthara admin who has connected Microsoft Teams under Connections can answer it.
- It expires 24 hours after it is posted.