AI-Powered GPT Connect
5 minutes to readWith the AI-Powered GPT Connect extension, you can create dynamic prompts using fields from your tables, which are sent to an OpenAI Large Language Model for tasks like data analysis, content generation, and more. You can store AI’s responses in designated fields, enabling a wide range of use cases.
Note: The AI model is trained on data available up until a certain date.
Using AI-Powered GPT Connect
Prerequisites: Install the extension.
- On the list of extensions, click Open next to AI-Powered GPT Connect.
- On the Agents screen, click Create agent.
- In the Details step:
- Enter a name for your agent.
- Select a profile for this agent. In the profile settings, you can choose which OpenAI model will be used to process the requests from this agent. Click Next.
- In the Trigger step, select the data source which will be monitored, and the type of event that will trigger the agent. Click Next.
- In the Outgoing data items step:
- Enter your AI prompt. You can insert parameters that the extension should use when processing the prompt.
- Optional: Select a file to be analyzed by AI.
- In the Evaluation right panel, click Evaluate. Once the evaluation result appears below, verify if it matches your expected outcome for this prompt. If not, revise the prompt and evaluate again until you are satisfied with the result.
- Click Next.
- In the Incoming data items step, select the target fields where you want the AI response to be stored. The fields for mapping are based on the evaluation action from the previous step.
If you did not perform the evaluation, a single field to store the response is available for mapping.
Click Next. - Click Create.
Outgoing Data Items
- AI prompt: Create a prompt with table fields for the AI model. Specify response length, value type, or if extra details should be excluded, and adjust for the destination field type (for example, max 255 characters).
- File: Include a File or Attachment data type field in the prompt to be analyzed by AI. The supported formats are: c, cpp, css, csv, doc, docx, gif, go, html, java, jpeg, jpg, js, json, md, pdf, php, pkl, png, pptx, py, rb, tar, tex, ts, txt, webp, xlsx, xml, zip.For png, jpeg, jpg, webp and non-animated gif files, the file size must not exceed 20 MB. For optimal image processing, the recommended resolution is 1024×1024 pixels or less.For other file types, the maximum allowed size is 512 MB.
In the Outgoing data items step, you can evaluate your AI prompt. The evaluation results offer the fields that can potentially be populated when this Agent is executed. Map the fields returned by the evaluation to your table fields in the next step.
If you do not perform the evaluation, in the Incoming Data Items, there will be only one field to map: Response.
Note: Evaluations use the Credits resource in your Caspio account.
Incoming Data Items
Fields available here depend on whether or not you performed the prompt evaluation in the previous step. The final output received from OpenAI depends on the data types of the target fields that you selected.
If you performed the AI prompt evaluation, all the fields that were returned in the evaluation are available for mapping. The table fields that can be selected depend on the data types of the fields returned in the evaluation.
If you did not perform the AI prompt evaluation, a single Response field is available for mapping. It will store the entire AI response.
AI language model selection
In the profile configuration for the AI-Powered GPT Connect extension, you can make one of the following choices:
- Latest GPT model – automatically uses the most advanced GPT model available, ensuring access to the latest capabilities and improvements.
- GPT-4.1 – advanced model for high-accuracy processing, suitable for nuanced tasks involving long text or structured output.
- GPT-4.1 mini – balanced model for moderately complex tasks with faster response and lower consumption.
- GPT-4.1 nano – highly optimized for basic language tasks with minimal cost.
- GPT-4o – for processing complex requests that require high language precision and image interpretation.
- GPT-4o mini – optimized for fast performance and reduced costs on simpler requests.
For detailed information on GPT and OpenAI models, see OpenAI’s Models documentation.
Resource Usage
This extension uses two types of resources:
- Integrations calls: An agent makes 3 integrations calls per task to send, receive, and log, with an additional call for each optional document of File data type (does not apply to Attachment data type).
- Credits: Caspio Credits are used for the cost of the AI service. The consumption depends on the complexity of your prompt, the size and complexity of the attached files, the selected model, and the size of the response.
The following table shows sample scenarios and the potential associated usage of the Credits resource by available language models.
Model | Request with 200 characters (40 words) | Prompt plus a single-page PDF invoice | Prompt plus a PNG image of an invoice (1286×1880 px) | Response of 500 characters (100 words) |
GPT-4.1 | 0.45 | 15.91 | 2.62 | 1.06 |
GPT-4.1 mini | 0.09 | 15.6 | 1.06 | 0.26 |
GPT-4.1 nano | 0.02 | 15.05 | 0.39 | 0.03 |
GPT-4o | 0.5 | 20 | 3.28 | 2.1 |
GPT-4o mini | 0.03 | 16.5 | 5.56 | 0.08 |