21min

How to integrate with JIRA to create a ticket and receive confirmation email to sender

If you already created your first process following the steps in Demo - creating your first process flow💪🏼 article, you are ready to explore more.

Scenario: A support team expects JIRA tickets to be raised by a client, but the client does not have access to the JIRA platform. The client has access to a portal where they can introduce the data related to the issue and press "Submit". A process flow will be triggered in PROCESIO which will open the ticket in JIRA and also send an email to the requester with the ticket details. 

This will be a basic scenario where PROCESIO can help you with creating a ticket in JIRA platform from PROCESIO together with sending an email confirmation to the requester. 

Let's build this process! 

The process flow created will look like this:

Document image

Create the connection credentials

Step 1. Create the email server configuration: check Working with Credentials Manager article. We will use the email server configuration in Send Email action setup.

Step 2. Create connection to JIRA platform. Similar to the email server config, go to Credentials Manager section to set it up.  We will use this API configuration in Call API action. Check JIRA Cloud platform REST API documentation

Create and configure the process

Step 1.  Create a new process: Go to Process Designer section and click on Create New button. This will take you to the canvas where you will build the flow.

Step 2. Add the Send Email and Call API actions on canvas and connect them by dragging relations between all the actions. 

Document image

Step 3.  Creating process variables: as mentioned at the beginning, we want to automate this process and make it pass dynamic data such as issue summary ,issue description, requester email address etc. Thus, we need to create some process variables within our process flow, which will act as data placeholders while designing the flow. At runtime, they will take new values. 

Go to Process Variables (x) in the top bar to start creating the variables needed for this process. Click Add Variable. You need to define variables as follows:

Document image

Step 4. Configure the Call API action which will connect to JIRA and create the ticket.

  • Click on Call API action and the properties panel will open. You can rename it from Call API to Create JIRA ticket.
  • Select the API configuration created in step 1.
  • Click on Configure Request to proceed next steps:
Document image
  • For the Call API configurations you are going to check the JIRA's API documentation to check the method name, parameters needed, etc. 
  • We’ll select the verb POST. As you can see here the URL is pre-filled. This comes from the REST API credential configuration. I just need to specify which method name to use to have a valid endpoint - /rest/api/3/issue
  • body:  add a JSON body that also includes process variables as defined in step 3:
C#
|
  • Make sure you update the body with your custom “key”, “name” and variables: “summary” and “text”.

To open the variables selector in Body and add process variables to your message: press Insert key (for Windows) or Shift +Tab (for MacOS)

  • Map the status variable to the <%Status%> output property.
  • Save the changes.
Document image

Step 5.  Configure the Send Email action. Click on it and the properties panel will open. You can rename it from "Send Email" to "Send confirmation Email". 

  • Select the email server configuration created in step 2.
  • Click on the Send Email card to proceed to the next steps:
Document image
  • Configure the parameters of the action:
  • The From field will set the display name of the sender. The actual email address of the sender is the one set in the Credential Manager, but we can set here the display name to be anything we want. I’ll use “Department name”.
  • The To: the user requesting the ticket to be open; add <%requesterEmailAddress%> variable;
  • The Subject: Your issue has been submitted! 
  • The Body:
Text
|
Document image

To open the variables selector in Body and add process variables to your message: press Insert key (for Windows) or Shift + Tab (for MacOS).

Step 6. Save the process. Validate the process. Run the process.

Document image

Fill in the values for the input variables declared and hit run:

Document image

Once the process completes running, a notification will appear. Click on Check instances button to view the details at process and action level:

Document image

The ticket has been created in JIRA and a confirmation email with the ticket details was sent to the requester.

Congrats! You have just created a new process flow in PROCESIO!

If you encountered any issues while creating this process flow, please let us know as we are all growing together.