This blog post describes how you can use the adobe provided resources to set up notification via Email, Slack, etc. when an adobe launch property gets published to production. I am going to provide step by step guide to achieve this.
Currently, Adobe Launch doesn’t notify users/admin group whenever a build goes to production on a launch property. Therefore, it becomes challenging for an admin to know when a build goes to production and who pushed the build to the production. Even though Adobe Launch provides a user interface to view the list of changes that happen on the adobe launch of the organization, it is a bit cumbersome to navigate through it.
Why do you need this type of Notification?
- Create a strong governance process while working with multiple stakeholders
- Improve transparency in the team regarding changes to production
Final Outcome as a Slack Notification
Workflow using Adobe I/O Runtime and Launch
Step-1: Request Adobe Runtime I/O access from the adobe representative or you can click on the “Apply Now” button from here. Also, You should make sure that you have system admin privilege to access the AEP Launch API.
Effort-> This is the simplest step.No coding required
Step-2: Once, you have access to Runtime then follow the steps to set that up and start creating an API to listen to an incoming JSON response.
You can name the API whatever, but here is the sample API URL- <a rel="noreferrer noopener" href="https://runtime.adobe.io/apis/https://runtime.adobe.io/apis/<client-namespace>/launch/build-notification
client-namespace will be the value that you will receive from the adobe during the setup.
Pro Tip: Stay focus and just follow the instruction to set up i/o on your machine. Look at the examples from GitHub to create an API. You are going to write some code!
Step-3: You should be creating a new project on console.adobe.io using AEP Launch API and follow the instruction mention here to set up your Postman with Adobe Launch API.
Pro Tip: This is a straight forward step. You need to follow the instruction from the GitHub. No Coding is required.
Step-4: In this step, we are going to create a callback to listen to an event that is happening on my launch web property. You can follow the instructions mentioned at the Adobe Launch Callback Section.
While creating the back, I am going to use the event – “environment.updated” and my runtime API created in Step-2. Below is the screenshot from the Postman for your reference.
You can grab your launch property id from the Home URL of your launch property. The one with the bold characters is your property id.
https://experience.adobe.com/#/@<Login Company Name>/launch/companies/Some ID/properties/PRc00cec00f1000ce1b0040c310a2340c8/overview
When you will hit the api to create callback then you should be able to see JSON response on your right pane which should indicate that callback is created.
Pro Tip: Following the instruction will make you feel better. You are getting there. No coding is required.
Step-5: Now, The callback is created. Go to your Adobe Launch Property and make a build on your development environment. As soon as you start a build then your runtime will start receiving the response in the JSON format. Your runtime I/O logs will start pilling up with “environment.updated” event when you proceed from dev environment to production environment.
Pro Tip: Look at the console of your runtime set up to see if you have got some JSON response. Add print statements in your code if you have not done so.
Step-6: At this point, majority of our work is done. We have to write some additional code to make sure that we are capturing the JSON response in which environment mentioned is “Production”. We are going to ignore all of those events which are coming to runtime i/o wheneve Dev/Stag environments get update.
Effort-> Coding is required.
Step-7: In this step, You will be creating an incoming message webhook on slack. You can follow the instruction from here to create a webhook.
Once you create the webhook then it would look like-
https://hooks.slack.com/services/<some value>
Pro Tip: Don’t distribute the app. Giving a meaningful name to the Bot and customizing with an icon will look good. No coding is required.
Step-8: Let’s come back to adobe runtime I/O. We have to ensure that the format of payload which is to be sent to Slack should match. Hence, we have to adjust the structure of incoming JSON response which we will be sent to slack.
You can format the payload as per your requirement and can adjust the value coming from the launch event.
Effort-> Coding is required
Once you complete the code then deploy the code on Adobe runtime I/O. Then, go to you to adobe launch property and publish a build to the production. You should be able to see a new notification using your slack Bot.
Great! So now you have set up notification Bot in slack whenever anybody publishes a build to production.
What is next?
- You may want to go back and think about what if I have multiple teams working with Multiple launch properties and you would like to publish the notification in a separate slack channel?
- You may want to use an email client such as Adobe Campaign to send an email to Adobe Launch admin members about the build.
- You may want to use the adobe runtime I/O to execute any Launch API as well such as creating callback.
I have created this service with the help of one of my colleagues. Feel free to drop a comment or feedback about this post.