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 / Replace trigger When a...
Power Automate
Unanswered

Replace trigger When a file is created in a folder (deprecated)

(0) ShareShare
ReportReport
Posted on by 14

Hi,

We have noticed the SharePoint trigger "When a file is created in a folder (deprecated)" is deprecated, thus we want to replace the trigger with another one which is not deprecated.

The flow in which we use this trigger is used to process CSV files, thus the trigger is followed by a Compose action:

PeterKl_0-1687347324414.png


The idea is to replace the trigger with "When a file is created (properties only)" followed by an Get file content action and the Compose action.
The output of the Get file action is something like:
{
"$content-type": "application/octet-stream",
"$content": "//5EAGUAd"
}

in the compose action we try to grab the data of $content, but this fails for us.
We tried with this expression;
json(decodeBase64(body('Get_file_content')?['$content']))

But receive below error:

PeterKl_1-1687347563164.png


Does anybody have a thought how to replace the deprecated trigger and process the CSV files like we did before?

Thanks in advance,

Peter

Categories:
I have the same question (0)
  • Luis Arellano Profile Picture
    247 on at

    if it is a regular CVS file, you don't need the json function, just use 

    decodeBase64(body('Get_file_content')?['$content'])

     

    That should give you the CSV content in the Compose action

  • PeterKl Profile Picture
    14 on at

    Thanks for your reply.

    I already tried that and unfortunately that completely messed up the data from the CSV

    PeterKl_0-1687433160821.png

     

  • Luis Arellano Profile Picture
    247 on at

    Does the file have a special encoding?

  • PeterKl Profile Picture
    14 on at

    I see it's UTF-16 LE. If I manually change it to UTF-8, it does work.
    Unfortunately the PowerShell script exports the data for some reason in UTF-16 LE 😞

  • Luis Arellano Profile Picture
    247 on at

    Seems like there is no direct-supported way to read UTF-16 LE files in Power Automate but found this related item (Solved: Parse CSV error - Power Platform Community (microsoft.com)) and it is working for my tests. Basically it is saying to save the file to SharePoint or OneDrive as .txt and then get that file. 

     

    LuisArellano_0-1687587099509.png

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 822

#3
Haque Profile Picture

Haque 482

Last 30 days Overall leaderboard