# Microsoft Teams Adaptive Card JSON Generator for Approvals

> Source: https://netray.co/tools/teams-adaptive-card-json-generator-for-approvals
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Creates an Adaptive Card approval message with a fact set, comment input and Approve and Reject actions, wrapped for a Teams webhook or Workflows post.

## Category

developer

## Erp

Microsoft Teams

## Audience

- Integration developer
- Power Automate builder
- ERP admin

## Tool

**Kind:** template

**Output:** code

**Language:** json

**Fields:**

#### Card title

**Key:** title

**Type:** text

**Default:** Purchase order approval needed

#### Subtitle

**Key:** subtitle

**Type:** text

**Default:** Submitted from ERP purchasing

#### Requester

**Key:** requester

**Type:** text

**Default:** Rahul Mehta

#### Document number

**Key:** doc_no

**Type:** text

**Default:** PO-48213

#### Vendor

**Key:** vendor

**Type:** text

**Default:** Northline Castings

#### Amount with currency

**Key:** amount

**Type:** text

**Default:** USD 18,450.00

#### Needed by

**Key:** needed_by

**Type:** text

**Default:** 2026-11-12

#### Link to the document in the ERP

**Key:** link

**Type:** text

**Default:** https://erp.example.com/po/48213

#### Approve button text

**Key:** approve_label

**Type:** text

**Default:** Approve

#### Reject button text

**Key:** reject_label

**Type:** text

**Default:** Reject

**Blocks:**

#### Message body to POST to your Teams Workflows webhook URL

**Body:** {
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": null,
      "content": {
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.4",
        "body": [
          { "type": "TextBlock", "text": "{{title}}", "weight": "Bolder", "size": "Medium", "wrap": true },
          { "type": "TextBlock", "text": "{{subtitle}}", "isSubtle": true, "wrap": true },
          {
            "type": "FactSet",
            "facts": [
              { "title": "Requester", "value": "{{requester}}" },
              { "title": "Document", "value": "{{doc_no}}" },
              { "title": "Vendor", "value": "{{vendor}}" },
              { "title": "Amount", "value": "{{amount}}" },
              { "title": "Needed by", "value": "{{needed_by}}" }
            ]
          },
          { "type": "Input.Text", "id": "comment", "isMultiline": true, "placeholder": "Add a comment (required for Reject)" }
        ],
        "actions": [
          { "type": "Action.Submit", "title": "{{approve_label}}", "style": "positive", "data": { "decision": "approve", "doc": "{{doc_no}}" } },
          { "type": "Action.Submit", "title": "{{reject_label}}", "style": "destructive", "data": { "decision": "reject", "doc": "{{doc_no}}" } },
          { "type": "Action.OpenUrl", "title": "Open in ERP", "url": "{{link}}" }
        ]
      }
    }
  ]
}

**Notes:** Action.Submit only returns data to a bot or an app that handles the submit. A plain incoming webhook cannot receive the click, so for a real approval loop use the Teams Approvals app, a Power Automate flow that waits for a response, or a bot. Validate the JSON in the Adaptive Cards designer and confirm the card version your Teams client supports.

## Content

**Intro:** Adaptive Cards are the JSON format Microsoft Teams uses for rich interactive messages. This generator outputs an approval card with a fact list, a comment box and decision buttons, ready to post from your ERP integration.

**Sections:**

#### How to use it

**Body:** Fill in the document facts you want an approver to see without opening the ERP: requester, number, vendor, amount and need date. Copy the JSON and post it to the HTTP endpoint of a Teams Workflows flow that is set up to post a card to a chat or channel. Keep the Open in ERP link so the approver can drill down when the facts are not enough. Test in a private channel first, and keep the card short, because approvers act on mobile.

#### Getting the decision back

**Body:** A card is only half an approval. The decision must reach your system and be recorded against the document. There are three practical routes: a Power Automate approval action that posts its own card and returns the outcome, a bot registered in Azure that receives the Action.Submit payload, or a link button that opens an ERP approval page with single sign-on. Pick the one your security team accepts, and write the approver identity and time to the audit trail.

**Bullets:**

- Never approve based only on a name typed in a field
- Record the Entra ID user that clicked
- Make decisions idempotent so a double click is harmless

#### Common mistakes

**Body:** Frequent problems include setting a card version newer than the client supports, forgetting wrap on long text so values truncate, hardcoding a webhook URL in source control, and stuffing a whole line item table into the card. Retired Office 365 connector webhooks are being replaced by Workflows, so check which one your tenant uses. Escape quotes in vendor names before inserting values into JSON in code.

**Cta:** Netray can connect your ERP approval workflows to Teams with read-only defaults and human approval on every write-back.

**Faq:**

#### Can I use this card with a classic incoming webhook?

**Answer:** Display works, but button clicks cannot return to a plain webhook. Use a Workflows or Power Automate flow, a bot, or link buttons that open a page in your system.

#### What card version should I choose?

**Answer:** Version 1.4 renders broadly in Teams. Newer versions add features such as Action.Execute with refresh, but you must confirm client support in your tenant.

#### How do I show a table of line items?

**Answer:** Use a ColumnSet for a few rows, or show a count and total with a link to the ERP for the full list. Large tables make cards hard to read on a phone.

#### Is the card secure for financial approvals?

**Answer:** Security depends on the receiving side. Authenticate the clicking user, verify they hold approval rights in the ERP, and log the decision. The card JSON itself is only a display format.

## Search terms

teams adaptive card json generator, teams adaptive card approval example, adaptive card approve reject buttons, teams purchase order approval card, adaptive card factset example, post adaptive card to teams channel, teams workflows adaptive card json, adaptive card designer alternative

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
