How to make adaptive card reviewable in the activity tab? and can poster changed to bot in private channel?

msteams icf 5 Reputation points
2024-08-07T12:42:37.9166667+00:00

Hello,

Currently in the middle of migrating from connectors webhook to workflow post to channel when webhook triggered,

using code is python and it is like below:

def Teams_MSG():

teams_msg = {

"type": "AdaptiveCard",

"body": [

{

"type": "TextBlock",

"size": "Medium",

"weight": "Bolder",

"text": "Teams Notification from workflow email"

},

{

"type": "ColumnSet",

"columns": [

{

"type": "Column",

"items": [

{

"type": "Image",

"url": OK_IMAGE,

"altText": "Succeeded",

"size": "Small"

}

],

"width": "auto"

},

{

"type": "Column",

"items": [

{

"type": "TextBlock",

"weight": "Bolder",

"text": "Succeeded",

},

{

"type": "TextBlock",

"spacing": "None",

"text": "TEST",

}

],

"width": "stretch"

}

]

},

{

"type": "FactSet",

"facts": [

{

"title": "Hello!!",

"value": "It's workflow email"

}

]

}

],

"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

"version": "1.6"

}

return teams_msg;

headers = {

'Content-Type': 'application/json'

}

OK_IMAGE = "image"

workflow_url = TEAMS_WORKFLOW_URL

teams_msg=Teams_MSG()

json_data = json.dumps(teams_msg)

encoded_data = json_data.encode('utf-8')

response = requests.post(workflow_url, data=encoded_data, headers=headers)

print(response)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

but the message shows preview unavailable in the activity panel, we have to choose the message to show the content.

also we tried to use PVA (power virtual agent) to post to private teams channel, getting error "Channel is not supported for Power Virtual"

we need a solution for this both situation because connector will be retirement.

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,447 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.