@gautmish sorry for taking so much time to reply. Let's try to figure this out :).
I think I had the same issue in the past. If you pass the value dynamically, then you'll have a string, so you need to encode it. Try the following. Run the flow with the dynamic content and see the content being generated. There are spaces and other characters there, right?
If you copy that URL to the browser, it will probably fail or convert the value for you automatically.
A simple replace will do the trick:
replace(<YOUR VALUE>,' ','%20')
Double-check again and if you see any special character grab the whole URL and copy it here:
https://www.url-encode-decode.com
Then you know that you have to replace character X with "%...".
If it doesn't work let me know where it's failing and I'll try to help you.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel