How to create Confluence page automatically once an issue is created in JSM Cloud

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.


Summary

There are departments that require the employee to create a Confluence page after raising a ticket to Jira to further track detailed information about their request.

For a more general Confluence page template, may refer to Automating the creation of a Confluence page linked to a Jira ticket community post.

Display Jira Issue Information in Confluence

  1. The employee will raise a ticket to propose a work trip with brief information.
  2. Automation will automatically create a page.
  3. The employee is expected to have a Confluence license to update the page with detailed information.
  4. Finance will review the ticket and transition the issue for approval from the Manager.
  5. The manager will review the Confluence page and approve it.

Step 1: Create a Jira Service Management project

  1. Go to the Jira site.
  2. At the top bar, click Projects > Create Project.
  3. Choose General service management for business teams  project template.
  4. Create the project, and you can name it Work Trip Planning. 

Step 2: Create a few custom fields for employees to fill up when creating the ticket.

  1. Go to Jira Settings > Issue > Custom fields. 
  2. Click Create Custom Fields.
  3. Choose Date Picker  custom field type.
  4. Name it Travel Date  and click Create. 
  5. In the search panel, key in the project key. Then, look for a screen with Jira Service Management: General Request Issue Screen name. 
  6. Tick it and click Update.
  7. Repeat the step 2 to 6 for the field below:
    1. Trip Location - Use the "Short Text" custom field type.
    2. Flight Date - Use the "Date Picker" custom field type.
    3. Flight Time - Use the "Short Text" custom field type.

Step 3: Create a new request type and update the form with the custom fields.

  1. Go to the new project you've created.
  2. Go to Project Settings > Request Types. 
  3. Click Create Request Type. 
  4. Key in Work Trip Proposal and choose to Submit a request or incident  issue type.
  5. Tick the General and click Create.
  6. Open the newly created request type to edit the form.
  7. Drag all the new custom fields created previously from the right sidebar to the form. Including the "Approvers" field.
  8. Update the "Description" portal field name with "What is the purpose of this trip?".

Step 4: Create the automation to automatically create a page once the ticket created 

  1. The automation will look as below: 
    Screenshot of an automation rule configuration. The rule is titled Test create work trip confluence page and is enabled. The rule triggers when an issue is created, checks if the request type is Work Trip Proposal, then sends a web request to create a Confluence page. It then adds the Confluence page link to the audit log, adds a comment to the issue thanking the reporter and requesting a transition to In Progress, and finally adds a component.
  2. Download the attached file, and you may need to upload it to the site and update a few things based on the next steps.  
  3. Go to the site's global automation page, which is https://xxxx.atlassian.net/jira/settings/automation
  4. Click the three dots on the top right corner and click Import Rule.
  5. Click Upload JSON  and choose the file.
  6. Under "Restrict to projects", choose the newly created project.
  7. Tick it and click Next > Let's do this. 
  8. Go back to the project and go to Project Settings > Automation. 
  9. Open the newly uploaded automation.
  10. Click the Then : Send Web Request . The REST API used for this request are the Create Content API from Confluence Cloud , which is  POST /wiki/rest/api/content 
  11. Update the section as per screenshot below:
    Screenshot of a Send web request configuration panel. It shows fields for Web request URL (pre-filled with an example URL and a note to change it), Authorization (hidden with asterisks and a note to click Add and follow steps in an article), HTTP method (set to POST), Web request body, Custom data, and Custom data. Additional instructions highlight the need to change the space key within the JSON body of the request.
  12. For the Header section, add as below:
    1. Header Name: Authorization. 
    2. Header Value: Basic XXXXX.
      1. The XXXX value are a decoded Base64 value of username:API Token.
      2. Follow the steps in Manage API tokens for your Atlassian account documentation to create an API Token for your Atlassian Account.
      3. Then, follow the instructions here to encode your useremail:APItoken to base64.
      4. Paste it to the Header Value.
  13. For the space key, you can use the space created for the project.
    1. Go to Project Settings > Knowledge Base. 
    2. Hover to click the space name.
    3. From the URL, you will notice the space key from "/wiki/spaces/XXX/overview" . The XXX are the space key.
  14. Once done updating the automation, Save it and enable the automation.

JIRA Smart Value

In the custom data, there is a Jira Smart value already added. From the screenshot, you may notice the  {{issue.summary}}  smart value. For each value that you would like to carry over from Jira to the page, you must use the smart value. For a detailed explanation of the smart value, refer to this documentation: What are smart values?

Step 5: Allowing the user with Confluence user to edit the page.

  1. Go to the space permission setting. 
  2. Add the groups that needed permission.
  3. Detail steps can, refer to Assign space permissions documentation.

Step 6: Configure the Approval configuration

  1. Go to Project Settings > Workflow. 
  2. Click the pencil icon for the Default ESM workflow for Jira Service Management workflow to edit it.
  3. In the Diagram view, click Pending  status.
  4. Tick the Include approval step and click Edit.
  5. Additionally, if you would like to allow the employee to transition the issue to Pending status, you can click the transition and tick the Show transition in the customer portal. 
  6. Once done, publish the workflow.
  7. For a detailed explanation about Approval and displaying transition in the workflow, may refer to the documentation. 

Step 7: Allowing employee or customer to choose another account as an approver

  1. Go to Project Settings > Customer Permission. 
  2. Under "Customer Sharing", choose the Customers can search for other customers within their project or organizations. 
  3. For detailed explanation about this, you may refer to this documentation: Change project customer permissions

Step 8: It's time to test

  1. Go to customer portal.
  2. Choose Work Trip Proposal. 
  3. Raise a ticket.
  4. A ticket will be created, and a comment will be added with the Confluence page link.
  5. If the user has access to the space, they can access the link and edit it.
  6. Assigned the ticket and transitioned it to "Pending". The approver will notice the Approve/Decline button as below.
  7. The approval has been approved it and the comment will be updated with the approval status.
  8. The ticket can be closed if needed. 

In case you stumbled any issue configuring it , contact us the Atlassian Support



Last modified on Mar 14, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.