# Implementation Source: https://docs.automa.app/bot-development/implementation Learn how to implement a bot for Automa You can write a bot in any language. All that's required is an HTTP server that can handle incoming webhook events from Automa. ## Starter kits We provide starter kits to help you get started with building bots quickly: | Language | Template | | ---------- | ---------------------------------------------------------- | | TypeScript | [bot-typescript](https://github.com/automa/bot-typescript) | | Python | [bot-python](https://github.com/automa/bot-python) | These starter kits use our [Bot SDKs](/sdks/bot) and include basic implementations of the webhook and task-handling logic, allowing you to focus on your bot's specific functionality. They also include tests to ensure your bot works correctly with Automa. ## Receiving events Your bot needs to expose an HTTP endpoint (for example, `/webhook`) to receive events from Automa. For security, you should also verify the webhook signature to ensure that the request is coming from Automa. You can read more about the available webhook events and how they are structured in the [Webhooks](/webhooks) reference guide. The starter kits already handle this, and the endpoint they provide is `/automa`. They also require the `AUTOMA_WEBHOOK_SECRET` environment variable to verify the webhook signature. ## Handling tasks When a task is created, your bot will receive a `task.created` event. You can then download the code from Automa and begin making changes. Once you are done, you can submit the changes back to Automa, which will create a pull request in the repository. The starter kits contain the logic to do this using the `code.download` and `code.propose` methods from the [Bot SDKs](/sdks/bot). ### Changing code After downloading the code, you can make changes to it based on the task requirements. The starter kits include an empty `update` function that you can implement to modify the code. This function is called from the webhook handler with the downloaded code's location and the task data. ## Testing The starter kits include a test suite for the webhook handler that you can run to ensure your bot works correctly with Automa. You can also write your own tests to cover specific functionality for the `update` function or other parts of your bot. If you want to test your bot with real tasks, follow these steps: Start the bot locally. This will start the HTTP server that listens for incoming requests. Use a tunneling service like [ngrok](https://ngrok.com/) to expose your local bot to the internet. This will provide you with a public URL that Automa can use to send webhook events. Update the webhook URL for your bot in Automa to point to the public URL provided by the tunneling service. Use either the Automa UI or connected integrations to create a task for the bot. Automa will send webhook events to your bot's endpoint, allowing you to test its functionality. # Overview Source: https://docs.automa.app/bot-development/index Learn how to create and integrate custom bots with Automa Register your bot with Automa by providing a name, description, and webhook URL. This step connects your bot to Automa, making it available for users to install. Implement the core logic of your bot to handle webhook events. This involves receiving tasks from Automa, processing them, and sending back the results. Thoroughly test your bot locally to ensure it functions correctly. For integration testing, expose your local development server to the internet using a tunneling service like [ngrok](https://ngrok.com/). This allows Automa to send webhook events to your bot for real-time testing. Deploy your bot to a cloud platform and update its webhook URL in Automa if needed. # Registration Source: https://docs.automa.app/bot-development/registration Learn how to register a bot in Automa and configure it You can register a new bot in Automa by going to [Settings > Bots > Create Bot](https://console.automa.app/\$/settings/bots/new). Provide a unique name for your bot within your organization and a short description to help users understand its purpose. Choose between [manual](/bots/types#manual) and [scheduled](/bots/types#scheduled) bot types. Manual bots run on demand, while scheduled bots run at specified intervals. Provide the URL where Automa will send webhook events. Click "Create" to complete the registration. Your bot will then be available for installation within your organization. After creation, copy the webhook secret. Your bot will use this secret to verify that incoming events are from Automa.