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 Apps / Get File Name from AI ...
Power Apps
Answered

Get File Name from AI Form Processor

(0) ShareShare
ReportReport
Posted on by 39

Hi,

 

 I have a canvass app that uses a form processor to extract data from a form. The form processor can accept images or pdf files, and after it is analyzed a SharePoint list item is created with the data. I want to upload the file used in the form processor as well.

 

I have created a power automate flow that is able to upload the file as an pdf attachment to the SharePoint list. However, it is hardcoded to save it as a pdf file. I need to be able to save the file as the original file type.

Dmwolny_0-1668880406045.png

 

Categories:
  • Verified answer
    JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Hi @Dmwolny

     

    Getting the file name is unfortunately not possible. Maybe you can use some of the extracted fields from the document by the AI model to use that as the file name?

     

    To get the type, you can do the following condition to the file content that is being sent from the Power App (the same input you're using in the dataUriToBinary function). If it contains application/pdf then the file should be saved as a PDF. If it contains image/jpeg or image/png then it should be saved as an image. 

     

    JoeFMSFT_0-1668963268073.png

     

    I hope this helps! 🙂

  • Dmwolny Profile Picture
    39 on at

    Thanks Joe! Your solution worked like a charm.

     

    The file name isn't as important as the extension. Instead of using compose I initialized a string variable and set the extension in the variable in the condition. Then I jus called the variable in the file name field for the extension.

     

    Thanks again

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard