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 / Removing trailing spac...
Power Automate
Answered

Removing trailing spaces (Trim?) from dynamic content

(0) ShareShare
ReportReport
Posted on by

Hey all,   

 

I am using Power Automate to take a request from a SharePoint list I have created (using it as a request form) and I have flows in place to create a file folder in a document library based on the information provided in the list. In this scenario, the 'Topic' entered into the list is what I want to be the name of the folder it creates for me. 

I recently ran into a problem with the flow, however, relating to file folder names cannot end with a space, which is easy to accidentally do. 

 

I need a way to take my 'Topic' input from the list, trim the whitespace/extra spaces from the end of the string and pass that over to the 'Create a Folder' action, to ensure the action doesn't fail due to invalid filename/syntax. I'm sure there's a way to code it, I just can't figure it out.  (I've been using Power Animate for a week, not much coding experience)

 

Appreciative of any thoughts/ideas!  Image below for reference in case my description doesn't make sense.   

 

Flow post pic.png

 

Categories:
I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Hi
    You can do it by defining an expression
    https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

    There is a WDL function called 'trim'
    https://docs.microsoft.com/bs-latn-ba/azure/logic-apps/workflow-definition-language-functions-reference#trim
    Hope this helps
  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @tbergmann ,

     

    As @efialttes  suggested, you could refer to this configuration:

    161.PNG

     

    Best Regards,

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
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard