How do you properly hand over Office Scripts or trigger Power Automate flows from Excel without relying on personal OneDrive?
Our take
The frustration the writer feels is not just a niche annoyance—it highlights a broader gap in our current Office‑script ecosystem. When a team member hands off a custom automation to another department, the expectation is that the script lives alongside the workbook, not tucked away in a personal cloud folder. Yet the reality is that Office Scripts are tightly coupled to the OneDrive for Business account that created them, and Excel only scans the “Documents/Office Scripts” directory in that account. This limitation forces developers to either lean on VBA, which many organizations are abandoning, or to embed the script inside a Power Automate flow that then interacts with the workbook. The result is a convoluted workflow that can break when the original author departs or when the organization moves to a new tenant.
This scenario is a perfect backdrop for the recent discussion in “Best way to share Office Scripts?” and “Converting VBA scripts to Office scripts for easier automation.” Those posts collectively show the appetite for a more seamless hand‑off mechanism. In the first article, the author outlines the steps to publish an Office Script in a shared folder and add a button to trigger it, but the process still requires manual configuration and assumes the user has the right permissions. The second article demonstrates how a legacy VBA macro can be ported to Office Scripts, yet it stops short of addressing the distribution problem. Together, these pieces illustrate that while the technology exists to automate spreadsheets, the workflow to share and maintain those automations is still maturing.
The crux of the issue is how to maintain a clear ownership boundary while keeping the automation accessible. The writer’s idea of placing scripts in a subfolder next to the workbook is intuitive, but Excel’s current design does not support relative paths or alternate script libraries. Power Automate offers a partial solution because it can call any Office Script regardless of location, but it breaks the user‑experience loop: a button in Excel must still invoke a flow, which in turn calls the script. This extra hop is acceptable to power users, but it is a barrier for the non‑technical audience the writer is serving. The temptation to loop back to Office Scripts through a script that triggers a flow just regresses to the original problem—scripts remain tied to the creator’s personal OneDrive.
One forward‑thinking approach is to treat the workbook as the primary anchor and embed the automation logic directly within it, but in a way that decouples from personal storage. Office Scripts can be saved inside the workbook as an “embedded script” by using the new “Add Script to Workbook” feature, which stores the script in the file’s metadata. When the workbook is shared, the script travels with it, and any user with the appropriate permissions can run it from the built‑in Scripts pane. This eliminates the need for a personal OneDrive folder and removes the dependency on a separate flow. The remaining challenge is to expose a simple button that calls the embedded script. By adding a custom ribbon button that references the script name, users can launch the automation with a single click, keeping the experience as close as possible to a native Excel button.
If the organization prefers to keep scripts in a shared library for version control, the next step is to use the Office Scripts API to deploy scripts to a shared folder in SharePoint or OneDrive for Business and then reference them through a minimal “starter” script that calls the shared script by ID. This starter script can be stored in the workbook and invoked by a button, while the heavy lifting happens in the shared library. Although this introduces a slight overhead, it provides a clean separation of concerns: the workbook remains lightweight, and the script repository stays centrally managed.
Looking ahead, the Microsoft roadmap suggests that Office Scripts will eventually support a true “shared library” model, allowing scripts to be published as reusable components across tenants. Until that arrives, the best practice is to embed scripts in the workbook or to use a lightweight starter script that bridges to a shared library. By doing so, you empower users to run complex automations without the friction of personal cloud folders, and you future‑proof the solution against author turnover. The question for organizations today is: are you ready to adopt the embedded‑script workflow now, or will you wait for the next release that promises a more robust sharing model?
Hi everyone,
I’m running into a problem and I hope someone here has experience with this.
I was asked by another department to automate one of their workflows in Excel. So far so good. I didn’t want to use VBA because our company is slowly phasing it out, so I took this as an opportunity to gain experience with Office Scripts.
The script itself is finished. It can be triggered via a button and it works as intended.
However, I realized that I don’t want the script to live in my personal OneDrive “Documents/Office Scripts” folder. I want to hand it over to the department so they can use it independently.
My idea was to create a subfolder called “Scripts” next to the Excel file and store the scripts there.
But here’s the problem: I have no idea how to reference or trigger those scripts from Excel. Excel seems to only recognize scripts stored in the personal Documents folder. Even if I manually place the script there (tested with a separate account), Excel still doesn’t detect it.
So I thought about triggering the script through Power Automate instead. Surprisingly, that works well — and PA doesn’t care where the script file is stored.
BUT now I have a new issue: How do I link the flow back to the Excel file?
Ideally, I want a button inside Excel that starts the flow. The users of this file are not technical at all, so it needs to be as simple as possible.
I couldn’t find any way to connect a button in Excel to a Power Automate flow — except by using Office Scripts again, which would put me back in the same situation where the script must be stored in my personal OneDrive… which defeats the whole purpose.
Has anyone dealt with this before?
How do you hand over Office Scripts or trigger flows in a clean, future‑proof way so everything keeps working even if you’re no longer around?
Thanks a lot for your help!
PS. This text was translated and optimized with AI
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Best way to share Office Scripts?Hi guys, I've created a few Office Scripts for my company and want to share them with my colleagues. Here's what I'm trying to achieve: The scripts should run in any document (not tied to a specific workbook) and appear in the Automate gallery. Users should store the scripts in a folder on their own OneDrive. I tested putting the scripts on SharePoint, but every user gets annoying warnings then when running the script. ChatGPT says I can just send the .osts files to my colleagues and they should be able to import them, but I don’t see any import button (neither in the desktop app nor the web version). The only method that worked for a colleague was: Automate → New Script (creates a useless file) → All Scripts → Show More Scripts → My Files → browse through a huge list of folders to find the right one → add the file. Repeat for each script. Is there a less terrible way to do this? submitted by /u/coup_de_foudre_69 [link] [comments]
- Converting VBA scripts to Office scripts for easier automationhey everyone, currently i have a VBA script that i manually run everytime a certain file is sent from a particular email address. for context the flow of the automation is done this way: file received through email -> automatic download -> manually trigger the VBA automation -> data from the sent file is transformed and kept in multiple different excel files. the automation itself is slightly lengthy and complicated. It basically converts bunch of data from the file sent, breaks it into different files with the required pieces of data for upload. what im trying to look at is, is there any way to basically eliminate this need to manually tiggering this vba automation myself? i get this report sent multiple times a month and as convenient, my vba automation has made this process its still a hassle 😂. I've heard of Office scripts being an option but can anyone please let me know if its possible? any resources would also be beneficial. thank you. submitted by /u/unlucky_ko [link] [comments]
- Time Tracking and reporting with Power AutomateSince 4 Months I use Excel to track my working hours. It is a simple intelligent Table where I add current Date, Time, Project im working on and what I am doing. A "duration" column will subtract the entered Time from the Time of the following entry. Since I jump a lot between Projects this Table helped me a lot to track my time to the Minute. A Pivot Table converts these entrys in bigger chunks and presents me with an overview how much time was spent on each Project per day. Everything works perfect. Now I need to send a report of my Time to a co-worker, who will enter it in our ERP Software. I want to automate this process, so that I don't have to do anything additional to tracking my time. I want to use Power Automate I guess. I allready tweaked the Overview on a second page, to round the final time track to whole 15 minutes and subtrakt breaks and filter out unnecassary entrys (I always have to enter the End of the Workday with 0 duration, for the last entry before that to caluclate its duration). I tried to use office scripts to do this filtering for me, but it doesn't work relyable. It will often reactivate allready filtered entrys when adding to the filter. Do you have some advice how to filter with office scrips in a pivot table? I used Makros before office scripts, and there it worked flawlessly. But Makros can't be used by Power Automate. And how do I export the final Report Sheet as PDF in Power Automate, without exporting the whole Table with every single dataentry? I spent hours trying to get this to work, using copilot for coding, but it wasn't very helpfull. Copilot generates error after error. Edit: I use Excel 365 submitted by /u/Loulexismus [link] [comments]
- Excel Power Automation - Sending Emails to Users Based on Sheet CriteriaHi All! My organization currently uses a website called Smartsheets to create task lists. I've created automations that run each morning that send emails to users if a task becomes past due. It fulfills the intended purpose; however, every single month there seems to be some new issue; therefore, I'd like to transfer over to using functionality in native Excel. My research turned me on to Power Automation. I found the tools I needed until I hit a roadblock: P.A. does not look at the contact within the sheet and send a message to that person. It appears to just go to one designated individual. Any thoughts, recommendations, or solutions? I am almost at the end of my rope and ready to just deal with Smartsheets. A screenshot of our task list can be found in the comments. Maybe it provides some reference that I missed. Thanks! submitted by /u/bltsmith [link] [comments]