mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/DocumentsCorePack(DCP)/How to display a generated document using Adaptive Cards

How to display a generated document using Adaptive Cards

1555 views 0 Updated on March 11, 2025

Adaptive Cards are a flexible way to present information within various host applications while maintaining a consistent appearance.  After constructing their content as a JSON-based object, users can post Adaptive Cards across differing platforms while retaining a consistent appearance. 

In combination with DocumentsCorePack, Adaptive Cards can be used to post links to generated documents in other applications.  In this article, we will demonstrate how to post a generated document in a Microsoft Teams chat. 

Step-by-Step: Display a Generated Document in Teams Using Adaptive Cards

Consider a scenario where an official proposal is generated in the back office for a potential client. Instead of manually notifying each sales team member, you can automate this process using Power Automate and Adaptive Cards.

To post a generated document in a Teams chat, we will first need to navigate to Power Automate.  In Power Automate, we will construct a manual flow that will create the document, the Adaptive Card, and post the card into a Teams chat. 

To begin, create an instant cloud flow and select When a row is selected for a trigger. 

Selecting our trigger
Figure 1: Selecting our trigger

Then, set your environment and table name.  For this example, our table name will be Contacts. 

Configuring the trigger
Figure 2: Configuring the trigger

Next, add a Create document (sync) action from the DocumentsCorePack Connector.  Set the ❶ template, ❷ row ID, and ❸ file type under the action’s parameters.  Under the advanced parameters, make sure to enable the ❹ Save to SharePoint parameter and set it to “Yes.” 

Figure 3: Configuring our action

Add another action to the flow, this time from Microsoft Teams, labelled Post card in a chat or channel.  Here, you will need to set four parameters: Post As, Post In, Recipient, and Adaptive Card. 

❶ Post As: Determines “who” should post to Teams.  Set this to Flow bot.
❷ Post In: Determines where the post will be sent to.  We will set this to Chat with Flow bot. 
❸ Recipient: The receiver of the post.  Select who should receive the card. 
❹ Adaptive Card: The JSON structure that describes the Adaptive Card.  The JSON shown in the screenshot can be found below. 

Configuring our card for Teams
Figure 4: Configuring our card for Teams
{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0",
    "body": [
        {
            "text": "A document has been generated!",
            "type": "TextBlock",
            "horizontalAlignment": "Center",
            "size": "Large",
            "weight": "Bolder"
        },
        {
            "text": "Your document can be accessed below:",
            "type": "TextBlock"
        }
    ],
    "actions": [
        {
            "title": "View generated document",
            "type": "Action.OpenUrl",
            "url": "INSERT RETURNVALUE2 FROM CREATE DOC STEP"
        }
    ]
}

You will notice that we are missing the “url” under “actions.”  This should be filled in with the Return value 2 output parameter from the Create document step.  This parameter will contain the SharePoint link that links to our file. 

Adding "Return value 2" to the URL
Figure 5: Adding “Return value 2” to the URL

Our adaptive card in Teams

Once all parameters have been filled in, save your flow.  To test it, navigate to a contact record of your choosing and run the flow.  You will see the Adaptive Card appear in a chat in Teams.  Clicking “View generated document” will open a link to the file. 

The adaptive card as posted in Teams (left) and the generated document (right)
Figure 6: The adaptive card as posted in Teams (left) and the generated document (right)

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

Was this helpful?

Yes  No
Related Articles
  • Deploying DocumentsCorePack: Setup, Automation, and Real Business Impact in Dynamics365
  • Introducing the DocumentsCorePack Template Designer Office Add-In (Beta)
  • 3 Ways DocumentsCorePack Transforms Proposal, Quote, and Contract Creation
  • DeepSign for DocumentsCorePack 
  • Generate and send a document for e-signing using DeepSign
  • How to prepare a document for DeepSign
Latest Articles
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
  • Deploying DocumentsCorePack: Setup, Automation, and Real Business Impact in Dynamics365
  • Introducing the DocumentsCorePack Template Designer Office Add-In (Beta)
  • How to Eliminate Excess Storage Costs in Microsoft Dynamics 365 Without Losing Access to Emails and Attachments
  • 3 Ways DocumentsCorePack Transforms Proposal, Quote, and Contract Creation
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • How licenses are counted
Categories
  • *News and General Infos* 64
  • Webinars 45
  • Template Designer(DCP 196
  • DocumentsCorePack(DCP 258
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.