Close Menu
Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Facebook X (Twitter) Instagram
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    • Home
    • Intune
    • Windows
      • Modern Workplace
    • macOS
    • Android
    • iOS
    • Automation
      • Logic Apps
      • Intune Monitoring
      • GitHub
    • Security
      • Passwordless
      • Security
    • Speaking
    • About me
    Peter Klapwijk – In The Cloud 24-7Peter Klapwijk – In The Cloud 24-7
    Home»Automation»Logic Apps; Replace deprecated When a file is created in a folder trigger
    Automation

    Logic Apps; Replace deprecated When a file is created in a folder trigger

    Peter KlapwijkBy Peter KlapwijkOctober 6, 2023Updated:February 14, 20253 Mins Read

    A few years ago I wrote the blog post Import Windows Autopilot devices with Logic Apps. The Logic Apps flow that I described imports a csv file containing the Windows Autopilot information including the hardware hash.

    I noticed recently the SharePoint trigger When a file is created in a folder that I use in this flow is marked as deprecated. This means I need to replace the trigger with another one. But as that gave me some issues, I’m writing this blog post, so you don`t waste time in replacing the deprecated trigger.

    My original flow with the deprecated trigger looks like below. Important in this screenshot, is the trigger and I use the File Content in the CSV action, which is a Compose action.

    When we have a look at the Runs history we can see the actual data processed by the first part of the flow.

    Here we see in the trigger and the compose action, we can just read the information from the imported CSV file.

    We can replace the trigger with the When a file is created (properties only) trigger. It does the same job as the deprecated trigger, with the big difference that it doesn`t retrieve any file content of the file.
    That`s not an issue as we have a SharePoint action Get file content.

    The only thing we don`t need to forget is to add the File content of the Get file content action to the Inputs field of the compose action, and we’re done.

    That was at least what I hoped for. But my following actions that further process the data of the csv file failed.

    When I had a look at the Runs history, I noticed the data isn’t readable anymore, it seems the data is encoded.

    Well, there we have the issue 🙂

    The solution

    I have tried to decode the data using an expression including base64tostring, base64, base64ToString etc etc. None of these did work for my flow.

    I noticed the encoding of the csv files which we get when exporting the Windows Autopilot information is UTF-16. When I manually changed the encoding of a file to UTF-8, I could process the file without any issues. I scratched my head again (a couple of times) and started to investigate if I could change the encoding of the file using the file, but also without any luck.

    I even opened a support case at Microsoft, which was open for a long time, and tried all sorts of workarounds together with the support engineer. And finally, we come to the solution. And it is so simple if you know the solution. We need to use an Expression with string:

    string(body(‘Get_file_content’))

    We can create this expression by typing in string, followed by two brackets.

    With the cursor between the brackets switch to the Dynamic content tab and select File content.

    And we have our expression added to the compose action.

    When we now run the flow and have a look at the Runs history, we see we can read the data again.

    It`s so easy sometimes 🙂

    I hope this saved you some time in replacing the When a file is created in a folder (deprecated) trigger.

    Autopilot Flow Graph Graph API Intune Logic Apps MEM Microsoft Endpoint Manager Power Automate PowerApps Windows Autopilot
    Share. Facebook Twitter LinkedIn Email WhatsApp
    Peter Klapwijk
    • Website
    • X (Twitter)
    • LinkedIn

    Peter is a Security (Intune) MVP since 2020 and is working as Modern Workplace Engineer at Wortell in The Netherlands. He has more than 15 years of experience in IT, with a strong focus on Microsoft technologies like Microsoft Intune, Windows, and (low-code) automation.

    Related Posts

    Create an application-based Azure AD group with Logic Apps

    May 9, 2022

    Export Endpoint Analytics Proactive remediation data with Logic Apps

    April 19, 2021

    MEM Monitoring: Get your Windows Autopilot deployment events in a Teams channel with Logic Apps – Part 1

    April 16, 2021
    Add A Comment
    Leave A Reply Cancel Reply

    Peter Klapwijk

    Hi! Welcome to my blog post.
    I hope you enjoy reading my articles.

    Hit the About Me button to get in contact with me or leave a comment.

    Awards
    Sponsor
    Latest Posts

    Update Windows Defender during Windows Autopilot enrollments

    May 16, 2025

    Hide the “Turn on an ad privacy feature” pop-up in Chrome with Microsoft Intune

    April 19, 2025

    How to set Google as default search provider with Microsoft Intune

    April 18, 2025

    Using Windows Autopilot device preparation with Windows 365 Frontline shared cloud PCs

    April 13, 2025
    follow me
    • Twitter 4.8K
    • LinkedIn 6.1K
    • YouTube
    • Bluesky 1.5K
    Tags
    Administrative Templates Android Automation Autopilot Azure Azure AD Browser Conditional Access Edge EMS Exchange Online Feitian FIDO2 Flow Google Chrome Graph Graph API Identity Management Intune Intune Monitoring iOS KIOSK Logic Apps macOS MEM MEMMonitoring Microsoft 365 Microsoft Edge Microsoft Endpoint Manager Modern Workplace Office 365 OneDrive for Business Outlook Passwordless PowerApps Power Automate Security SharePoint Online Teams Windows Windows 10 Windows10 Windows 11 Windows Autopilot Windows Update
    Copy right

    This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors, or In The Cloud 24-7.

     

    Copyright © 2025 by In The Cloud 24-7/ Peter Klapwijk. All rights reserved, No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

    Shorthand; Don’t pass off my work as yours, it’s not nice.

    Recent Comments
    • Adam on Get notified on expiring Azure App Registration client secrets
    • Peter Klapwijk on Update Windows Defender during Windows Autopilot enrollments
    • Rob van de Ven on Add a certificate to the Trusted Publishers with Intune without reporting errors
    • Carl on Update Windows Defender during Windows Autopilot enrollments
    • Peter Klapwijk on The next step in a passwordless Windows experience
    most popular

    Application installation issues; Download pending

    October 1, 2024

    Restrict which users can logon into a Windows 10 device with Microsoft Intune

    April 11, 2020

    How to change the Windows 11 language with Intune

    November 11, 2022

    Update Microsoft Edge during Windows Autopilot enrollments

    July 9, 2024
    Peter Klapwijk – In The Cloud 24-7
    X (Twitter) LinkedIn YouTube RSS Bluesky
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
    View preferences
    {title} {title} {title}