Jira Cloud And Slack integration via Airtable

Ana November 7, 2024

Hi all,

I have an issue that I don't know how to tackle:

Goal: When a specific Jira cloud ticket changes status, I want to get a Slack message which will tag a Slack user matching with ticket assignee. 
Something like this: 
Hello <@{{webhookResponse.records[0].fields.SlackUserID}}>, your issue <{{issue.url}}|{{issue.key}}> has been updated!

Setup: Jira Cloud, Automation rule using webhook, account map in Airtable as SlackUserID, JiraUserEmail. Validation returns 200 OK.

Example json structure:

{
  "records": [
    {
      "id": "xxx",
      "createdTime": "2024-10-14T17:11:34.000Z",
      "fields": {
        "JiraUserEmail": "name@email.com",
        "SlackUserID": "Uxxxxx"
      }
    }
  ]
}

Problem:  {{webhookResponse}} returns empty/no info when I use {{issue.assignee.emailAddress}} in web request URL, but return correct .json record from Airtable if I use specific email. 

 

Is there anything missing? Any ideas on how make thing integration work? Is there easier/better way to link jira with slack so it can tag specific slack user?  

Thanks.

 

 

Edit: 

Names in the airtable have the following format: Name Surname or sometimes name.surname

Used displayName instead in the web request, but rule log after triggering sends me this message:

Invalid URL specified when publishing web request:

2 answers

0 votes
Abdallah Khaled
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 11, 2024

Hi @Ana , the smart value looks fine, such smart values like {{reporter.emailAddress}} should return the email address, however, as shown in the users mart value guide here,If the visibility of the user’s email address is set to Only you and admins in Profile and visibility, then the emailAddress smart value will not return any value.

 

 

Ana November 12, 2024

Thanks for the reply! 

If I'd like to keep email address visibility the same (only you and admins) I assume my second best bet is to use {{assignee.displayName}} instead

Abdallah Khaled
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2024

yes, if this profile information "i.e display name" is made visible in Profile and visibility as well

Ana November 13, 2024

Ok, I tried using the display name instead with the following change in web request URL:

filterByFormula=%7BJiraUserDisplayName%7D%3D%27{{issue.assignee.displayName.replace(" ", "%20")}}%27

Am I missing here anything? Was testing on me as assignee as I have both my names setup as public to everyone. 

Abdallah Khaled
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2024

the smart value looks correct, it should return something like "Abdallah%20Khaled"

Ana November 14, 2024

I've updated the starting post with more info since I couldn't comment it for some reasons. 

Error message in rule log on triggering: 

Invalid URL specified when publishing web request
Illegal character in query at index 105

Abdallah Khaled
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2024

it seems like a syntax error or the web request is expecting something else, you can test with the automation action "log action" to see if the smart value is returning the correct/expected user value.

0 votes
Gaurav November 8, 2024

If you are open for 3rd party apps, you can do easily via https://slackjira.com/

Ana November 11, 2024

Sadly, I prefer not to opt in to another paid 3rd party integration. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events