> invalid structured type # notSupport [Acti key = value ] > ----------------------------------------------------------------------- > ---------------------Normal card samples------------------------------- > ----------------------------------------------------------------------- # customizedCardActionActivity [Activity Attachments = ${customizedCardActionType()} ] # customizedCardActionType [CardAction Type = yyy Title = title Value = value Text = text ] # HeroCardTemplate(type) [HeroCard title=Cheese gromit! subtitle=${type} text=This is some text describing the card, it's cool because it's cool image=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg images=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg buttons=Option 1| Option 2| Option 3 ] # ThumbnailCardTemplate(type) [ThumbnailCard title=Cheese gromit! subtitle=${type} text=This is some text describing the card, it's cool because it's cool image=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg images=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg buttons=Option 1| Option 2| Option 3 ] # AudioCardTemplate(type) [Audiocard title=Cheese gromit! subtitle=${type} text=This is some text describing the card, it's cool because it's cool image=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg buttons=Option 1| Option 2| Option 3 Media=https://contoso.com/media/AllegrofromDuetinCMajor.mp3 Shareable=false Autoloop=true Autostart=true Aspect=16:9 ] # ReceiptCardTemplate(type, receiptItems) [ReceiptCard Title = John Doe Tax = $ 7.50 Total = $ 90.95 buttons = ${ReceiptButton()} Facts = ${json(ReceiptFacts())} items = ${receiptItems} ] # VideoCardTemplate(type) [VideoCard title=Cheese gromit! subtitle=${type} text=This is some text describing the card, it's cool because it's cool image=https://memegenerator.net/img/instances/500x/73055378/cheese-gromit.jpg buttons=Option 1| Option 2| Option 3 Media=https://youtu.be/530FEFogfBQ Shareable=false Autoloop=true Autostart=true Aspect=16:9 ] # SigninCardTemplate(signinlabel, url) [SigninCard text=This is some text describing the card, it's cool because it's cool buttons=${signinButton(signinlabel, url)} ] # OAuthCardTemplate(signinlabel, url, connectionName) [OAuthCard text=This is some text describing the card, it's cool because it's cool buttons=${cardActionTemplate('signin', signinlabel, url)} ConnectionName=${connectionName} ] # AnimationCardTemplate [AnimationCard Title=Animation Card Subtitle=look at it animate autostart=true autoloop=${true} Image= ${{url:'https://docs.microsoft.com/en-us/bot-framework/media/how-it-works/architecture-resize.png'}} Media= ${{url:'http://oi42.tinypic.com/1rchlx.jpg'}} ] > ------------------------Activity samples---------------------------- > Various types of activities. Support all activity types, including: > message, contactRelationUpdate, conversationUpdate, typing, endOfConversation > event, invoke, deleteUserData, messageUpdate, messageDelete, installationUpdate > messageReaction, suggestion, trace and handoff # eventActivity(text) [Activity Name = ${text} Value = ${text} Type = event ] # customizedActivityType [Activity text = ${{a:'b'}} speak= ${{c:'d'}} type = xxx Name = hi ] # handoffActivity(text) [Activity Name = ${text} Value = ${text} Type = handoff ] # messageActivityAll(title, text) [Activity Text = ${text} Speak = ${text} InputHint = accepting Attachments = ${HerocardWithCardAction(title, text)} SuggestedActions = firstItem | ${cardActionTemplate(null, title, text)} AttachmentLayout = list SemanticAction = ${json(SemanticActionTemplate())} ] > --------------------External File reference samples----------------------- # externalAdaptiveCardActivity [Activity attachments = ${ActivityAttachment(json(fromFile('../adaptiveCard.json')), 'adaptiveCard')} ] # multiExternalAdaptiveCardActivity [Activity attachments = ${foreach(titles, x, ActivityAttachment(externalAdaptiveCard(x), 'adaptiveCard'))} ] # externalAdaptiveCard(adaptiveCardTitle) - ${json(fromFile('../adaptiveCard.json'))} # externalHeroCardActivity(type, title, value) [Activity attachments = ${ActivityAttachment(json(fromFile('.\\herocard.json')), 'herocard')} ] # herocardActivityWithAttachmentStructure [Activity attachments = ${herocardAttachment('imBack', 'taptitle', 'tapvalue')} ] # herocardAttachment(type, title, value) [Attachment contenttype = herocard content = ${json(fromFile('.\\herocard.json'))} ] > --------------------------Other samples--------------------------- # HerocardWithCardAction(title, text) [herocard Title = ${title} Text = ${text} tap = ${cardActionTemplate('imBack', 'taptitle', 'tapvalue')} Buttons = ${cardActionTemplate(null, title, text)} ] # activityWithHeroCardAttachment(title, text) [Activity Attachments = ${HerocardWithCardAction(title, text)} ] # activityWithMultiAttachments(title, text) [activity Attachments = ${HerocardWithCardAction(title, text)} | ${ThumbnailCardTemplate('type')} ] # activityWithSuggestionActions(title, text) [Activity Text = ${text} SuggestedActions = firstItem | ${cardActionTemplate(null, title, text)} ] # activityWithMultiStringSuggestionActions(title, text) [Activity Text = ${text} SuggestedActions = ${getSuggestions()} ] # activityWithMultiStructuredSuggestionActions(text) [Activity Text = ${text} SuggestedActions = ${foreach(getSuggestions(), x, cardActionTemplate(null, x, x))} ] # adaptivecardActivity [Activity Attachments = ${json(adaptivecardjson())} ] # adaptivecardActivityWithAttachmentStructure [Activity Attachments = ${adaptiveAttachment()} ] # adaptiveAttachment [Attachment contenttype = adaptivecard content = ${json(adaptivecardjson())} ] # SuggestedActionsReference(text) [ Activity Text = ${text} ${WelcomeActions()} ] # WelcomeActions [Activity SuggestedActions = Add todo | View Todo | Remove Todo | Cancel | Help ] > --------------internal cardaction templates---------------------- # cardActionTemplate(type, title, value) [CardAction Type = ${if(type == null, 'imBack', type)} Title = ${title} Value = ${value} Text = ${title} ] # signinButton(signinlabel, url) [CardAction Title = ${signinlabel} Value = ${url} type = signin ] # ReceiptButton [CardAction Title = More information Image = https://account.windowsazure.com/content/6.10.1.38-.8225.160809-1618/aux-pre/images/offer-icon-freetrial.png Value = https://azure.microsoft.com/en-us/pricing/ type = openUrl ] > --------------------Internal string templates------------------------- # getSuggestions - ${foreach(split(stringSuggestions(), '$'), x, trim(x))} # stringSuggestions - first suggestion $ second suggestion $ third suggestion # SemanticActionTemplate - ``` { "id": "actionId", "entities": { "key1": { "type": "entityType" } }, "state": null } ``` # ReceiptFacts - ``` [ { "key": "Order Number", "value": "1234" }, { "key": "Payment Method", "value": "VISA 5555-****" } ] ``` # adaptivecardjson - ``` { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "TextBlock", "text": "${adaptiveCardTitle}", "weight": "bolder", "size": "medium" }, { "type": "ColumnSet", "columns": [ { "type": "Column", "width": "auto", "items": [ { "type": "Image", "url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg", "size": "small", "style": "person" } ] }, { "type": "Column", "width": "stretch", "items": [ { "type": "TextBlock", "text": "Matt Hidinger", "weight": "bolder", "wrap": true }, { "type": "TextBlock", "spacing": "none", "text": "Created aa", "isSubtle": true, "wrap": true } ] } ] }, { "type": "TextBlock", "text": "Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.", "wrap": true }, { "type": "FactSet", "facts": [ { "title": "Board:", "value": "Adaptive Card" }, { "title": "List:", "value": "Backlog" }, { "title": "Assigned to:", "value": "Matt Hidinger" }, { "title": "Due date:", "value": "Not set" } ] } ], "actions": [ { "type": "Action.ShowCard", "title": "Set due date", "card": { "type": "AdaptiveCard", "body": [ { "type": "Input.Date", "id": "dueDate" } ], "actions": [ { "type": "Action.Submit", "title": "OK" } ] } }, { "type": "Action.ShowCard", "title": "Comment", "card": { "type": "AdaptiveCard", "body": [ { "type": "Input.Text", "id": "comment", "isMultiline": true, "placeholder": "Enter your comment" } ], "actions": [ { "type": "Action.Submit", "title": "OK" } ] } } ] } ```