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 / Can't send PenInput to...
Power Apps
Unanswered

Can't send PenInput to Power Automate

(0) ShareShare
ReportReport
Posted on by 7

Hello experts,

 

following this guide

https://matthewdevaney.com/capture-a-signature-with-power-apps-pen-input-and-save-to-sharepoint/

I am unable to send the PenInput to my Power Automate Flow. Getting this error message in the Edge DevTools

 

{
 "error": {
 "code": "TriggerInputSchemaMismatch",
 "message": "The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Required properties are missing from object: file.'."
 }
}

 

 

This is the code I tried:

 

TabletTestAutomation.Run(
 LabelLegalText.Text,
 {
 contentBytes: ImageSignature.Image,
 name: "signature_" & Text(Now() & "yyyyMMddhhmmss" & ".jpg")
 }
)

 

 

( ImageSignature Image uses this FX: PenInputSignatureCustomer.Image )

 

The PA Monitor does show this body:

 

"body": {
 "text": "Beliebiger Rechtstext, den der Kunde unterschreiben muss. Beliebiger Rechtstext, den der Kunde unterschreiben muss. Beliebiger Rechtstext, den der Kunde unterschreiben muss."
 }

 

 

The response message is the same like in the DevTools.

Can anyone explain why this is not working? I also tried to convert the PenInput directly. The PA compiler did not accept that code:

 

// Save PenInput as JSON variable
Set( PenVar, JSON ( PenInputSignatureCustomer.Image, JSONFormat.IncludeBinaryData ) );

// Extract to Base64 sequence
Set( PenInput64Bit, Mid(PenVar, 24, Len(PenVar) - 24 ) );

TabletTestAutomation.Run(
 {
 contentBytes: PenInput64Bit,
 name: Concatenate("signature_", Text(Now(), "yyMMddhhmmss"), ".jpg")
 },
 LabelLegalText.Text
)

 

 

EDIT: That is how the Power Automate Flow Input looks like

esbe_0-1634722124152.png

 




Categories:
I have the same question (0)
  • jinivthakkar Profile Picture
    4,187 on at

    @esbe please can you try changing the trigger in the flow :

    jinivthakkar_1-1634726712153.png

    and then in the create file action : ask in power apps file name and content

     

    and pass both from power app to flow :

     

    TabletTestAutomation.Run(Concatenate("signature_", Text(Now(), "yyMMddhhmmss"), ".jpg"),PenInput64Bit)

     

    Hope this helps.

     

  • eseb Profile Picture
    7 on at

    Thanks for your reply. I tried your solution and changed the trigger as suggested:

    esbe_0-1634729031853.png

     

    But the compiled don't accepts the code:

    esbe_1-1634729081348.png

     

    Here the full code:

     

    // Save PenInput as string variable
    Set( PenVar, JSON ( PenInputSignatureCustomer.Image, JSONFormat.IncludeBinaryData ) );
    
    // Extract to Base64 sequence
    Set( PenInput64Bit, Mid(PenVar, 24, Len(PenVar) - 24 ) );
    
    TabletTestAutomation.Run(Concatenate("signature_", Text(Now(), "yyMMddhhmmss"), ".jpg"),PenInput64Bit) // Compiler ERROR here

     

     

    What I am missing?

     

    EDIT: I changed the trigger back to PowerApp (V2) and figured out that it did work with only one argument.

    TabletTestAutomation.Run(ImageSignature.Image);

    But it didn't work with 2 arguments. I also could not find any documentation for the Run() function. This would help me a lot. Anyway, with only the Image passed the Power Automate Flow does trigger now.

  • jinivthakkar Profile Picture
    4,187 on at

    @esbe so is the issue resolved ? if yes please accept as solution else we can continue addressing the issue.

  • eseb Profile Picture
    7 on at

    No sorry. It is not resolved, because I also need the second variable.

  • jinivthakkar Profile Picture
    4,187 on at

    @esbe this is what I have done and it works

    Set(
     varSignRawImg,
     JSON(
     ImgPreviewSign.Image,
     JSONFormat.IncludeBinaryData
     )
    );
    Set(
     varSign64Bit,
     Mid(
     varSignRawImg,
     24,
     Len(varSignRawImg) - 24
     )
    );
    Set(varTimestamp, Text(Now(), "yyyy-mm-dd hh:mm:ss"));
    
    MyFlow.Run(Concatenate(User().Email,"_" ,varTimestamp, ".jpg"),varSign64Bit)

    in flow - Ask in power apps for file name and content

    jinivthakkar_0-1634741253182.png

    when you do ask in power apps for both then it will take two inputs for flow

    This is working at my end, please try this.

     

  • eseb Profile Picture
    7 on at

    Sorry for my late reply. Something broke and I could not load this page.

    After many tries I've found the problem and why it was not working. This is the working code

    esbe_0-1634831142291.png

    without any compiler errors. As you can see I had to use a semicolon inside the Run( .. ) function. Code snippet as text:

     

     

    // Save PenInput as string variable
    Set(PenVar,JSON(ImageSignature.Image,JSONFormat.IncludeBinaryData));
    // Extract to Base64 sequence
    Set(PenInput64Bit,Mid(PenVar,24,Len(PenVar)-24));
    // File name
    Set(FileName,Concatenate("signature_",Text(Now(),"yyyy-mm-dd_hh_mm_ss"),".jpg"));
    // Submit Form
    SubmitForm(EditForm1);
    // Run Power Automate
    TabletTestAutomation.Run(FileName;PenInput64Bit);

     

     

    But when I pass a JSON object it is required to use a comma:

    esbe_1-1634831595218.png

    Otherwise the compiler would not accept it with a semicolon

    esbe_2-1634831654297.png

    That is really strange, but maybe the reason could be that I am working with a german system. As we know excel does also work with semicolon and not comma. Maybe this is the case for PowerFX?

     

    EDIT: The created file does look strange and cannot be opened ?

    esbe_0-1634834037228.png

     

    How can I change that blob to a jpg?

    esbe_1-1634834097523.png

     

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 Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard