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 / Send keys and dependen...
Power Automate
Answered

Send keys and dependent actions not working in Un attended mode

(0) ShareShare
ReportReport
Posted on by

Hello Folks,

 

I am facing errors whenever I am running the workflow in unattended mode. When I am triggering the flow in attended mode the workflow is working as expected. 

The workflow is about to automate a SAP process using SAP GUI. For reference, I am attaching the snapshot of that specific subflow where the actual error is coming.

 

Abhishek_B_0-1713506567666.png

 

Abhishek_B_1-1713506616384.pngAbhishek_B_2-1713506656218.png

 

 

I have the same question (0)
  • eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at

    Can you share what the actual error message is? Does it actually give error that the send keys action failed or is just not giving the expected results? So is the send keys not navigating to correct place or is the action just failing and stopping the flow or going into error handling?
    Does it give you screenshot in Power Automate cloud side like in the example below:

     

    eetuRobo_1-1713529606921.png

    If the flow doesn't fail because its in an error block that makes it continue then I would add take a screenshot action to get more information what is going on in the unattended run. 

     

    When running unattended the resolution might be much smaller than in the attended mode and that might cause issues. So maybe the shortcut is not working because the screen is not seeing the correct element that shortcut would trigger.

     

  • Abhishek_B Profile Picture
    on at

    Hello @eetuRobo ,

     

    Thank you for your reply!

     

    The workflow does not give any error in action "Send keys". It continues till the OCR (Action no. 24 reference image) and then fails and logs the error.

     

    I tried and turned on the "send text as send keys" with some delay, but it also did not work. Actually, what is the difference between Send keys and  "send text as send keys", if could explain?

     

    As you suggested I will take the screenshot exactly where it is failing before and after the action "Send key". To view the window resolution.

     

    But can you explain how you are able to view it on cloud side?

  • eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at

    @Abhishek_B wrote:

    The workflow does not give any error in action "Send keys". It continues till the OCR (Action no. 24 reference image) and then fails and logs the error.



    Okay then the Send keys -action doesn't actually fail or give error but succeeds. Just that it doesn't trigger the shortcut action you are trying to do. I think the problem might be resolution or that the application is not open in the correct screen that the send keys would do as expected. 

     

    I tried and turned on the "send text as send keys" with some delay, but it also did not work. Actually, what is the difference between Send keys and  "send text as send keys", if could explain?

    "The "Send Keys" Action sends keystrokes to the application that is currently active. It can either be sent in the background as a software input or can be mimicked like from a keyboard when sent as hardware keys."
    Solved post by Ahammad_Riyaz explains that pretty well here: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Send-keys/td-p/2110179


    But can you explain how you are able to view it on cloud side?



    You can view your desktop flow runs from make.powerautomate.com and under Monitor -> Desktop flow runs.

    eetuRobo_0-1713534230400.png


    Then click one of the unattended runs open that says failed.

    eetuRobo_1-1713534290715.png


    And check the screenshot that it took when the flow failed in the last action.



  • Abhishek_B Profile Picture
    on at

    Hello @eetuRobo ,

     

    I have checked the desktop flow activity as well as the flow runs, there is no failure in the "Send keys" action they are successful, but it is failing at "Move OCR" for which we have an error log mechanism. 

     

    As we have initially developed the flow on screen resolution: 1920 * 1080p scale: 125%. By default in unattended mode it is 1920 * 1080p scale: 100%. Now, we will change it test the workflow, and observe.

     

    Thank you for your consistent help!

  • eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at

    Yes so since the fail happens in Move to text with OCR the problem must be that the SAP is not in the correct screen that and so there is not the text OCR is trying to find. 
    So the send keys is actually pressing the keys successfully but its just not really triggering anything in your SAP.

    I also suggest you adding "Focus window" -action before the send keys actions so that the SAP is for sure in the foreground when the keys are being pressed. 

    For trouble shooting I suggest adding "Take screenshot" -action before and after the send keys actions so you can compare if anything happens. Then you can also check if there is maybe a popup or if the SAP windows for what ever reason is not focused or not in the correct screen.

    Happy to help!

  • Verified answer
    Abhishek_B Profile Picture
    on at

    Hello @eetuRobo 

     

    Yes, the points we discussed in our recent chats worked. I have followed the below steps:

    • Changed the resolution and scale as per over initial development (Referred: Set screen resolution on unattended mode)
    • For troubleshoot I have take the screenshot before resolution change and after resolution change it helped to analyze
    • I have made some changes in error and exception  handling mechanism

     

    Note: The issue resolved by making changes in resolution and scale.

     

    We have tested the flow successfully and results were as expected. @eetuRobo,  your support guidance really helped us thank you. 

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard