How to create a Typetalk bot to deploy your application

There’s enough to think about when deploying your application. Why not make the process simple and transparent by deploying through Typetalk?

With this tutorial, we’ll show you how to create a bot you can tell to deploy your application, simultaneously informing your entire team of the update.

How to create a deployment bot for Typetalk

For this tutorial, we will use the following services:

And we will use the below architecture:

deploy bot architecture

 

1. Set your Lambda function

First, create the following two functions on AWS Lambda.

Function #1

Function 1

This function will accept the request from the API Gateway, parse the response body, and then create the deployment on CodeDeploy.

Function #2

Function 2

This function will post a message to Typetalk.

2. Set your API Gateway

Next, create an API Gateway to accept the Webhook from Typetalk.
You will need to create a POST method for our API and connect it to the Lambda function #1.

set your API gateway

After deploying it, check and note the “Invoke URL”. You will use it for the Webhook request.

invoke URL

3. Set your SNS Topic

Next, create an SNS Topic to connect to your CodeDeploy application and the Lambda function #2.

create sns topic

After creating the SNS Topic, connect it to your CodeDeploy application.

create trigger

4. Create your Typetalk bot

Next, create your bot on Typetalk. The deploy bot will post messages and send Webhook requests, so you’ll need to check “API Scope > topic.post” and “Webhook > Use Webhook”.

Also, you need to specify the URL the bot will send Webhooks to. The URL should be the API Gateway endpoint you created in step 2.

create bot

5. Deploy your application

Finally, you’re ready to deploy! Ask your bot to deploy your application by posting a mention to the bot. The bot will reply when complete.

deploy app

After receiving the message from your bot, deployment will begin.

deploy in progress

And it will post a message again when deployment has succeeded.

deploy success

All members of the assigned Typetalk topic can see the status of deployment, keeping your whole team informed.

bot complete

Rather than using your console while having to tell your team that you’re deploying, combine these steps into one simple Typetalk message to your bot. Deploying has never been easier!

Make communication fun, again

Try It Free