Gpt Action Box
GPT Action Library: Box
Introduction
This page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information:
This guide provides details on how to connect chatGPT with a Box.com account, the GPT requires two actions to pull data from Box. The GPT will interact with the Box API directly but requires middleware (ie Azure function) to properly format the response from Box to download and read the file contents. The azure function action is transparent to the end user, meaning the user will not need to explicity call the action.
- Action 1 : Box API Action - Leverages the Box API to query data from Box
- Action 2 : Azure function - Formats response from Box enabling chatGPT to download the file directly from Box
Value + Example Business Use Cases
Existing Box customers can leverage these guidelines to query details about files, contents of files and any metadata related. This enables a OpenAI powered analysis of any content stored in Box such as visualizing data sets and creating summaries across multiple folders and files. This GPT can access folders, files and business process data such as metadata in Box. Additionally Box admins can use this GPT action for visibility into audit trails and health checks.
Application Information
Application Key Links
Check out these links from Box and Azure before you get started:
Box Action
- Application Website: https://app.box.com
- Application API Documentation: https://developer.box.com/reference/
Azure Function
- Application Website: https://learn.microsoft.com/en-us/azure/azure-functions/
- Application API Documentation: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference/
Application Prerequisites
Before you get started, make sure you go through the following steps in your Box environment:
- This requires a Box developer account to get started : https://developer.box.com/
- Follow the Box Developer site to create a custom app with OAuth 2.0 authentication type : https://developer.box.com/guides/getting-started/first-application/
- Navigate to Configuration tab for the following values
- OAuth 2.0 Credentials (Client ID / Client Secret) You will need both of these values for the chatGPT configuration
- OAuth 2.0 Redirect URIs : You will fill this value in from chatGPT action configuration below
- Application scopes (Read all files and folders in Box, Manage Enterprise properties)
You will want to keep this window open, the Redirct URIs needs to be filled in from the gpt configuration.

Middleware information : required for Action 2
Make sure you go through the following steps in your Azure environment:
- Azure Portal with access to create Azure Function Apps and Azure Entra App Registrations
- There is a detailed section in this guide related to deploying and designing the function required to wrap the response from Box in order to view the contents of the file. Without the function the GPT will only be able to query data about the file and not the contents. Be sure to read this section after creating the first action.
ChatGPT Steps
Custom GPT Instructions
Once you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
Action 1 : Box API Action
Once you've created a Custom GPT, you will need to create 2 actions. Copy the text below in the 1st Actions panel, this will be for the Box action. Have questions? Check out Getting Started Example to see how this step works in more detail.
Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from Box Developer documentation
Authentication Instructions
Below are instructions on setting up authentication with this 3rd party application. Have questions? Check out Getting Started Example to see how this step works in more detail.
In ChatGPT
In ChatGPT, click on "Authentication" and choose OAuth

OAuth Connection
- Client ID - value from Box custom app you created earlier
- Client Secret - value from Box custom app you created earlier
- Authorization URL - : https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client ID from above]&redirect_uri=[use a placeholder like chat.openai.com/aip//oauth/callback for now, you’ll update this later when you create the Action in ChatGPT]
- Token URL : https:api.box.com/oauth2/token
You need to save the configuration and navigate back to the gpt Configuration tab to copy the Callback URL, edit the configuration for the Box action Authorization URL and format the URL as https://account.box.com/api/oauth2/authorize?response_type=code&client_id=[client_ID]&redirect_uri=[callBack URL]
Post-Action Steps
Update the Box.com custom application
- Copy the CallBack URL from the gpt and add a OAuth 2.0 Redirect URIs in Box.com

Action 2 : Azure Function
Now that we have the GPT created and authenticating against Box.com, we can create the azure function to handle the response formatting enabling the GPT to download the files from Box.
Follow this Azure Cookbook Guide for further details deploying an Azure function. Below you will find sample code to add to the function.
This code is meant to be directional - while it should work out of the box, it is designed to be customized to your need.
Data flow

Now that you have the azure function created, add the sample code below:
function_app.py
jwt_config.json.sample
requirements.txt
Make sure to follow the rest of the Azure guide for post authentication steps and chatGPT configuration : Azure Cookbook Guide
FAQ & Troubleshooting
- Schema calls the wrong project or dataset: If ChatGPT calls the wrong project or dataset, consider updating your instructions to make it more explicit either (a) which project / dataset should be called or (b) to require the user provide those exact details before it runs the query
- Box can return a large set of data in the event stream which can cause errors,
Are there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we’ll take a look.