# Post GitHub milestones with Workbot for Slack recipe
This use case guides you through connecting GitHub and Workbot for Slack to create a powerful automation.
# What does this recipe do?
This recipe monitors GitHub for new or updated milestones and automatically posts milestone details to Slack using Workbot for Slack.
# How can I use this recipe?
You can use this recipe to track milestones in GitHub and post updates to your Slack channel in real time. You can also modify this recipe to work with real-time triggers for GitHub issues, pull requests, or issue comments.
# Create your recipe
Complete the following steps to create a recipe that monitors GitHub for new or updated milestones and automatically posts milestone details to Slack using Workbot for Slack:
USE CASES ARE INTENDED AS EXAMPLES ONLY
This use case serves as an example. Modifications to triggers, actions, or conditional logic may be necessary to adapt this recipe to your workflow.
Sign in to Workato.
Select the project where you plan to create the recipe.
Create connections for GitHub and Workbot for Slack:
Create a GitHub connection.
Click Create > Connection.
Search for and select GitHub
on the New connection page.
Provide a name for your connection in the Connection name field.
GitHub connection setup
Use the Location drop-down menu to select the project where you plan to store the connection.
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.
Select either OAuth App, GitHub App, or Personal Access Token in the Authentication type drop-down menu.
If you selected GitHub App:
Provide your app ID in the GitHub App ID field.
Enter the private key in the GitHub App Private key field.
Fill in the Installation ID field.
Optional. Expand Advanced configuration to provide the API Root URL, which is applicable when using GitHub Enterprise Server.
If you selected Personal Access Token:
Enter your personal access token in the Personal Access Token field.
Click Connect.
Create a Workbot for Slack connection.
Click Create > Connection.
Search for and select Workbot for Slack
on the New connection page.
Provide a name for your connection in the Name field.
Workbot for Slack connection setup
Use the Location drop-down menu to select the project where you plan to store the connection.
Optional. Select the NLU provider you plan to use, such as DialogFlow or Amazon Lex NLU. You must connect to the NLU provider for it to appear in the drop-down menu.
Optional. Click Advanced to configure Slash commands verification tokens, custom help content, your Slack app status (classic or not), and your Custom OAuth profile.
Click Connect, sign in to your Slack workspace when prompted, and click Continue to verify the connection.
Go back to your project and click Create > Recipe.
Create a new recipe
Enter a name for your recipe in the Name field.
Select the project where you plan to store the recipe from the Location drop-down menu.
Click Start building.
Start building your recipe
Click Pick a starting point, then select Trigger from an app.
Click Select an app and trigger event.
Set up your GitHub New or updated milestone trigger.
Search for GitHub
and select it as your app.
Choose GitHub
Select the New or updated milestone trigger.
Select the New or updated milestone real-time trigger
Select the GitHub connection you created in the preceding steps.
Select the organization that contains the repository you plan to access from the Organization drop-down menu.
Select your repository in the Repository name field.
Select All from the Action drop-down menu to monitor all milestone statuses. Additional options include the following statuses:
- Opened milestone
- Closed milestone
- Created milestone
- Deleted milestone
- Edited milestone
Configure the New or updated milestone trigger
Click Save.
Step summary
This trigger monitors the GitHub repository you specify for new or updated milestones in real-time.
Click + Add step and select IF condition.
Click 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 true or false.
Set up your IF condition.
Map the GitHub Created at Step 1 datapill to Data field.
Use the Condition drop-down menu to select equals.
Map the GitHub Updated at Step 1 datapill to the Value field.
IF condition configuration
Click Save.
Step summary
This step checks if the milestone is new by comparing the Created at and Updated at timestamps. If the values are identical, the milestone is considered new.
Click Select an app and action.
Set up your Workbot for Slack Post message action.
Search for Workbot for Slack
and select it as your app.
Choose Workbot for Slack
Select the Post message action.
Select the Post message action
Enter the channel name where you plan for Workbot to post milestone updates in the Channel name/DM field, including the #
prefix. For example, use #general
.
Click Add block to message in the Message field.
Click Add block to message
Go to the New block field and use the Type drop-down menu to select Section with text.
Type *New milestone in GitHub*
in the Section text field.
Fill out the Section text field
Click Add block to message.
Go to the second New block field and use the Type drop-down menu to select Section with fields.
Go to the Section text field and perform the following actions:
Type <
.
Map the GitHub Html URL Step 1 datapill.
Type |*
.
Map the GitHub Title Step 1 datapill.
Type *>
.
Enter a new line and map the GitHub Description Step 1 datapill.
Configure the Section text field
Go to Attachment fields and click Add field.
Click Add field
Go to Field #1 and type *ID*:
in the Title field.
Map the GitHub ID Step 1 datapill to the Value field.
Click + Add field.
Go to Field #2 and type *Number*:
in the Title field.
Map the GitHub Number Step 1 datapill to the Value field.
Click + Add field.
Go to Field #3 and type *State*:
in the Title field.
Switch the Value field to formula mode, map the GitHub State Step 1 datapill, and append the .capitalize
formula.
Map the State datapill and append the capitalize formula
Click + Add field.
Go to Field #4 and type *Created at*:
in the Title field.
Switch the Value field to formula mode and perform the following actions:
Map the GitHub Created at Step 1 datapill.
Append the .in_time_zone
formula and specify the timezone. For example, to view times in Pacific Standard Time, type ("America/Los Angeles")
.
Append the .strftime
formula to format the datetime string in your preferred format. You can enter the following: ("%B%e, %Y,%l:%M %p")
Created at value configuration
Click + Add field.
Go to Field #5 and type *Open issues*:
in the Title field.
Map the GitHub Open issues Step 1 datapill to the Value field.
Click + Add field.
Go to Field #6 and type *Closed issues*:
in the Title field.
Map the GitHub Closed issues Step 1 datapill to the Value field.
Click Add block to message.
Expand the third New block field and select Divider from the Type drop-down menu.
Click Save.
Step summary
This step posts a message to your specified Slack channel with details about the new GitHub milestone.
Click + Add step and select ELSE IF condition.
Click Add step > ELSE IF condition
How do ELSE IF conditions work?
If the IF condition is false, the ELSE IF condition is evaluated. You can chain multiple ELSE IF conditions, as demonstrated by this recipe.
Refer to the IF control statement documentation to learn more.
Set up your ELSE IF condition.
Map the GitHub Created at Step 1 datapill to Data field.
Use the Condition drop-down menu to select does not equal.
Map the GitHub Updated at Step 1 datapill to the Value field.
Click + (plus) and select AND to add a second condition.
Map the GitHub Closed at Step 1 datapill to Data field.
Use the Condition drop-down menu to select is not present.
ELSE IF condition configuration
Click Save.
Step summary
This step checks if the milestone has been updated by comparing the Created at and Updated at timestamps. It also ensures the milestone is not closed by verifying that the Closed at field is null.
Click the … (ellipsis) next to Step 3 in the recipe editor and select Copy, or press Command+C after you select the step.
Copy step 3
Hover over Step 5 and click Paste.
Paste the Post message step
Click the … (ellipsis) next to the extra step in the recipe editor and select Delete.
Delete the extra step
Set up your Workbot for Slack Post message action.
Click the pasted Workbot for Slack Post message action.
Go to Message > Section with text > Section text and change *New milestone in GitHub*
to *Updated milestone in GitHub*
.
Updated milestone in GitHub
Go to Attachment fields > Field #4 > Title and change *Created at*:
to *Updated at*:
.
Replace the Created at Step 1 datapill with the Updated at Step 1 datapill in the Value field.
Map the Updated at datapill
Step summary
This step posts a message to your specified Slack channel with details about the updated GitHub milestone.
Click + Add step and select ELSE IF condition.
Click Add step > ELSE IF condition
Set up your second ELSE IF condition.
Map the GitHub Closed at Step 1 datapill to Data field.
Use the Condition drop-down menu to select is present.
ELSE IF condition configuration
Click Save.
Step summary
This step checks if the milestone is closed by checking if the Closed at field contains a value.
Click the …
(ellipsis) next to Step 3 in the recipe editor and select Copy, or press Command+C after you select the step.
Copy step 3
Hover over Step 7 and click Paste.
Paste the Post message step
Click the …
(ellipsis) next to the extra step in the recipe editor and select Delete.
Delete the extra step
Set up your Workbot for Slack Post message action.
Click the pasted Workbot for Slack Post message action.
Go to Message > Section with text > Section text and change *New milestone in GitHub*
to *Closed milestone in GitHub*
.
Closed milestone in GitHub
Go to Attachment fields > Field #4 > Title and change *Created at*:
to *Closed at*:
.
Replace the Created at Step 1 datapill with the Closed at Step 1 datapill in the Value field.
Map the Closed at datapill
Step summary
This step posts a message to your specified Slack channel with details about the closed GitHub milestone.
Your Post GitHub milestones with Workbot for Slack recipe is ready to test and implement.
Example recipe configuration.
Post GitHub milestones with Workbot for Slack recipe
Last updated: 1/17/2025, 6:16:43 PM