Guides
Creating Automations
The easiest way to create an automation is to use the create
command.
This will create a new automation in the .blocks
directory with the following structure:
Below are two example automations you can copy to get started. The first one is a simple hello world, and the second one is a more complex automation that leverages the litellm
library to summarize a pull request in a single sentence.
For the second automation, we’ve added the litellm
library as a dependency to requirements.txt
. To use gpt-4o
, litellm
expects an environment variable called OPENAI_API_KEY
. You would need to get your own OpenAI API key and add it to your Environment Variables.