Excel Script + Power Automate - Script not found. It may have been unshared or deleted - excel

I have a PowerApp that:
takes a SharePoint file,
filters the data,
and calls a PowerApps/Flow to:
execute an Excel script,
get the file contents,
and create a file with it.
The script is shared to all PowerApps users, same for the source file, everyone can read, edit and delete the file.
When anyone but I run the flow either from the PowerApp or from the flow itself, they get an error "Script not found. It may have been unshared or deleted." This happens when anyone other than me tries to run the app/flow.
The weird thing is that if I run the PowerApps / Flow, everything works fine.
Do you know how can I get other users than me to run it either from the PowerApps or PowerAutomate ?
This issue is 'kinda' similar to this one but it's different in the source file.

Found out how this one is working. Sharing the solution here :
Firstly, you'll need to create all your flows and PowerApps apps within a "Solution". You can create a new solution from "Solutions/New solution".
Within this new solution, create a button-triggered flow that runs Office Scripts. Let's call it "Child flow". Please note this flow requires to have a last action to respond to a PowerApp or flow.
Configure this child flow with run-only users settings as described in my previous response. Make sure to choose "Use this connection ...".
Within the same solution, create another flow with the PowerApps trigger. This flow will be triggered by your PowerApps app. In this flow, add a step to run the child flow you've just created above.
Within the same solution, create your PowerApps app. Configure your PowerApps button to run the second flow (the parent flow).
Now share the PowerApps app with another user, ask them to try it out, and see if the Run script action in the child flow can work properly.
Thanks to Yutao from MS for the solution !

Related

How can u create folder inside the selected path in powerapps gallery to a sharepoint library using Powerapps?

I have a gallery wherein the data source is connected Documents in sharepoint library. I already create flow that triggered the creation of folder in /Shared Documents path, however want I want after that creation of folder I need to create another folder inside it or another folder inside the folder that I have created.
Can someone help me with this matter. Thank you in advance
The quickest way to achieve this, is to extend your existing flow with another step that uses the path of the new folder to add a child folder (from the outputs of the action creating it). This, however is not very flexible.
How to create subfolders with Power Automate
Alternatively, you can use the Respond to PowerApps action to feed back the path of the new folder to Power Apps. Then you can use the result to trigger the same flow again, with different inputs as many times as you want.
Responding to Power Apps from Power Automate
Yet another option is to create this functionality in a solution. This enables you to call your folder-creating flow as a child flow. Then you could create an arbitrary number of parent flows, e.g. one flow calling it from the app, then another flow could fire when the folder is created to add a child folder, etc.
How to create a parent-child flow relationship
You can also look into the SharePoint REST API reference to see if there are any useful additional options when creating folders/subfolders.

Office Add-in, using Node JS, and Graph with SSO, how do I actually make a new call?

I have been looking into connecting a Word Add-in to SharePoint list data using a task pane.
I have completed the following two tutorials that guide you through creating an add in that uses SSO to access user data and then update the add-in to get data from one drive instead.
https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart
https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart-customize
However, these tutorials have you edit the .ENV file with a new GRAPH_URL_SEGMENT and SCOPE etc, however I see no reference to how editing the ENV would actually effect anything, no code that makes use of this information and no details of when the call using the Graph api is actually made and what configuration it uses.
I have been able to get a call working to SharePoint in the graph explorer but cannot move that over to the word add-in.
Could someone please help me understand where the calls endpoint is used to make the Graph call and how someone would go about to change this to make a call to SharePoint.
The call to get Microsoft Graph data is in the library office-addin-sso. Specifically, the files \node_modules\office-addin-sso\src\app.ts and \node_modules\office-addin-sso\src\authRoute.ts
You will see in those files where the ENV variables are read.
To get your SharePoint data, use the URL you constructed in the Graph Explorer to set the GRAPH_URL_SEGMENT and the QUERY_PARAM_SEGMENT in the ENV file. Also, update the SCOPE variable in that file as needed. See the section https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart-customize#changes-required-for-any-type-of-add-in for an example.
You will also need to update the permissions you request in the Azure portal as described in this section: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart-customize#update-app-permissions-in-azure

Power Automate - Flow not working in a solution

