I'm new to FLOW but loving it so far. My first project is as follows:
- I have a OneDrive Business folder shared with a bunch of my employees
- I have a working FLOW that posts to MS Teams an alert when someone adds or modifies a file in the shared OneDrive (including subfolders and that point is important).
- I included an email function to the flow to also email the same alert.
The issue: when I use the dynamic data component in the builder for File Path (has the OneDrive logo on it), it creates big coded path like this (which is fine if I can parse what I need):
/drives/b!hBza8tw8kkSnhMQ-lYa05Qz2YBR2IIBBjyb2cpQF7NrAmGg7uneOQ7RMXyfOoKyX/root:/Delray_Beach_Nw_Neighborhood_Improvements/Website_Content/New Text Document.txt
What I've been trying to do is to use some of the functions like split in a Compose to return the part of the path after "root:/" so that the users getting the alerts will know which folder the file was in. I know they can just read that part from the link, but I'd like it to be prettier than that.
I think the issue is that the triggerOutput "filepath" from the OneDrive monitor is coded like this: L2RyaXZlcy9iIWhCemE4dHc4a2tTbmhNUS1sWWEwNVF6MllCUjJJSUJCanliMmNwUUY3TnJBbUdnN3VuZU9RN1JNWHlmT29LeVgvcm9vdDovRGVscmF5X0JlYWNoX053X05laWdoYm9yaG9vZF9JbXByb3ZlbWVudHMvV2Vic2l0ZV9Db250ZW50L3Rlc3QgLSBDb3B5ICgyKS50eHQ=
I tried adding a compose with this: last(split(triggerOutputs()?['headers']['x-ms-file-path-encoded'],'root:/'))
then sending that output in the email, but the output of the compose is just the coded filepath (blue above) instead of it decoding it.
Why is the dynamic file path component decoded if I use it in the email function but I not when I use it in the compose function? Any ideas how I can do this?
THanks all!
Solved! Go to Solution.
Hi @bcontento ,
You could remove -encoded and use the following expression:
last(split(triggerOutputs()?['headers']['x-ms-file-path'],'root:/'))
Best Regards,
Nevermind! I figured it out:
Hi @bcontento ,
You could remove -encoded and use the following expression:
last(split(triggerOutputs()?['headers']['x-ms-file-path'],'root:/'))
Best Regards,
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
88 | |
57 | |
40 | |
37 | |
29 |
User | Count |
---|---|
73 | |
66 | |
50 | |
47 | |
43 |