web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help Creating Process ...
Power Automate
Suggested Answer

Help Creating Process To Submit Form with Image and Posting in Teams

(0) ShareShare
ReportReport
Posted on by 2
I have been working at this for awhile and still am not having any luck. The image does not show up in Teams. I have attached the code from the entire flow and an image of the steps. 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    If the image is an attachment in the forms response, you would do this:
    • The expression in the condition checks the question where the file is attached to ensure at least one file has been attached: length(outputs('Get_response_details')?['body/r6fc40495e458471d9746bfcbb098f156'])
    • The content of the parse JSON action is the question that contains the attachment:
      • Use the following for the Scheme: 
        {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "name": {
                        "type""string"
                    },
                    "link": {
                        "type""string"
                    },
                    "id": {
                        "type""string"
                    },
                    "type": {},
                    "size": {
                        "type""integer"
                    },
                    "referenceId": {
                        "type""string"
                    },
                    "driveId": {
                        "type""string"
                    },
                    "status": {
                        "type""integer"
                    },
                    "uploadSessionUrl": {}
                },
                "required": [
                    "name",
                    "link",
                    "id",
                    "type",
                    "size",
                    "referenceId",
                    "driveId",
                    "status",
                    "uploadSessionUrl"
                ]
            }
        }
        • The apply to each is set to the Body of the Parse JSON action.
        • Because I had trouble with some zero-content files, I add a check to make sure the size of the attachment is greater than zero:
         
        You would configure the Get file content action like this, with the id value from the parse JSON action:
         
         
        If your issue is not with getting the file content but including the image in the Adaptive Card, show the configuration of the adaptive card. You'll also probably need to do a check to make sure what was attached is an image. I know there are limitations with images in adaptive cards, especially around how big the image can be. If so, you may want to look at this blog post: Display images in Adaptive Cards
  • Suggested answer
    MParikh Profile Picture
    521 Super User 2026 Season 1 on at

    Hello,

    Here is the stretagic solution I propose. You are in the correct path. 

    Step 1. Create a real FileObject action

    Right after Get response details, add a Compose action named FileObject.

    Expression
     

    first(outputs('Get_response_details')?['body/<YourUploadQuestionId>'])

    Notes

    Use the real upload question id from your form, not <ImageQuestionID>.

    When you run once, FileObject output should be a JSON object with link, name, id, etc.

    Step 2. Build a clean SharePoint file path from the link

    Add a Compose action named SPFilePath.

    Expression
     

    concat(
    
    '/',
    
    first(
    
    split(
    
    last(split(outputs('FileObject')?['link'], '/sites/KennedysTestTeam/')),
    
    '?'
    
    )
    
    )
    
    )

    Why this matters

    The split on “?” strips querystring tokens, which otherwise cause “Invalid request”.

    Step 3. Switch to SharePoint “Get file content using path” from Onedrive

    Replace your current OneDrive for Business action with SharePoint.

    Action

    SharePoint, Get file content using path

    Site Address

    https://ABCD.sharepoint.com/sites/KennedysTestTeam

    File Path

    outputs('SPFilePath')

    This returns the raw bytes reliably for Microsoft Forms file uploads stored in that site.

    Step 4. Post to Teams in a way that keeps the image visible

    Teams message actions do not reliably render inline base64 images. Use one of these two patterns.

    Option A (most reliable)

    SharePoint, Create file (in the Team channel folder)

    1. Folder Path: the channel’s Documents folder path

      File Name: outputs('FileObject')?['name']

      File Content: outputs from “Get file content using path”

    2. Teams, Post message in a channel

      Message: include the SharePoint link to the created file

    Option B (attachment)

    If your tenant connector supports it, use Teams “Post message in a channel (V3)” with an attachment payload using the file content. Many tenants still do not show images inline, they show as an attached file, which is fine.

    Let me know how it goes, Feel free to reply or Please mark this answered if it works.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard