Skip to content

Answers use only the pages of this documentation, and every answer links to the pages it came from. Your question is sent to our answering service to be answered, and kept so the people who write these pages can see what readers ask.

ChatGPT Integration

Connect ChatGPT to Your Adalo App Using a Custom Action

Section titled “Connect ChatGPT to Your Adalo App Using a Custom Action”

In the example below, we’ll use a Custom Action to connect your Adalo app to ChatGPT and generate personalized travel plans based on information entered by the user.

Example: Generating a Personalized Travel Plan

Section titled “Example: Generating a Personalized Travel Plan”

Let’s say you want your app to create a customized travel plan when a user provides their destination, dates, interests, budget, and other travel preferences. You can do this by connecting your app to ChatGPT through a Custom Action.

Start by asking Ada to create a Custom Action for your ChatGPT integration. Be specific about what you want the action to do.

For example:

Add a Custom Action that connects to ChatGPT to provide customized travel plans. The app should understand the user’s travel prompt and generate a personalized trip plan based on their destination, dates, preferences, budget, and other details they provide.

Ada will create the initial Custom Action setup for you.

Once Ada creates the Custom Action, open it and review the following sections:

  • Description
  • Endpoint
  • Request Body
  • Variables
  • Headers
  • Secrets

Make sure the endpoint and request method are correct for the API you are connecting to.

Pay close attention to the Request Body created by Ada.

Sometimes the formatting may not be correct, especially when Ada generates a more complex JSON request. If the formatting looks incorrect or different from the format normally used for Custom Actions, update the Request Body manually.

For example, when using an OpenAI Chat Completions request, the body should follow the appropriate JSON structure and include the variables that contain the user’s travel information.

Make sure the variables in the Request Body match the variables created in the Custom Action.

For example:

{
"model": "gpt-4o-mini",
"response_format": {
"type": "json_object"
},
"messages": [
{
"role": "system",
"content": "You are a personalized travel planning assistant. Create a realistic itinerary based on the user's destination, dates, and trip request. Pay attention to their budget, interests, preferences, and special requests. Return only valid JSON."
},
{
"role": "user",
"content": "Destination: {{destination}}\nStart date: {{startDate}}\nEnd date: {{endDate}}\nUser's request: {{interests}}\n\nCreate a personalized travel itinerary based on this information."
}
]
}

These variables allow the user’s actual travel information to be sent to ChatGPT when the Custom Action runs.

Add your OpenAI API key under Secrets.

Create a secret named:

OPENAI_API_KEY

Then add your API key as the secret value.

Use the secret in the Authorization header instead of adding the API key directly to the request.

For example:

Authorization: Bearer {{secret:OPENAI_API_KEY}}

Add sample values to your variables and run the test.

For example:

Destination: Bali
Start date: 2026-10-05
End date: 2026-10-10
Interests: I want a budget trip with beaches, local food, and one adventure activity.

If everything is configured correctly, ChatGPT should return a personalized travel plan based on those values.

Once the Custom Action successfully returns a response, you can use the outputs in your Adalo app to display the generated travel plan and save the information to your database.

This allows each user to enter their own travel preferences and receive a trip plan tailored to their request.

If you’re still having trouble connecting ChatGPT, review the OpenAI API troubleshooting documentation and OpenAI API Quickstart. If the issue persists after reviewing the OpenAI documentation, contact Adalo Support for further assistance.