A custom activity for UiPath that provides global exception handling with OpenAI integration for intelligent error analysis and resolution suggestions.
- Global exception handling for UiPath workflows
- Automatic logging of exception details
- OpenAI-powered analysis of exceptions
- Suggested fixes based on the exception context
- Secure API key handling
- AI-generated email notifications (optional)
- UiPath Studio 2022.4 or later
- .NET Framework 4.7.2 or later
- OpenAI API key
- Build the solution using Visual Studio
- Copy the compiled DLL from the
bin\Releasefolder to your UiPath custom activities folder - Restart UiPath Studio
-
In your UiPath workflow, add the "Global Exception Handler" activity
-
Configure the required inputs:
- Exception: The exception to handle
- OpenAI API Key: Your OpenAI API key (store this securely in UiPath's credential manager)
- Derive Mail Values: Enable this to generate email subject and body (optional)
-
If Derive Mail Values is enabled, you can use the outputs:
- Mail Subject: AI-generated subject line for the email
- Mail Body: AI-generated body containing error details, summary, and suggestions
<Sequence DisplayName="Main Sequence">
<TryCatch DisplayName="Try Catch">
<TryCatch.Try>
<!-- Your workflow activities here -->
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<Sequence DisplayName="Exception Handler">
<GlobalExceptionHandler:GlobalExceptionHandlerActivity
Exception="[exception]"
OpenAIApiKey="[yourOpenAIKey]"
DeriveMailValues="[True]"
MailSubject="[mailSubject]"
MailBody="[mailBody]" />
</Sequence>
</Catch>
</TryCatch.Catches>
</TryCatch>
</Sequence>- Store your OpenAI API key in UiPath's credential manager
- Never hardcode the API key in your workflow
- Review the OpenAI API usage and costs
For issues and feature requests, please create an issue in the repository.
This project is licensed under the MIT License - see the LICENSE file for details.