Logic App SharePoint move files with special characters

Thilini Munasinghe 20 Reputation points
2024-11-04T20:15:09.3766667+00:00

Hi, I am using a logic app SharePoint move action to move files from one folder to another to archive files.

I have a file called " 2024+ABC+Test.processed". When moving this file, I am getting a bad request error in the move action.

In source folder, file stores as "2024+ABC+Test.processed".

But when moving, it replace + with space and take it as "2024 ABC Test.processed" in output body. I tried using encodeUriComponent. It didn't work. "Expression - encodeUriComponent(Trigger() body.tx-ml-file-name-encode).

Then it says, cannot find this file, it doesn't not exist in the source folder.

Can anyone help me to sort it please? The business cannot change the file name as it's a system generated.

Thank you in advance.Thilini 1000029492

1000029493

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,558 questions
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 25,111 Reputation points Microsoft Employee Moderator
    2024-11-06T09:25:53.1966667+00:00

    @Thilini Munasinghe Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    Instead of passing the fileName to 'FileToMove' parameter in Move file action you need to pass the Id of the file.

    To test this behavior, I have created a sample file with name "2024+ABC+Test.processed" in one of share point folders and tried to move to another folder in same site using consumption logic app with below set of actions and triggers in the workflow.

    User's image

    Here is the sample output for your reference:

    User's image

    Hope this helps, let me know if you have any further questions on this.

    Please accept as "Yes" if the answer is helpful so that it can help others in the community.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.