Forum Discussion
Problem Exporting Copilot with Custom Connection
I have a clean environment in which I have created a single solution, "Xero4Copilot", that contains a single agent "Executive Summary". This agent uses a Custom Connector "Odatalink_report", which is created from a tested Swagger file.
The Agent uses two endpoints from the connector as tools. The Agent is using the tools well, with no configuration errors.
I wanted to clarify the problem before calling for help, hence the clean install and intro.
When I export the solution, I get a failure, the GUI gives the same answer, this is the output from PAC CLI:
PS C:\Users\mike\Downloads> pac solution export -n Xero4Copilot
Connected as email address removed for privacy reasons
Connected to... Xero4CopilotDev
Starting Solution Export...
Microsoft PowerPlatform CLI
Version: 1.50.1+gabb74d2 (.NET Framework 4.8.9221.0)
Online documentation: https://aka.ms/PowerPlatformCLI
Feedback, Suggestions, Issues: https://github.com/microsoft/powerplatform-build-tools/discussions
Error: Exporting connection reference mike_executiveSummary.shared_mike-5fodatalink-5freport-5f24577e437a5ff0b6.a4cd806a-ef0b-4680-acf3-34e5b779930f for a custom connector requires the custom connector to be added to a dataverse solution. Please add connector shared_mike-5fodatalink-5freport-5f24577e437a5ff0b6 to a solution and retry.
I've tried various adds of components, but this does not really seem to be the problem. I have reduced the problem to a single area of interest:
I was wondering if I need to register that Custom Connector or add some metadata.
Any thoughts on how to resolve this problem? I've decided to call it a problem and see if it is an issue, haha!
TIA
Mike
Here’s Some Other Helpful Steps
Solution 1: Add the custom connector to a solution
- This is the most frequent cause of the “Solution Export Error”.
- Create a new solution specifically for your custom connector.
- Add the custom connector to this solution
- Export this connector solution first.
- Import the connector solution into the target environment.
- Then import the main solution containing your Copilot
Solution 2: Verify credentials and configuration
- Ensure you have the correct API key or used a Valid Microsoft Entra authentication method.
- Check that the correct regional API endpoint is being used.
- If you are using a deployment, ensure there are no blank spaces at the beginning or end of the deployment name.
Solution 3: Check for other potential issues
- Firewall/Antivirus: Make sure your firewall or antivirus settings are not blocking the connection.
- Internet Connection: A stable and reliable internet connection is necessary for many Copilot functions.
- Sample JSON: When building a custom connector, you may need to define default responses by importing sample JSON data for your actions to ensure the Copilot can understand the data structure, according https://youtu.be/P8mKbncVNmo.
Hope This Helps Mike Allen !
6 Replies
- UhLukasBrass Contributor
Here’s Some Other Helpful Steps
Solution 1: Add the custom connector to a solution
- This is the most frequent cause of the “Solution Export Error”.
- Create a new solution specifically for your custom connector.
- Add the custom connector to this solution
- Export this connector solution first.
- Import the connector solution into the target environment.
- Then import the main solution containing your Copilot
Solution 2: Verify credentials and configuration
- Ensure you have the correct API key or used a Valid Microsoft Entra authentication method.
- Check that the correct regional API endpoint is being used.
- If you are using a deployment, ensure there are no blank spaces at the beginning or end of the deployment name.
Solution 3: Check for other potential issues
- Firewall/Antivirus: Make sure your firewall or antivirus settings are not blocking the connection.
- Internet Connection: A stable and reliable internet connection is necessary for many Copilot functions.
- Sample JSON: When building a custom connector, you may need to define default responses by importing sample JSON data for your actions to ensure the Copilot can understand the data structure, according https://youtu.be/P8mKbncVNmo.
Hope This Helps Mike Allen !
- Mike AllenCopper Contributor
Solution one was the clue. I added the connector to its own solution and exported that. I removed the tools from the Copilot solution and exported that. Then deleted both solutions and all their objects. I reimported the connector solution and the copilot solution and added the tools to the copilot solution. I ran the solution checker, which ran ok. I then exported the copilot as a managed solution, it asked If I wanted to add the connection to the solution and I said yes. After all this I imported the copilot solution into the production managed environment with no problem. Note that I did not need to import the connector solution first as the build had incorporated it into the copilot solution.
Note that the connector is a swagger file and I plan to add a longer description to each endpoint. There is a limit of 1024 characters, so I have to be precise, and this gives the orchestration the information it needs. The Swagger is detailed, and I assume that the orchestration pulls the structure(?). Forward plan is to manage the connector in Swagger.
As an extra, I'm considering adding some knowledge on accounting terminology to either the instructions or as a knowledge file. For example, ROI has a field Return On Investment in the Executive Summary. Or maybe an instruction to scan all the item names in the report first. It's a work in process, next step is to add more endpoints and add test questions. Thanks for your feedback UhLukas , we need this forum to thrive 😁
- UhLukasBrass Contributor
Also Here’s Some Additional Links: learn.microsoft.com / support.microsoft.com
- UhLukasBrass Contributor
Did You Consult The Microsoft Learn Documentation?
- Mike AllenCopper Contributor
I was looking here: https://learn.microsoft.com/en-us/microsoft-copilot-studio/advanced-connectors , but after reading your post I read a little more. I'm going to try a separate solution. This is a full Swagger API but that's another story 😁
- UhLukasBrass Contributor
No Problem You Can Always Try Posting Here For Unofficial Microsoft Help This Is An Open Public User Group If My Reply Didn’t Help Perhaps You Could Specify Your Issue More Clearly For Me To Better Understand Your Issue