Power Automate Custom Connector help
Has anyone created a custom connector in Power Automate for Brightspace APIs? Good ol' AI has been helping me limp slowly towards a solution, but now I'm stuck. I'm trying to build one that gets Brightspace datasets. All my API calls are working in Postman.
- I managed to create a custom connector that authenticates.
- I added a definition to download the Awards Issued dataset. It works! Yay! I was able to use it in a Power Automate flow.
- I added a second definition, this time to download the Users dataset. It does not work. It never works, despite me editing the code over and over. (Remember, it works in Postman.)
Here's the error when I test the Users definition:
I've attached a sample of my simplified swagger code.
Things I've tried:
- Reversing the order of the definitions (Awards Issued continues to work, Users does not)
- Getting AI to modify the code according to best practices
- Deleting all definitions and starting from scratch
التعليقات
-
Did you try updating the scopes with the proper one? Will swagger directly downloads the dataset after running get the request? I have used python script's for downloading the Datasets.
-
We do the same - pull down the datasets and load them into a SQL database.
-
I think the scopes that Pratap is referring to are these:
datahub:dataexports:downloadThey're listed in the API documentation here.
-
Thanks all - I'm still stuck.
- I changed the scopes.
- AwardsIssued still works and downloads
- DownloadUsers still gives me a 403 error.
- When I test the DownloadUsers call via the Test Connection feature, I get this feedback:
(I realized that testing via the Swagger UI view gave me 403 errors for both DownloadAwardsIssued and DownloadUsers. If I test via this interface, I only get an error for DownloadUsers.)
I have checked and rechecked the formatting in my code and I/Co-pilot/ChatGPT can't find any errors with it.
- I changed the scopes.
-
I'm still struggling. One thing I noticed is that in Postman, DownloadAwardsIssued ALWAYS returns the .zip to me via redirect URL, but DownloadUsers is a straight download.
In the Custom Connector, I had to use special code (see the code in 1 Minute Fixes - Handling 302 Redirect urls (powerplatform.com)) to get DownloadAwardsIssued to work.
Outside of a Custom Connector, does anyone have ideas on how to make APIs work with M365 products to automatically retrieve data on a daily basis?
-
FYI I finally resolved custom connector woes. I could cry with happiness.
I manually updated my scopes in the Brightspace tool, AND in the swagger code of the custom connector, but nothing worked. It turns out you need to hit the refresh connection icon in order for the Brightspace side of things to be picked up.