# GitHub, Jira, and Confluence recipe

This use case guides you through connecting GitHub, Jira, and Confluence to create a powerful automation.

# What does this recipe do?

This recipe generates weekly release notes in Confluence based on closed issues from a GitHub repository.

The recipe searches for closed issues, compiles them into a list, and creates a Confluence page with the closed issues. Additionally, if a GitHub issue references a specific Jira ticket in its body, the recipe adds a comment to the corresponding Jira ticket.

flowchart TD subgraph Configuration[" "] direction TB subgraph Scheduler[&nbsp Scheduler by Workato New recurring event trigger &nbsp] a1(Trigger) --- setup1[setup] end subgraph CreateList[&nbsp Variables by Workato Create list action &nbsp] Action1(Action) --- setup2(setup) end subgraph GitHub[&nbsp GitHub Search issues/pull requests action &nbsp] Action2(Action) --- setup3(setup) end subgraph VariablesByWorkato[&nbsp Variables by Workato Add items to list action &nbsp] Action3(Action) --- setup6(setup) end subgraph Jira[Jira Create comment action] Action4[Action] --- setup8[setup] end subgraph Confluence[&nbsp Confluence Create page action &nbsp] Action5(Action) --- setup9(setup) end subgraph ClearList[&nbsp Variables by Workato Clear all items from list action &nbsp] Action6(Action) --- setup10(setup) end end CreateRecipe([Create recipe]) -- Configure your recipe --> Configuration --> Workflow([Automated workflow]) Scheduler --> CreateList --> GitHub --> VariablesByWorkato --> Jira --> Confluence --> ClearList classDef default fill:#fff,stroke:#67eadd,stroke-width:2px; classDef WorkatoTeal fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef SubgraphDash fill:#e1fffc,stroke:#f66,stroke-width:2px,color:#000,stroke-dasharray: 5 5 class Scheduler,CreateList,GitHub,VariablesByWorkato,Jira,Confluence,ClearList SubgraphDash class a1,setup1,Action1,setup2,Action2,setup3,setup5,Action3,setup6,setup7,Action4,setup8,Action5,setup9,Action6,setup10,CreateRecipe,Workflow,WW,WWW,x,xx WorkatoTeal

# Create your recipe

Complete the following steps to create a recipe that searches for closed issues in a GitHub repository, adds them to a list, and then creates a Confluence page summarizing the issues while also adding comments to related Jira tickets.

USE CASES ARE INTENDED AS EXAMPLES ONLY

This use case is intended to serve as an example. Recipe modifications such as trigger and action configuration and conditional logic may require adjustments if you plan to include this recipe in your own workflow.

1

Sign in to your Workato account and go to the workspace project where you plan to add the recipe.

2

Set up connections for GitHub, Jira, and Confluence using the steps in the following sections:

Set up your GitHub connection.
1

Click Create > Connection.

2

Search for and select GitHub as your connection in the New connection page.

3

Provide a name for your connection in the Connection name field.

GitHub connection setupGitHub connection setup

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Use the Connection type drop-down menu to select the connection method you plan to use. You can select your on-premise group name or select Cloud to use a direct connection.

6

Select either OAuth App, GitHub App, or Personal Access Token in the Authentication type drop-down menu.

If you selected GitHub App:

1

Provide your app ID in the GitHub App ID field.

2

Enter the private key in the GitHub App Private key field.

3

Fill in the Installation ID field.

4

Optional. Expand Advanced configuration to provide the API Root URL, which is applicable when using GitHub Enterprise Server.

If you selected Personal Access Token:

1

Enter your personal access token in the Personal Access Token field.

7

Click Connect.

Set up your Jira connection.
1

Click Create > Connection.

2

Search for and select Jira in the New connection page.

3

Provide a name for your connection in the Connection name field.

Jira connection setupJira connection setup

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Select your Connection type.

6

Use the Auth type drop-down menu to select your authentication method. Supported options are Basic, API token, OAuth 2.0, and Personal access token.

7

Provide your Host name. For example, if your Jira URL is https://acme.atlassian.net, your host name is acme.atlassian.net.

8

Click Connect.

Set up your Confluence connection.
1

Click Create > Connection.

2

Search for and select Confluence as your connection in the New connection page.

3

Provide a name for your connection in the Connection name field.

Confluence connection setupConfluence connection setup

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Use the Connection type drop-down menu to select the connection method you plan to use. You can select your on-premise group name or select Cloud to use a direct connection.

6

Use the Auth type drop-down menu to select your authentication method. Options include Basic, API token, and OAuth 2.0.

7

Provide your connection information.

  • If using a cloud connection: Enter your Confluence subdomain in the Confluence subdomain field.
  • If using an on-prem connection: Enter the root URI (includes protocol, optional port, and hostname) of your Confluence host in the Confluence root URI field.
8

Provide your authentication information.

