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!