We have a solution deployed in a tenant which consists of flows and powerapps application. The flow in the solution has a trigger point of whenever an item is added or modified in SharePoint list. That flow is not getting triggered even when an item is added to the list or modified. But if we make a copy of the flow outside the solution it is working. Have you guys faced any issue like this?
Did you try deleting the trigger and re-adding it. If not please try that

Automating spotfire

I have some industrial data that i wish to present in a spotfire dashboard to a client. I want to make the dashboard so that it would update automatically and I have not been able to find a tutorial on Tibco's site or here for how to do this.
It would be great if someone could tell me how to make spotfire look in a particular place (server, desktop, wherever) for a new .csv file, open it and create a defined set of visualizations and then mail a pdf to the client.
I have been through the spotfire automation services manual but I can't find a specific guide to what I need it to do.
All help appreciated.
I went back and read thru the whole question again, including the other person's answer. In order to be able to do what you want to do, you need to have Spotfire Server and Spotfire Automation Services. Automation Services in a product that you have to purchase separately from Spotfire, although it is bundled with the Analyst client.
In your question you said -- It would be great if someone could tell me how to make spotfire look in a particular place (server, desktop, wherever) for a new .csv file, open it and create a defined set of visualizations and then mail a pdf to the client.
I made the assumption that you knew you needed Automation Services to do this. All of my answers have been based around the use of Automation Services. That's the only way to push an email to a user that I know of. After you setup the Automation Services job, you also have to use Active Batch to schedule the Automation Services job, which I noted as part of the original 3 step process.
I want to make the dashboard so that it would update automatically and
I have not been able to find a tutorial on Tibco's site or here for
how to do this.
What you want to do is schedule updates to your linked data. What this will do is re-query the data-source at the specified schedule (once a day, twice an hour, etc) that you specify and cache it on the web server.
Here is the documentation for that.
Schedule Updates
Scheduling updates using Spotfire Server (be sure to navigate down the sub items on the left)
Monitoring Schedule Updates
It would be great if someone could tell me how to make spotfire look
in a particular place (server, desktop, wherever) for a new .csv file,
open it and create a defined set of visualizations and then mail a pdf
to the client.
For this, you still want to use scheudle updates for the first part after you have linked your analysis to your csv file. Your file name will have to remain the same for spotfire to pick it up unless you customize this with some scripting. Once that is complete, you'll want to use Automation Services to complete your mailing a pdf.
Automation Services Tutorial
Automation Services User Manual
Generally speaking, this is a three step process.
1. In the desktop app, create a report (File -- Export -- to PDF -- prepared report. In this step you are creating the export and telling Spotfire specifically what to export. Where to find the report
2. In the desktop app, create the Automation Services Job (Tools -- Automation Services Job Builder). All jobs start with opening the file. Then you create the export. Then send the email. Sample active batch jobe
3. Now, you have to automate the task. This can be done with Windows Task Scheduler or Active Batch.
Those are the high-level steps. There is a lot of syntax and detail in each of the steps, but this should get you started. Please reply with more detailed questions on any one of the steps.

SharePoint workflows cannot automatically start

I'm trying to make a SharePoint workflow start automatically for any new document that is uploaded to a specific doc library. I've configured the workflow in SharePoint Designer to auto start for new documents or changed documents. However, the workflow never starts automatically! I can run it manually, but it won't execute itself.
I've searched around and have found the core issue, which is reflected in my log:
"Declarative workflows cannot automatically start if the triggering action was performed by System Account. Canceling workflow auto-start."
However, all the fixes I've seen have not worked for me. A common solution is to not run or create the workflow as the SharePoint System Account. Well, my SharePoint service accounts are not the ones I'm logging in as to upload my documents nor was it the one I used to create the workflow. I've tried editing & re-publishing my workflow as a totally new account and it still won't auto-start.
Just focus on two things:
Workflow will never start automatically with system account.
Check the options Start workflow automatically when an item is created or changed from Workflow Start Options.
While publishing the workflow, u need to select the checkbox Start workflow automatically when an item is created or changed for the workflow to start automatically or else whatsoever the WF will not start automatically.
Instead of using Sharepoint system user account, u could use an account having contribute permission on site level and full control over the library
Run the command at the server in powershell
stsadm.exe –o setproperty –propertyname declarativeworkflowautostartonemailenabled –propertyvalue yes
After I did that, the workflow runs perfectly although it shows the created by as being "system account".

Resources