If you selected Basic authentication:

1

Enter your username (not email) in the Username field.

2

Enter your password in the Password field.

If you selected API token:

1

Enter your email in the Email field.

2

Enter your API token in the API token field. You can create one by going to your Atlassian account and selecting Security (opens new window) > API tokens > Create API token.

If you selected OAuth 2.0:

1

Enter your client ID in the Client ID field.

2

Enter your client secret in the Client secret field.

3

Optional. Expand Advanced settings to select scopes to request for this connection. The following scopes are selected by default:

  • read:confluence-groups
  • read:confluence-content.summary
  • write:confluence-content
  • search:confluence
9

Click Connect.

3

Click Create > Recipe.

4

Provide a name for your recipe in the Name field and select the project in which you plan to store the recipe from the Location drop-down menu.

5

Select Run on a schedule as your starting point and click Start building.

Set up your recipeSet up your recipe

6
Set up your Scheduler by Workato New recurring event trigger.
1

Click the trigger in the recipe editor.

Click the triggerClick the trigger

2

Select Weeks in the Time unit field.

  • Available options include Minutes, Hours, Days, Weeks, Months, or Custom schedule.
3

Enter 1 in the Trigger every field to run the recipe weekly.

4

Choose the days the recipe should run in the Days of the week field. For example, select Monday.

5

Specify the time for the recipe to run in the Trigger at field. For example, enter 9:00 AM.

6

Optional. Select the timezone in the Timezone field. If left blank, the default is America/Los_Angeles.

7

Optional. Set the start date and time in the Start after field, or leave it blank to activate the trigger immediately after you start the recipe. You can't change this value after you run or test the recipe.

8

Click Save.

Step summary

This trigger sets the interval for how frequently the recipe runs. The Scheduler by Workato trigger doesn't require a connection.

7

Click the + Add step button and select Action in app.

Add actionClick Add step > Add action in app

8
Set up your Variables by Workato Create list action.
1

Search for and select Variables by Workato in the Choose an app search box.

Choose Variables by WorkatoChoose Variables by Workato

2

Select Create list as your action.

Select the Create list actionSelect the Create list action

3

Type Releases in the List name field.

4

Select Add fields manually in the List item schema field.

5

Edit the following fields in the Add new field dialog:

  • Type Details in the Name field.
  • Ensure String is selected in the Data type field.
  • Ensure No is selected in the Optional field.
6

Click Add field.

7

Click Save.

Step summary

This step creates an empty list named Releases that captures GitHub issues closed in the past week.

9

Click the + Add step button and select Action in app.

10
Set up your GitHub Search issues/pull requests action.
1

Search for and select GitHub in the Choose an app search box.

Choose GitHubChoose GitHub

2

Select Search issues/pull requests as your action.

Select the Search issues/pull requests actionSelect the Search issues/pull requests action

3

Select the GitHub connection you created in the preceding steps.

4

Select the Organization that contains the repository you plan to access.

5

Select your repository in the Repository name field.

6

Select Issue in the Type field.

7

Set the Status to Closed to search for closed issues.

8

Go to the Closed after field, switch to formula mode, and enter the following formula:

(today - 7.days).beginning_of_week

This formula filters the search to retrieve only issues closed since the beginning of the previous week.

9

Click Save.

Step summary

This step searches for issues in your selected GitHub repository that were closed since the beginning of the previous week.

11

Click the + Add step button and select Repeat for each.

Add repeat for eachClick Add step > Repeat for each

How does the Repeat for each condition work?

A Repeat for each loop repeats one or more actions for each item in a list. The loop ends automatically when the entire list is processed.

flowchart TD A(["Start"]) --> B("Another closed GitHub \n issue from the past week?") B -- "Yes" --> C("Add issue to Releases list") --> MoreSteps("Additional steps") B -- "No" --> D(["End loop"]) classDef default fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef WorkatoPink fill:#f3c1c2,stroke:#f3c1c2,stroke-width:1px; class A,D WorkatoPink
12
Set up your Repeat for each loop.
1

Map the Issues | Step 3 datapill to the Input list field.

Map the Issues datapillMap the Issues datapill

2

Select One item at a time in the Repeat mode field.

3

Select No in the Clear step output field. Learn more about this input field.

4

Click Save.

Step summary

This step processes each issue closed since the beginning of the past week. After setting up the loop, you can define the actions you plan for the recipe to perform for each issue.

13

Click Select an app and action.

14
Set up your Variables by Workato Add items to list action.
1

Search for and select Variables by Workato in the Choose an app search box.

Choose Variables by WorkatoChoose Variables by Workato

2

Select Add items to list as your action.

Select the Add items to list actionSelect the Add items to list action

3

Select Releases (step 2) in the List name field.

4

Select End of the list in the Insert location field.

5

Expand the List item field.

6

Complete the following actions in Details field:

1

