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 / Saving Screenshots to ...
Power Automate
Answered

Saving Screenshots to a Specific Folder

(0) ShareShare
ReportReport
Posted on by 10

Hi I am trying to build a flow that would run at around the same time each business day:

1. login to this website using my credentials

2. click on tab 1 of this website

3. Take a screenshot of the webpage data

4. Save the screenshot image in a specific folder with a specific title but the current date?

 

I am having trouble with 4.,

 

  • Verified answer
    ryule Profile Picture
    929 Super User 2024 Season 1 on at

    This should take care of step 4

     

    ryule_0-1675355302168.png

     

    Format the date however you want it, but obviously has to work as a part of a file name.

     

     

    Here's the code:

    DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
    Text.ConvertDateTimeToText.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''_yyyMMdd''' Result=> FormattedDateTime
    Workstation.TakeScreenshot.TakeScreenshotAndSaveToFile File: $'''C:\\Test\\pic%FormattedDateTime%.jpg''' ImageFormat: System.ImageFormat.Jpg

  • pnjapa98 Profile Picture
    10 on at

    pnjapa98_0-1675362747153.png

    Thank you, would this work for web page screenshots. It seems to keep failing.

  • pnjapa98 Profile Picture
    10 on at

    pnjapa98_0-1675365536127.png

    I am not sure what this means exactly

     

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    It looks like you haven't properly selected your CurrentDateTime variable. Go into the Action and make sure it is surrounded by percent signs.......%CurrentDateTime%

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Here is an article on how to create your own date variables to use inside of PAD:

     

    https://www.linkedin.com/pulse/power-automate-desktop-pad-best-practices-part-1-date-michael-annis

     

    You shouldn't have a problem after this.

     

    Mainly, you have the right idea, but format the date to text first, then you can string it with another variable:

    Covert date to text %CurrentDateTime% to MM.dd.yy and save as %FormattedDateTime%

    Set variable %NewFileName% As Market View DUS %FormattedDateTime%

    'use %NewFileName% in the screenshot action

     

    If it is still not working, please show us the inside of the screenshot action.

     

    Thanks,

     

    Mike

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard