Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe

UI Text Box
sizemedium
typeinfo

Use case

Get the contact information about the reporter of the issue from your Hubspot account and copy it into a Text Field (multi-line).

  Prerequisites

UI Expand
titleHubspot private app
UI Steps
UI Step

 Create a Hubspot private app in your Hubspot account.

UI Text Box
typeinfo

Visit https://developers.hubspot.com/docs/api/private-apps for more information.


UI Step

 Select the following scope for the app.

Code Block
linenumberstrue
crm.objects.contacts.read 

 


UI Step
Store the access token for future usage in the Execute remote action post function.
UI Expand
titleConnection with Hubspot
UI Steps
UI Step

 In Jira administration > Manage apps > Remote actions > Connections, create a new connection and name it. 

UI Step

 Set the following base URL.

Code Block
linenumberstrue
https://api.hubapi.com

 


UI Step
Select the Bearer authentication method and enter the access token previously stored.

  Configuration

UI Steps
UI Step
Add the Execute remote action post function to the desired transition.
UI Step

Action

In Expert mode, create a new action with the following parameters:

UI Steps
UI Step

Name

Enter Get Hubspot contact information as the name of the new action.

UI Step

Method

Select the POST method.

UI Step

Default connection

Select the connection with Hubspot.

UI Step

REST path.

Use the following REST path.

Code Block
linenumberstrue
/crm/v3/objects/contacts/search
UI Step

Action body

Enter an action body like the following one.

UI Text Box
typeinfo

This action body requests the company, address, city, phone number, mobile phone number and email from the Hubspot contact information of the reporter but it can be modified to satisfy your requirements.

Code Block
linenumberstrue
{
"filterGroups": [
{
"filters": [
{
"values": [
"emailmaria@hubspot.com",
"%{issue.reporter.email}"
],
"propertyName": "email",
"operator": "IN"
}
]
}
],
"properties": [
"company",
"address",
"city",
"phone",
"mobilephone",
"email"
],
"limit": "10",
"after": "1"
}


UI Step

Update issue fields

UI Steps
UI Step

Update a Text Field (multi-line).

UI Step

Select the option Set field value manually (parser expression).

UI Step

Enter the following expression with the expression editor in Advanced text mode.

Code Block
linenumberstrue
"*Contact information*" + "\n"+
"\n" +
(%{action.response.results[].properties[].company} != "" ? "|*Company*|" + %{action.response.results[].properties[].company} + "|" + "\n" : "") +
(%{action.response.results[].properties[].address} != "" ? "|*Address*|" + %{action.response.results[].properties[].address} + "|" + "\n" : "") +
(%{action.response.results[].properties[].city} != "" ? "|*City*|" + %{action.response.results[].properties[].city} + "|" + "\n" : "") +
(%{action.response.results[].properties[].phone} != "" ? "|*Telephone number*|" + %{action.response.results[].properties[].phone} + "|" + "\n" : "") +
(%{action.response.results[].properties[].mobilephone} != "" ? "|*Mobile*|" + %{action.response.results[].properties[].mobilephone} + "|" + "\n" : "") +
(%{action.response.results[].properties[].email} != "" ? "|*Email*|" + %{action.response.results[].properties[].email} + "|" + "\n" : "")
UI Text Box
typeinfo

If the action body was edited, this expression should also be adjusted to the new request.



  Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-workflow" and ancestor = "73403011"

Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue

Page properties
hiddentrue
JWT feature

Workflow function

Execute remote action

Parser functions
Label