Sounds good. Please mark the reply of yours to which I gave Kudos!
Thanks,
Nreddy
I can mark it as solved for you. Can you share which reply(ies) you want to mark as answered?
Hope this helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi,
I want to mark it as solved but I am unable to see any option to do that. I'' check again
Thanks,
Neethi
Hi Yash,
This configuration worked 🙂 Thank you so much for your time and response, greatly appreciate it!
I was able to append date to file name whenever someone add a file to document library. I will test all the uses cases now.
Best,
Nreddy
Hi @neethika,
Has your problem been solved by @yashag2255's advice?
The best approach is @yashag2255 provided, if the newly created file name has no date or file date in the modified file name not match today, create a new file by using filename today+filename.
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Best Regards,
Community Support Team _ Lin Tu
You might want to try with the below configuration once:
Here, I have added the get file metadata with path and used the display name in the expressions so that it works as expected.
expressions:
Condition Left: first(split(body('Get_file_metadata_using_path')?['DisplayName'],'_'))
COndition Right: utcNow('dd-MM-yyyy')
File Name: utcNow('dd-MM-yyyy')
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi again!
I guess the warning comes from the fact you are using the 'When a file is created or modified in a folder' trigger.
If you use 'Whe a file is created' instead, I guess the warning should not be shown. But, not sure if this other trigger matches your requirements.
Hope this helps
Hi!
My suggestion, try to upload a new file, see if issue persists.
If so,
1.-inspect Flow executions related to this new file uploaded. You will probably need to inspect the last two executions
2.-inspect the new file metadata columns on your SP library, by making Created and Modified properties visible on your SP view
Share the results
I updated the flow with the updated expression that you shared but I still see the date appending twice. But I see a warning which I attached. This could be causing date appending multiple times. Is there any solution for this? Thank you, Nreddy
I'm running some test on my side, it seems the old trick suggested is not valid anymore. Probably Microsoft Engineers changed the logic some time ago and we did not noticed ☹️
This is the content of
first(split(triggerOutputs()['headers']['x-ms-file-name-encoded'],'_'))
in my last execution:
MDctMDMtMjAyMF9GbG93LlBORw==
THere is probably a WDL function to decode it, but in the meantime I have inspected the whole triggerOutputs()['headers'] object structure and found a fast workaround:
{
"Pragma": "no-cache",
"Retry-After": "0",
"x-ms-file-id": "%252fDocumentos%2bcompartidos%252f07-03-2020_Flow.PNG",
"x-ms-file-name": "07-03-2020_Flow.PNG",
"x-ms-file-path": "/Documentos compartidos/07-03-2020_Flow.PNG",
"x-ms-file-name-encoded": "MDctMDMtMjAyMF9GbG93LlBORw==",
"x-ms-file-path-encoded": "L0RvY3VtZW50b3MgY29tcGFydGlkb3MvMDctMDMtMjAyMF9GbG93LlBORw==",
"x-ms-file-etag": "\"{C4F63058-AAF4-4C52-8DD4-087D9E3DF0AD},2\"",
"x-ms-request-id": "e08a3c9f-c07d-b000-6ed8-3c92a7674c56;e08a3c9f-a081-b000-6ed8-3c169b44d2fb",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"Cache-Control": "no-store, no-cache",
"Date": "Sat, 07 Mar 2020 19:38:03 GMT",
"Location": "https://flow-apim-europe-001-westeurope-01.azure-apim.net/apim/blablabla",
"Set-Cookie": "ARRAffinity=blebleble;Path=/;HttpOnly;Domain=sharepointonline-ne.azconn-ne.p.azurewebsites.net",
"Content-Length": "13763",
"Content-Disposition": "attachment",
"Content-Type": "image/png",
"Expires": "-1",
"Last-Modified": "Sat, 07 Mar 2020 19:38:04 GMT"
}
So I would suggest to use this other fast dirty workaround expression in the left side of your Condition:
first(split(last(split(triggerOutputs()['headers']['x-ms-file-path'],'/')),'_'))
Hope this helps
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1