![]() ![]() If you wish to wish to change the values, please take a look at this snippet from pom.xml which highlights the properties which need to be updated Please note that the app name must be unique across Azure. functionResourceGroup – java-functions-group.It has default values for the above parameters, so you can choose to continue using them if you like. The pom.xml file contains the following attributes used by the Azure Functions Maven plugin – application name ( functionAppName), region ( functionAppRegion) and resource group ( functionResourceGroup). Start by cloning the GitHub repository and change into the application directory git clone Make a note of your app Signing Secret as you’ll be using it later You need to grab your Slack Signing Secret from there Once you’re done creating the Slash Command, head to your app’s settings page, click the Basic Information feature in the navigation menu, choose Install your app to your workspace and click Install App to Workspace – this will install the app to your Slack workspace to test your app and generate the tokens you need to interact with the Slack API.Īs soon as you finish installing the app, the App Credentials will show up on the same page. You can use a dummy URL as a placeholder just for the time being e.g. Please note that the Request URL field is the one where you will enter the HTTP endpoint of function which will be available after you deploy it. You’ll be presented with a button marked Create New Command, and when you click on it, you’ll see a screen where you’ll be asked to define your new Slash Command with the required information.Įnter the required information. Once you’re done creating the app, head to your app’s settings page, and then click the Slash Commands feature in the navigation menu. Please note that the instructions in this section have been adapted from the Slack documentation Create a Slack App Please note down your GIPHY API key as you will be using it later Each application you create will have its own API Key. GIPHY API key – You need to create a GIHPY account (it’s free!) and create an app.Slack Workspace – Please create a Slack workspace if you don’t have one.Azure CLI – Follow the instructions to setup and login to the Azure CLI.If you don’t have Maven, please install v 3.0 or above from here. Maven – The Maven Plugin for Azure Functions is used to build and deploy your Java function.The upcoming sections will guide you through the following:īefore you proceed, ensure that you have the following ready – it shouldn’t take too long It calls the Giphy Random API and returns the result back to the user.įor example, invoking it from your Slack workspace using /funcy serverless will return a random GIF. This, in turn, invokes our webhook deployed to Azure Functions – which is nothing but a bunch of Java code. As a user, you can invoke it from your Slack workspace using /funcy. In order to keep this blog concise, the details of the code have been covered in this blog post – Overviewįuncy is built as a Slash Command within Slack. If you are interested in learning Serverless development with Azure Functions, simply create a free Azure account and get started! I would highly recommend checking out the quickstart guides, tutorials and code samples in the documentation, make use of the guided learning path in case that’s your style or download the Serverless Computing Cookbook. The code is available on GitHub for you to grok. This blog post provides a step-by-step guide to getting the application deployed to Azure Functions and hooking it up with your Slack workspace. funcy tweaks it a bit by simply returning a (single) random image for a search keyword using the Giphy Random API. The (original) Giphy Slack app returns a bunch of GIFs for a search term and the user can pick one of them. In this tutorial, we will explore funcy – a Serverless webhook backend which is a trimmed down version of the awesome Giphy for Slack. FaaS (Functions-as-a-service) offerings make it relatively easy to provide an HTTP endpoint which hosts the Webhook logic which can be as simple as sending an email to something as entertaining as responding with funny GIFs! Webhook backends are a popular use case for Serverless functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |