Forums

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

How do I send an automatic Teams message for a new ticket that is created?

Shayan Ali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2023

For new JIRA tickets that are created with a certain label, I want to the JIRA/Teams integration to send an automatic message to individual chats/group messages. These would be bug tickets with a certain label for a launch our team is doing.

I do NOT want this message going to a Teams Channel but rather an individual chat. How do I go about doing this? Thanks!

1 answer

0 votes
MoroSystems Support
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 Champions.
November 1, 2018

Hi,

you have now RemoteIssueLink (documentation). There is no Confluence page content stored in this class.

But you can extract pageId from url property of RemoteIssueLink and get Confluence page content via REST call:

https://confluence.com/rest/api/content/6652581?expand=body.storage

This REST call returns JSON with page content. There should be elements with these tags

<ac:parameter ac:name=\"key\">ISSUE-KEY</ac:parameter>

 in JSON. You shoul be able to get these issues and filter as you need.

 

Regard

Josef Pavelec

zaharovvv_suek_ru
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 Champions.
November 2, 2018

Hey,  @MoroSystems SupportJosef Pavelec! Thank you for your reply! Could you post some code? 

I've tried the following code:

def curl = "/usr/bin/curl -u admin:admin https://confluence.oop.ru/rest/api/content/6652581?expand=body.storage"
def output = curl.execute().text

But I see the following error:


java.io.IOException: Cannot run program "/usr/bin/curl": CreateProcess error=2, The system cannot find the file specified
at Script6083$_run_closure1.doCall(Script6083.groovy:41)
at Script6083.run(Script6083.groovy:36)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
... 2 more

 

Is it necessary to have ScriptRunner for Confluence to make REST confluence endpoint?

I have ScriptRunner just for Jira.

 

 

Suggest an answer

Log in or Sign up to answer