Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - AI Builder
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:
  • Dmwolny Profile Picture
    39 on at
    Re: Get File Name from AI Form Processor

    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

  • Verified answer
    JoeF-MSFT Profile Picture
    on at
    Re: Get File Name from AI Form Processor

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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399