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 / Trigger when laptop tu...
Power Automate
Unanswered

Trigger when laptop turned on

(0) ShareShare
ReportReport
Posted on by 3

How to set this up? - I use laptop solely for work so I'd like an automatic trigger for when 'work commences' without a button-push

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @beternal 

     

    If you have access to premium triggers, you could use the HTTP request?  Create a powershell with the following:

     

    Invoke-WebRequest -Uri "https://prod-00.uksouth.logic.azure.com:443/workflows/5f408b681f9bdfgdg5420ffdfefb71/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=QHYvHG5pUHWJ-FDZqqZVd_2Q403tzgUcgSSnacKCMHY" -Method POST

     

    Save it (e.g. StartFlow.ps1) and then call it from a batch (file ending .bat) file as follows:

    powershell StartFlow.ps1

     

    This will allow you to place the file in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.

     

    When you log on, the batch file will run, call the HTTP trigger and your flow will start.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @beternal 

     

    You've got another free option too.  If you use the OneDrive Sync client, you could create a file via batch script to your local OneDrive folder and then upon sync, the flow will run.  You could save your exact log in time to the file, so that the sync time is irrelevant.  Depends on your situation.

     

    echo {"date":"%DATE%" , "time":"%TIME%", "UN":"%username%", "Computer":"%ComputerName%"} >C:\Users\[Username]\OneDrive\StartUp\%DATE:~0,2%_%DATE:~3,2%_%DATE:~6,4%_%TIME:~0,2%%TIME:~3,2%%TIME:~3,2%.txt

     

    DamoBird365_0-1625257638416.png

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @beternal,

     

    I liked the concept so much, I have done a video using both the HTTP trigger and Dos Batch.  Please take a look and hit me with feedback https://youtu.be/kPbn4WMCXUU.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 142 Super User 2026 Season 2

Last 30 days Overall leaderboard