Forums

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

How to automatically link a confluence page to a Jira ticket ?

Pierre-Olivier Hebert _QPS_
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!
June 6, 2025

Dear Jira community,

 

I'm working on Playbooks and automation stuffs and I'm struggling to automatically link a confluence page to a Jira ticket.

I tried to send a web request with API token which is not working at this time. The token is never trigged.

 

Any idea on how to do it ?

Thank you for helping,

Pierre-Olivier

1 answer

1 vote
Tuncay Senturk _Snapbytes_
Community Champion
June 6, 2025

Hi @Pierre-Olivier Hebert _QPS_ 

What error did you get from the web request? Did you try with Basic authentication and include the correct Authorization header?

(e.g. Basic <base64ncodedstring(email:token)> --> Base64.encode(email:token)

 

Pierre-Olivier Hebert _QPS_
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!
June 6, 2025

Dear @Tuncay Senturk _Snapbytes_ ,

 

Thank you for answering and helping me.
At this time, I don't know if I have errors or not and don't where to look. I may set it up wrong.

 

Here is what I tried:

  • On Jira project automation, I create a rule triggered by components valu
  • Once triggered I add a "comment" action item (which is working) and a "send web request" action item
    • URL -> https://mySpace.atlassian.net/rest/confluenceIssueLink/1/confluence?issueId={{triggerIssue.id}}&pageUrl={{https://DocumentationURL}}
      • I'm wondering if the problem comes from the triggerIssue.id that I didn't "set". How can I change it to automatically look at the jira ticket where the automation is running ?
    • HTTP method: POST
    • Web request body; Empty
    • Delay execution ticked
    • Key: Authorization
    • Value: my API token value generated on the Atlasian API tokens.

 

Hope it is clear,

Thank for your help.

Pierre-Olivier

Tuncay Senturk _Snapbytes_
Community Champion
June 6, 2025

Thanks for the details — that helps a lot!

The Authorization header must be in Basic Auth format, not just the raw API token.

That means:

  • Combine your email and API token with a colon, like: your-email@example.com:your-token

  • Base64 encode that string.

  • Add it to the header like this:

    Key: Authorization
    Value: Basic <base64-encoded-string>

You can generate it easily using https://www.base64encode.org.

You don’t need to “set” the triggerIssue.id. It’s a built-in smart value that refers to the issue that triggered the rule. That part should work as-is IMO.

I see another possible mistake in your rule.

 In your current setup, you’re including {{https://DocumentationURL}} inside the smart value, which isn’t valid.

Instead, hardcode the Confluence page URL (or make it a variable), like this:

https://mySpace.atlassian.net/rest/confluenceIssueLink/1/confluence?issueId={{triggerIssue.id}}&pageUrl=https://mySpace.atlassian.net/wiki/spaces/ABC/pages/123456789/My+Page

or if you have the page URL as a custom field in Jira:

...&pageUrl={{issue.customfield_12345}}

To check for errors: Open the automation rule, go to Rule Detail. After triggering the rule, check the log for request/response details.

I hope I was clear!

 

Like # people like this
Pierre-Olivier Hebert _QPS_
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!
June 6, 2025

Dear @Tuncay Senturk _Snapbytes_ 


I finally succeed to do it thanks to your help. It works like a charm ! :)

Pierre-Olivier

Suggest an answer

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

Atlassian Community Events