# Create a Function

# What is a Function?

Functions are the building blocks of Automate. Functions are small pieces of code which perform a specific task. Functions can be made of virtually any language or any existing software, though we only provide templates for a few languages at this time.

# Creating a Function

If you already have a GitHub repository for a Function, and wish to register that with Automate please refer to our instructions for registering an existing Function.

  1. Click the Create Function button adjacent to the Function Library.
  2. Authorize Speckle's GitHub App to access your GitHub account; this allows Speckle to create a new repository for your Function.
  3. Select the template you wish to use for your Function. If you wish to work in a different language, please select any template and you can modify it later.
  4. Give your Function a name and description, select tags, and choose the source of the data it best works with (e.g. Revit, Rhino, etc.).
  5. Create your Function.
  6. You can now open your code in a GitHub CodeSpace, or browse the code repository for your Function. GitHub provides instructions for how to clone your repository to your local workstation if you prefer to work locally.
  7. Functions will not appear in the Function library until there is at least one published version. Please refer to our instructions for releasing a new version of your Function.

If you wish to create a Function which is not based on one of our templates, please refer to the specification to which a Function must comply.