Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended Knowledge Base Articles Emailed to Users

Isaac Ruffner April 22, 2025

Hello all,

Still kind of new with creating JIRA automations. I've currently run into an issue with one  that is supposed to retrieve the top three recommended knowledge base articles for an issue and send an email to the respective reporter containing those articles. Instead, it will only send one article even though there are at least three that contain the same keywords as the issue summary. Here is an overview of the rule as I am testing it (manual trigger will be changed to automatic)Screenshot 2025-04-22 105455.pngScreenshot 2025-04-22 105546.png

I believe the issue may reside in the formatting of the Web Request URL or in the formatting when sending the email. Here is the current web request url: https://richmondnational.atlassian.net/rest/servicedeskapi/knowledgebase/article?query={{issue.summary.urlencode()}}&limit=3

The rest of the web request is formatted accordingly: Screenshot 2025-04-22 110407.png

Here is the email formatting: Screenshot 2025-04-22 110517.png

Troubleshooting steps I've already taken:

- Ensured all knowledge base articles are accessible and not locked behind permissions

- Recreated the auth token

I should also mention that I created this automation based off this post here: https://community.atlassian.com/forums/Automation-questions/Suggested-knowledge-base-article-smart-value/qaq-p/1572379

 

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 22, 2025

Hi @Isaac Ruffner -- Welcome to the Atlassian Community!

If you use your request URL with an example query in a browser tab (or standalone tool), do you get the expected 3 results?

If you write the webhook response to the audit log, do you observe the same results as the standalone call?

Finally, that result of that endpoint call should be a list of values.  If you write this to the audit log, does it show as a count of 0 to 3, confirming the JSON is interpreted as a list:

Returned article count: {{webhookResponse.body.values.size}}

 

Kind regards,
Bill

Isaac Ruffner April 30, 2025

Hi Bill,

Thank you, and apologies for the late response, I was out of town. I've tested the web request URL using a third-party tool, Postman. It seems for that the endpoint call, I'm getting mixed results depending on what I set the {{issue.summary.urlencode()}} query parameter to. In this instance, I've created a JIRA Service Request titled "VPN not working". I've then set the {{issue.summary.urlencode()}} query parameter to a few different values to see what it returns. When set to the exact title of the request, VPN not working, I get the following response Screenshot 2025-04-30 130014.png

However, when I set the parameter to just VPN or VPN not, I receive the results I'm expecting, Screenshot 2025-04-30 131053.png So now I'm suspecting that there is something wrong with how the web request is capturing the keywords from the service request. Weirdly enough, the service request itself shows recommendations from the knowledge base accurately, Screenshot 2025-04-30 131922.png

I'm wondering if there is some way to make the keyword capture less restrictive?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2025

I found this recent, open defect where the endpoint is not returning the expected KB article results: https://jira.atlassian.com/browse/JSDCLOUD-15884

It appears to be in the short-term backlog evaluation status, so I recommend watching / voting for that one.

 

And in the endpoint documentation, I do not see a way to make the query "fuzzier" and less restrictive: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase/#api-rest-servicedeskapi-knowledgebase-article-get

 

Isaac Ruffner April 30, 2025

Ah ok yes that makes a lot of sense as I remember a time when this automation was functioning properly. I will be paying close attention to that defect post and hope it gets fixed soon. Thank you for your help!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events