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 / Automating login and f...
Power Automate
Suggested Answer

Automating login and file download to server with anti-bot detection

(2) ShareShare
ReportReport
Posted on by 24
I feel I may have hit a dead-end with what I am trying to achieve but thought maybe some clever person out there has a solution.
 
I am trying to automate (has to be runnable in the cloud) the retrieval of a file from one our 3rd party suppliers websites, a link to which is sent to me in an email. The website requires a login so I need a few steps to get to the download:
 
  1. HTTP GET on the url in the email
    • The server responds with a redirect to the login page with the original url encoded as a parameter
  2. HTTP GET on the login page (ie carry out the redirect)
  3. HTTP POST on the login page with credentials added to the payload
  4. HTTP GET on the original url to retrieve the file
I'm extracting and reusing cookies at the various steps but the problem I am getting is that the final GET on the file, fails with another redirect to the login page. After quite a bit of digging I have worked out that the website is using Cloudflare and from what I can see when analysing the transactions that happen if I do this manually with Chrome, the server is injecting extra javascript into the login page that then does another POST to some challenge tools on the server (which I think are installed as part of using Cloudflare). 
 
So I think I'm stumped because afaik there is no way to get HTTP (or any other action) to run javascript. Has anyone managed overcome anything similar to this?
 
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    16,034 Super User 2026 Season 1 on at
    Hi,
     
    Yes this is VERY doable, and you can do with Power Automate for Desktop.  This can run unattended from the cloud on a VM.  Everything you described in steps 1-4 look like easy tasks in PAD.  Recommendation:  build your desktop flow in attended mode, get it right, then connect to a cloud flow and let it run unattended.
     
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     
     
  • markbowler7 Profile Picture
    24 on at
    Thanks @trice602, I have used PAD successfully to fire up Edge, fill in the login details and click through to the file download but I’m not sure I’m going to be able to get much further than this for what I need.
     
    Firstly, I need to trigger the process when receiving an email with the link to the file, and although my MS 365 licence gives me access to premium connectors (Outlook, Excel etc) in PA Cloud, I don’t seem to have access to those actions in PAD.

    Secondly, making this runnable unattended I think would require me to have a Power Automate Process licence, which is pretty expensive ($150 per bot/month).
     
    P.S. I tried to post this reply last week but I wasn't able to ?!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard