Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

How to get Excel Online file location (Folder, Sub-Folders) DYNAMICALLY

Posted on 22 Nov 2024 11:45:41 by
Hi!
 
I'm fairly new in using Power Automate, and I have a project that involves an Office Script in an Excel Online file, and automating the transfer of the data input in the file and its copies to be stored in a repository. The file is a template and users will have to duplicate the file, save them in their own folder (within the same SharePoint site where the template is located), then run the script.
 
I am using the manual trigger "when an HTTP request is received" which I have prepared in my Office Script button.
 
Right now, I am able to get the file name and sheet name(table name) by using Office Script lines and sending them through a JSON payload using POST with the HTTP request. Then adding the JSON Schema in the Request body portion of manual trigger.
 
 

const payload = {
"fileName": fileName,
"tableName": sheetName
};

const requestOptions = {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({payload
})
};

 
 
Unfortunately I can't seem to find a way to get the location (folder/sub-folders) where they saved the file using Office Script, and more so having trouble doing it in Power Automate. 
I need to get the location of the copied file where the trigger HTTP request came from. So I can get the data from that file, and update rows, and other stuff.
 
Thanks!

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,081

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,795

Leaderboard