cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sachy123
Regular Visitor

Upload image to adaptive card

So , in my Flow , I am using an Adapative card for Microsoft Teams lite.

 

And in my image editor, I want to use an image which does not reflect my public profile but something that is internal to company organization.

How can I upload my image somewhere in Microsoft Teams?

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @Sachy123 

 

There is a way to upload image in Flow itself.

 

First, use the 'maually trigger a flow' trigger. And add a content input as below:

 1.28-3.PNG1.28-4.PNG1.28-5.PNG

The code is:

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "This is my profile photo",
            "id": "Title",
            "size": "Large"
        },
        {
            "type": "Image",
            "url": "data:image/png;base64,@{string(triggerBody()?['file']?['contentBytes'])}"
        }
    ],
    "spacing": "None"
}

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yiwenxie-msft
Microsoft
Microsoft

Hi @Sachy123 

 

You can use the code as below in the ‘Post your own adaptive card as the Flow bot to a user/channel’ action.

1.20-8.PNG

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "My profile image",
            "id": "Title",
            "size": "Large"
        },
        {
            "type": "Image",
            "altText": "this image is a my profile image",
            "url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg"
        }
    ],
    "spacing": "None"
}

 

Please go to the link to see the information about the code: Image share sample for sharing photos - Power Automate | Microsoft Docs

 

If I've misunderstood your need or you still have problem, please feel free to let me know.

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yiwenxie-msft 

I would not like to refer to an image from twitter or facebook. but I want to refer to an image from my own computer within company network. How do I do it?

Thanks in advance 🙂

v-yiwenxie-msft
Microsoft
Microsoft

Hi @Sachy123 

 

If your company network is not open to public, then the flow cannot get it.

If it is open to public, then you just need to fill the Url.

 

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

But is there a possibility of uploading image in Flow itself?

v-yiwenxie-msft
Microsoft
Microsoft

Hi @Sachy123 

 

There is a way to upload image in Flow itself.

 

First, use the 'maually trigger a flow' trigger. And add a content input as below:

 1.28-3.PNG1.28-4.PNG1.28-5.PNG

The code is:

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "This is my profile photo",
            "id": "Title",
            "size": "Large"
        },
        {
            "type": "Image",
            "url": "data:image/png;base64,@{string(triggerBody()?['file']?['contentBytes'])}"
        }
    ],
    "spacing": "None"
}

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yiwenxie-msft
Microsoft
Microsoft

Hi @Sachy123 

 

But please make sure the image size is less than 28 KB, otherwise flow will get an error.

 

ps. Please don't put anything in the following step:

1.28-6.PNG

 

And upload the picture in the following step:

1.28-7.PNG1.28-8.png

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,684)