Master ChatGPT and JIRA Integration: Create and Respond to Issues in Any Language!
Table of Contents
- Introduction
- Detecting the Language of an Incoming Email
- Converting the Email to English Language
- Creating a Jira Issue
- Sending a Response in the Original Language
- Setting up the Automation in UiPath Studio
- Validating the Connection
- Generating Text Completion from Open AI
- Checking if the Language is English
- Converting Non-English Emails to English
- Logging the Message to Jira
- Adding Records to a Data Table
- Reply to Email and Sending the Response
- Conclusion
Introduction
In this article, we will explore how to detect the language of an incoming email using UiPath Open AI. We will then automatically convert the email to the English language before creating a Jira issue. Finally, we will send a response in the original language of the email using the same connector. Let's dive in and get started with the process!
Detecting the Language of an Incoming Email
To begin, we need to set up the automation in UiPath Studio. Create a new project and select the automation as event-Based. Add the "Email Received" trigger and specify the folder as the inbox. Save the received email into a variable for further processing.
Converting the Email to English Language
Next, we will use the "Generate Text Completion from Open AI" activity to determine the language of the email. Using the "Expression Builder," we will pass the email body to the Open AI connector and ask it to provide the language in one word. This output will be saved in a variable.
Creating a Jira Issue
Once we have detected the language of the email, we will check if it is not in English. If it is not, we will convert the email to English using the same Open AI connector. Then, we will log a message to Jira and create a new issue. We will specify the Jira project, issue Type, summary, reporter, and description. The output will be saved as an issue ID and issue key.
Sending a Response in the Original Language
To send a response in the original language of the email, we will utilize the "Reply to Email" activity. We will pass the received email and the variable containing the converted response in the body part of the activity. The response will be sent accordingly.
Setting up the Automation in UiPath Studio
- Create a new project in UiPath Studio.
- Select the automation as event-based.
- Add the "Email Received" trigger and specify the folder as the inbox.
- Save the received email into a variable for further processing.
Validating the Connection
- Validate the connection to ensure it is valid.
- Select the folder where the emails are received, such as the inbox.
- Click on save to store the received email in a variable.
Generating Text Completion from Open AI
- Add the "Generate Text Completion from Open AI" activity.
- Validate the connection to ensure it is valid.
- Use the "Expression Builder" to pass the email body to the Open AI connector.
- Ask the connector to provide the language in one word.
- Save the output in a variable.
Checking if the Language is English
- Add an "If" activity to check if the generated language is not English.
- Use the "Contains" function to check if the language contains the word "English".
- If the language is not English, proceed to the next activity.
Converting Non-English Emails to English
- Add the "Generate Text Completion from Open AI" activity.
- Use the "Expression Builder" to ask the connector to convert the email body to English.
- Save the output in a variable.
Logging the Message to Jira
- Add the "Log Message to Jira" activity.
- Validate the connection to ensure it is valid.
- Specify the Jira project and issue type.
- Use dynamic values for the summary and reporter.
- Use the variable containing the converted email body as the description.
- Save the issue ID and issue key as the output.
Adding Records to a Data Table
- Add the "Create Entity Record" activity to create a data table.
- Specify the column names for email, email language, Jira ID, and Jira key.
- Retrieve the values from the email received and the generated text completion activities.
- Add a new record to the data table for each email.
Reply to Email and Sending the Response
- Add the "Reply to Email" activity.
- Pass the received email and the variable containing the converted response.
- Set the priority as high.
- Save the response to a variable.
Conclusion
In this article, we have learned how to detect the language of an incoming email, convert the email to English, create a Jira issue, and send a response in the original language. By utilizing UiPath Open AI and the appropriate activities, we can automate this process efficiently. This automation can improve the response time and overall customer satisfaction.