Buildship guide: Create entries in your database using Ai

Sebastian Avelar →

Low-Code/No-Code
Tutor
Web Developer
Bubble
BuildShip
OpenAI
Hey there!
I want to share how we use AI in our application to replace Pokemon by using Buildship!
Workflow Overview
Workflow Overview
I will cover the following topics:
Using OpenAi assitants to replace a Pokemon
You can try it yourself here :) LINK

Setup an AI assistant in Buildship

Buildship is a no-code backend tool that allows us to create open AI assistants. You can duplicate a copy of this workflow with the following link:
Overview of the workflow
Overview of the workflow
You must add your open AI API key for this workflow & your Assistant ID to work. You can do it by clicking the input field.
You can get your API key here: https://platform.openai.com/api-keys
You can get your Assistant ID here: https://platform.openai.com/assistants
You can add your API key as a secret and the assistant ID as an environmental variable.
Adding a secret and environmental variable in Buildship.
Adding a secret and environmental variable in Buildship.
After that, change the Assistant instructions and mention to use your API call. You should also rename your API call to your usecase.
Reference your API call by passing the full nameof it inside your assistant instructions.
Reference your API call by passing the full nameof it inside your assistant instructions.

API Call node used by AI assistant

The URL of this API is an endpoint I have set up on the backend workflows in my Bubble app.
This workflow searches in my database the ID of the replaced Pokemon and then modifies it with the response of the AI assistant
Buildship API Call ode and Bubble Backend Workflow
Buildship API Call ode and Bubble Backend Workflow

Using json_schema for the body of API Call

In the node "API Call - Replace Pokemon", the body value is filled by the Ai assistant indicated by the blue sparks icon.
We want the Assistant to always send the JSON schema we need inside the body, for that we will add a json_schema in our assistant. Mine looks like this:

Triggering Buildship Workflow

The last thing to do is now to make an API call to our Buildship endpoint from our application!
Setting up API call and using it as an action.
Setting up API call and using it as an action.
I hope you found this guide useful and I'm available for work if you need further assistance :)
Partner With Sebastian
View Services

More Projects by Sebastian