cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JosephGiri
Frequent Visitor

Uploading from Desktop to OneDrive without local OneDrive folders

I am using PowerAutomate Desktop (PAD) to fill an online form in Chrome (https://code.thunderquote.com/PaynowQR/) and then download the resulting file onto my desktop.

This process is part of a flow that then needs to send that file on to the next step in the process. I thus need to get the downloaded file onto OneDrive to then link it and move it along.

 

My company IT security system is such that I am unable to have the local sync folders for OneDrive on my desktop. Hence, my interaction with OneDrive is via my browser.

 

Here are my attempts to get the file movement done.

 

JosephGiri_0-1653614807649.png

I tried to use the UI interaction option with PAD to try and select the Upload  (successful in PAD) and then click on the FILES option (unsuccessful in PAD due to element not being found).

 

I even tried to do it by drag and drop via PAD but I found the results unreliable due to the need of the mouse to find the exact locations to click and release.

 

I found this post but the guides it links to are beyond my understanding at the moment.

 

Any help and direction would be much appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions

You have 4 options (without getting into other coding languages) to try and navigate window or web elements using PAD. I prefer to do it in this order:

 

1) try to capture the UI (like you have done)

2) use Send Keys:  on the web, this typically consists of tabs and enters, but for some programs, this can be hotkeys. 
3). Try to use another element that you can capture, and offset the click. So, maybe you can capture the Sync element, and offset the x axis -150 pixels, so it clicks 150 pixels left of the center of the Sync button.

4. Move mouse to image. 

Note, options 3 and 4 are limited as to their reliance. If you change computers, change monitors, or even try to remote in, 3 or 4 could possibly fail. 3 will fail less than 4, which is why they are in that order. 

best of luck, you got this. 

 

View solution in original post

8 REPLIES 8
MichaelAnnis
Super User
Super User

It looks selected, so let’s just try to press enter. 

so after you click the Upload UI:

Send Keys {Enter}

good luck

JosephGiri
Frequent Visitor

Hi Micheal,

Thank you for the suggestion.

 

The picture I sent above is not what I see when the flow runs. It was meant to highlight what i was trying to click on.

 

I tried your suggestion to send ENTER but it doesn't seem to work.

 

In my original attempt to click the FILES text, I get this error

Main9Element with selector 'div[Id="id__20-menu"] > div[Class="ms-FocusZone css-61 ms-ContextualMenu is-open ms-BaseButton-menuhost root-162"] > ul[Class="ms-ContextualMenu-list is-open list-164"] > li[Class="ms-ContextualMenu-item item-167"]:eq(0) > button[Class="ms-ContextualMenu-link root-169"][Name="Files"][Type="submit"] > div[Class="ms-ContextualMenu-linkContent linkContent-173"] > span[Class="ms-ContextualMenu-itemText label-179"]' not found. 

 

While I am observing my browser, I do not see the UPLOAD button being clicked and show the drop down menu with the Files / Folder option. So this picture does not happen.

JosephGiri_2-1653621401883.png

 

 

Here is the action to click on the UPLOAD button.

JosephGiri_1-1653621331454.png

When I mouse over the UI element icon, I see this.

 

JosephGiri_0-1653621299203.png

 

Thoughts?

 

You have 4 options (without getting into other coding languages) to try and navigate window or web elements using PAD. I prefer to do it in this order:

 

1) try to capture the UI (like you have done)

2) use Send Keys:  on the web, this typically consists of tabs and enters, but for some programs, this can be hotkeys. 
3). Try to use another element that you can capture, and offset the click. So, maybe you can capture the Sync element, and offset the x axis -150 pixels, so it clicks 150 pixels left of the center of the Sync button.

4. Move mouse to image. 

Note, options 3 and 4 are limited as to their reliance. If you change computers, change monitors, or even try to remote in, 3 or 4 could possibly fail. 3 will fail less than 4, which is why they are in that order. 

best of luck, you got this. 

 

VJR
Super User
Super User

@JosephGiri, it would be best and the easiest if you use the in-built OneDrive connectors using Cloud flows. Are you unable to have that option?

JosephGiri
Frequent Visitor

Hi VJR,

 

I am using PAD to fill an online form and then download a PNG file from the website.

The downloaded file is saved in my desktop.

My organisation security policy does not allow the OneDrive sync folders to be found on the desktop.

 

I am looking for a solution to thus upload a file from my desktop to my OneDrive cloud drive.

 

Could you point me to the connector you are suggesting for the process above?

Hi @JosephGiri 

 

I hope you saw the wording "Cloud Flows" in my post. So I am referring to the Connectors of Cloud Flows (flow.microsoft.com) and not Desktop Flows (PAD).

 

If you are okay with this option then - 

 

- Call the Desktop flow from the Cloud flow https://docs.microsoft.com/en-us/learn/modules/gateway-desktop-flow/

- Using PAD, do your usual stuff that you are already doing (fill online form and download png)

- Pass the local path of the downloaded png back to the calling Cloud Flow. This can be done as output variables

- In Cloud Flows,

  • Use the File System connector to get to the image file saved on your local (See if you really need this step or if you are directly able to access the local file path in the next step)
  • Then use the OneDrive connector to upload the file

 

Hi @MichaelAnnis ,

 

Thank you for the suggestions. 

 

Managed to get (2) to work sufficiently well.

JosephGiri
Frequent Visitor

HI @VJR ,

Thank you so much for opening my eyes to the FILE SYSTEM connector. Didn't even know it existed.

 

Am having some difficulty with creating a connection reference (matter for my IT dept) but am confident that it will work once this wrinkle is flattened!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (3,458)