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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,614)