Integrations /

GPT Action

Teach your OpenAI GPT how to deploy sites to Netlify.

With the Netlify GPT action, you can deploy any generated code or content (HTML, JS, CSS, images, etc) directly to Netlify as a public and immutable site. Simply ask to deploy to Netlify from within your GPT’s conversational interface, and the action will call our API with the appropriate data and credentials automatically.

We’ve implemented the Netlify GPT action in Netlify’s own Website Deployer GPT. Use this GPT to get a feel for how the action behaves.

# Add the Netlify GPT action to your GPT

# 1. Create a Netlify personal access token (PAT)

Log in to Netlify and follow these steps to create a PAT. Name it something memorable so that you can easily identify it later. It’s recommended to use a unique PAT for each GPT that you make. This PAT is only used to authorize your GPT — sites that your users generate won’t be associated with your account.

# 2. Create an action in your GPT

The action provides your GPT instructions on how to interact with the Netlify API.

  1. Open your GPT’s configuration settings by selecting Edit GPT in its contextual menu, or go to GPT Editor to create a new GPT.

  2. Underneath Actions, select Create new action.

  3. Select Authentication. Select API Key as the authentication type, and paste in your Netlify PAT. Be sure to also select Bearer as the auth type and then Save.

    Set a Bearer token in the authorization header

  4. Above the Schema text area, select the Import from URL button. In the resulting text field, paste in the value Then select the Import button to import the OpenAPI schema from the URL.

    Import the OpenAPI schema from a URL

  5. To save your GPT, in the top-right corner of the window, select Save. You may choose to keep it private, make it accessible to those with a link, or to publish it to the GPT Store.

# 3. Test your GPT

Try out deploying to Netlify by prompting your GPT. If you are having trouble deploying files as expected, let us know in the feedback form at the bottom of this page.

# GPT requirements

Please keep in mind that the code that the action passes to Netlify must be distribution files intended for browser interpretation — in other words, your GPT should not deploy files that expect to be compiled. The files deployed are immediately uploaded to Netlify’s CDN. Neither Git nor CI/CD are involved in this method of deployment.

Additionally, if sites deployed from the Netlify GPT action are not claimed by the user, then they will be taken offline and permanently deleted after one hour. This is an anti-spam measure to ensure the quality of content on the Netlify platform. The action will instruct your GPT to inform the user of this requirement, and will provide a link for the user to claim the site as their own to prevent deletion. Users can claim sites whether or not they have an existing Netlify user account but they will need to create a Netlify account to claim a site.