Map the Title | Step 4 datapill.

2

Type (<a href=".

3

Map the Html URL | Step 4 datapill.

4

Type ">#.

5

Map the Number | Step 4 datapill.

6

Type </a>).

Your configuration should look as follows:

TITLE_STEP_4 (<a href="HTML_URL_STEP_4">#NUMBER_STEP_4</a>)

List item details configurationList item details configuration

7

Click Save.

Step summary

This step appends details extracted from each issue processed in the Repeat for each loop to the Releases list, including the issue title and a hyperlink to the issue number.

15

Click the + Add step button and select IF condition.

Add IF conditionClick Add step > IF condition

How do IF conditions work?

An IF condition enables you to make decisions based on specific conditions. You can control your recipe workflow by executing different actions depending on whether a condition you specify is present or not present (true or false).

flowchart TD A([Add issue to Releases list]) --> B(Does the issue body contain \n a string in the format 'Jira:ABC-123'?) B -->|Yes| C(Add comment to the corresponding Jira issue) B ---->|No| E(Do nothing) classDef default fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef WorkatoPink fill:#f3c1c2,stroke:#f3c1c2,stroke-width:1px; class E WorkatoPink
16
Set up your IF condition.
1

Map the Body | Step 4 datapill to the Data field.

2

Select is present in the Condition field.

This condition checks that the issue body of the current issue being processed is neither empty nor null, preventing errors when applying formulas in the next step.

3

Click + (plus) and select AND to add a second condition.

4

Switch Data field to formula mode and do the following:

1

Map the Body | Step 4 datapill.

2

Append the .match?(/Jira:w+-\d+/) formula.

This formula checks if the Body of the GitHub issue contains a Jira ticket reference in the format Jira:ABC-123.

5

Select equals in the Condition field.

6

Go to the Value field, switch to formula mode, and type true.

IF condition configurationIF condition configuration

7

Click Save.

Step summary

This step checks if the body of each issue contains a Jira ticket reference.

17

Click Select an app and action.

18
Set up your Jira Create comment action.
1

Search for and select Jira in the Choose an app search box.

Choose JiraChoose Jira

2

Select Create comment as your action.

Select the Create comment actionSelect the Create comment action

3

Switch the Issue ID or key field to formula mode.

4

Complete the following actions in the Issue ID or key field:

1

Map the Body | Step 4 datapill.

2

Append the .match?(/Jira:w+-\d+/) formula.

Issue ID or key configurationIssue ID or key configuration

5

Complete the following actions in the Comment text field:

1

Type Closed by Github #.

2

Map the Number | Step 4 datapill next to the hash # symbol.

3

Enter a new line and map the Html URL | Step 4 datapill.

Comment text configurationComment text configuration

6

Click Save.

Step summary

This step creates a comment in the corresponding Jira ticket if the recipe detects a Jira reference in the issue body. The comment indicates that the issue was closed in GitHub, along with the issue number and a hyperlink to it.

19

Click the + Add step button and select Action in app.

20
Set up your Confluence Create page action.
1

Search for and select Confluence in the Choose an app search box.

Choose ConfluenceChoose Confluence

2

Select Create page as your action.

Select the Create page actionSelect the Create page action

3

Enter the Confluence space key in the Space key field. You can find this value in the URL of your Confluence space page.

4

Switch the Title field to formula mode and enter the following:

"Product release (" + today.beginning_of_week.strftime("%d %B %Y") +")"

This sets the title of your Confluence release notes page. For example, Product release (1 October 2024).

Title configurationTitle configuration

5

Switch the Body field to formula mode and do the following:

1

Type "<p>" +.

2

Map the Releases | Step 2 datapill.

3

Type the following formulas:

.pluck('Details').join("<br/><br/">)
4

Type + "</p>.

This code constructs an HTML paragraph that contains the details from the Releases list, with each detail separated by two line breaks (<br/><br/>).

Body configurationBody configuration

6

Click Save.

Step summary

This step creates a Confluence page listing the GitHub issues that were closed since the beginning of the past week.

21

Click the + Add step button and select Action in app.

22
Set up your Variables by Workato Clear all items from list action.
1

Search for and select Variables by Workato in the Choose an app search box.

Choose Variables by WorkatoChoose Variables by Workato

2

Select Clear all items from list as your action.

Select the Clear all items from list actionSelect the Clear all items from list action

3

Go to the List name field and select Releases (step 2) to clear all items from this list at the end of the recipe run.

4

Click Save.

Step summary

This step clears the items from the Releases list, ensuring that the next time this recipe runs, it doesn't add closed issues that were previously included in the release notes page.

Your GitHub, Jira, and Confluence recipe is ready to test and implement.

Example recipe configuration.

GitHub, Jira, and Confluence recipeGitHub, Jira, and Confluence recipe


Last updated: 11/4/2024, 6:09:46 PM