> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Automate function

> Step-by-step guide to creating Speckle Automate functions using the function creation wizard. Learn how to authorize GitHub, choose templates, define function metadata, and set up your development environment for building custom automation workflows.

If you have a verified account on [app.speckle.systems](https://app.speckle.systems), navigate to a Workspaces-hosted project where you are a collaborator. Go to the Automations tab and select View Functions to see your team's existing functions. To create a new function, click New Function in the top right:

<Frame>
  <img src="https://mintcdn.com/speckle/EDPQP7dU1ux-cVtZ/images/developers/automate/new-function-button.png?fit=max&auto=format&n=EDPQP7dU1ux-cVtZ&q=85&s=adbf554d134cdeae052a5cae3de30a66" alt="new function button" width="1420" height="270" data-path="images/developers/automate/new-function-button.png" />
</Frame>

This launches the function creation wizard.

<Steps>
  <Step title="Authorise GitHub">
    Required only the first time.

    <Frame>
      <img src="https://mintcdn.com/speckle/5UIlyL-HMgYLn0Bd/images/developers/automate/authorise-github.png?fit=max&auto=format&n=5UIlyL-HMgYLn0Bd&q=85&s=4235d091d54f0e43661dfa394628bfb9" alt="authorise github" width="1150" height="368" data-path="images/developers/automate/authorise-github.png" />
    </Frame>

    <Tip>
      💡 **Authorized OAuth Apps**

      Speckle Automate will appear under your GitHub account's Authorized OAuth Apps. Access can be revoked at any time, but it is necessary to publish new functions.

      <Frame>
        <img src="https://mintcdn.com/speckle/5UIlyL-HMgYLn0Bd/images/developers/automate/authorised-applications.png?fit=max&auto=format&n=5UIlyL-HMgYLn0Bd&q=85&s=50ed097c1e3dfeb703f1ca2c4e98a57a" alt="authorised applications" width="860" height="302" data-path="images/developers/automate/authorised-applications.png" />
      </Frame>
    </Tip>
  </Step>

  <Step title="Choose a Template">
    We currently offer Python and C# templates, reflecting our best-supported SDKs (**specklepy** and **speckle-sharp**). Each includes the Automate SDK for its respective language.
  </Step>

  <Step title="Define Your Function">
    Some details can be edited later:

    * **Avatar/Logo/Icon** \[optional]: Displayed in the functions list.
    * **Name** \[required]: Does not need to be unique. Use a descriptive name to help identify the function and its purpose, e.g., `SolarFarmLayout by SolarCorp`.
    * **Description** \[required]: A short Markdown-supported description used in the functions list.
    * **Source Application Data Supported** \[optional]: Indicate which source applications your function is designed for.
    * **Tags** \[optional]: You can further categorise your function with single or multi-word tags, e.g., `Solar_Panels`.
    * **Organisation**: Within Github, if your team works within an organisation, you can select that here.
    * **Click Next**: The wizard will create your function project on GitHub.

    <Tip>
      🧙‍♂️ **Wizard Actions**

      The wizard handles scaffolding for you:

      * Clones the template project into your repositories.
              <Frame>
                <img src="https://mintcdn.com/speckle/EDPQP7dU1ux-cVtZ/images/developers/automate/repo-title.png?fit=max&auto=format&n=EDPQP7dU1ux-cVtZ&q=85&s=2ba4f09d2f8055cbef713e251a75e1aa" alt="repo-title" width="1750" height="283" data-path="images/developers/automate/repo-title.png" />
              </Frame>
      * Creates a GitHub action (`.github/workflows/main.yml`) for build and deployment.
              <Frame>
                <img src="https://mintcdn.com/speckle/5UIlyL-HMgYLn0Bd/images/developers/automate/build-and-deploy.png?fit=max&auto=format&n=5UIlyL-HMgYLn0Bd&q=85&s=1064ee4f9bb1462f1ada8c14dd899225" alt="build-and-deploy" width="1510" height="985" data-path="images/developers/automate/build-and-deploy.png" />
              </Frame>
      * Injects API interaction environment variables (`SPECKLE_FUNCTION_ID` and `SPECKLE_FUNCTION_TOKEN`).
              <Frame>
                <img src="https://mintcdn.com/speckle/EDPQP7dU1ux-cVtZ/images/developers/automate/repo-secrets.png?fit=max&auto=format&n=EDPQP7dU1ux-cVtZ&q=85&s=083b63fbd9e5603b34607c20f9aeb6df" alt="repo-secrets" width="770" height="529" data-path="images/developers/automate/repo-secrets.png" />
              </Frame>
    </Tip>
  </Step>

  <Step title="Repository Management">
    The function wizard creates a private GitHub repository under your account.

    * **Public vs Private**: Whether you keep this repository private or make it public depends on your team's open-source or source-available development approach. Speckle Automate supports both public and private repositories.
    * **Personal or Organisational Accounts**: Depending on your setup and collaboration needs, you can publish functions from your GitHub account or an organisation's account. Your published function can also be moved from one to the other.

    <Tip>
      💡 **Important**

      Carefully manage repository access based on your team's workflows and requirements.
    </Tip>
  </Step>

  <Step title="Finalise Your Function">
    Once created, the function template can be edited and tailored to your business logic.

    <Frame>
      <img src="https://mintcdn.com/speckle/EDPQP7dU1ux-cVtZ/images/developers/automate/function-created.png?fit=max&auto=format&n=EDPQP7dU1ux-cVtZ&q=85&s=75f858e6ddb9aa4808591cf33bdddada" alt="function-created" width="2000" height="1402" data-path="images/developers/automate/function-created.png" />
    </Frame>
  </Step>

  <Step title="Next Steps">
    From the success page, you can:

    * **Open the Repository**: View the project on GitHub.
    * **Open in Codespace**: Start coding immediately in a virtual environment. Remember to push changes back to GitHub.
    * **Go to Function**: Navigate to your function's page within Speckle Automate.
  </Step>

  <Step title="Make a Release">
    After making the first release on GitHub, your function will only appear in the Functions Library.
  </Step>
</Steps>

With these steps, your function is ready for further development, automation, and collaboration!
