Block reference / Online services
ChatGPT
Ask an OpenAI model a question built from the run's data and keep the answer in a variable.
In both apps
WarpX Browser
WarpX Phone
Use ChatGPT when a step needs judgement rather than a selector: summarise a page you scraped, pull a price and a title out of messy text, write a different comment for each account, decide whether a message is a complaint. You write a prompt with references in it, and the answer comes back as text or, with Answer in JSON, saved as an object, as an object whose parts later blocks can read. It needs an API key from OpenAI's platform, which is billed separately from a ChatGPT subscription.
Settings
- API key
Your key, from
platform.openai.com/api-keys. Keep it in Databases → Credentials and write{{secrets.openaiKey}}here, as the hint under the field suggests: the workflow file then holds the name, not the key, and the run's log shows••••••wherever the key would appear.Example{{secrets.openaiKey}}- Model
The model to ask. Empty means
gpt-5-mini. The field suggestsgpt-5-mini,gpt-5,gpt-5-nano,gpt-4.1-mini,gpt-4o-mini, but it is free text: any model name the provider offers can be typed in.Examplegpt-5-mini- Instructions (optional)
The system prompt: how the model should behave on every run, separate from the question. Good for the format of the answer, the language, the length. Leave it empty to send the prompt alone.
ExampleYou extract product facts. Answer only with JSON.- Prompt
The question. References such as
{{variables.pageText}}or{{loopData.row.name}}are filled in before it is sent, so one block asks something different for each profile or row. The block fails withThe prompt is emptyif nothing is left after they are filled in.ExampleFrom this product page, give title, price (a number), currency and a one-sentence summary as JSON with those keys. {{variables.pageText}}- Temperature
How varied the answer is, usually from
0(the same answer every time) to1or more (more creative). Empty, shown as Model default, sends nothing and lets the model use its own. Some reasoning models accept only their default.Example- Max tokens (0 for no limit)
The longest answer the model may write, in tokens (roughly three quarters of a word each).
0sends no limit. An answer cut short ends withcut off at the token limitin the log line.Example400- Answer in JSON, saved as an object
Asks the model for JSON and parses the answer, so later blocks read its parts, such as
{{variables.summary.price}}. Say in the prompt which keys you want. If the answer still is not valid JSON, the text is kept as it came.ExampleChecked- Assign to variable
Keeps the answer in a variable. On for a new block.
ExampleChecked- Variable namewhen Assign to variable is ticked
The variable that receives the answer.
aiResponseon a new block.Examplesummary- Insert to table
Also writes the answer into a column of the workflow's table. Offered only when the workflow has table columns. A JSON answer is written as the object.
ExampleUnchecked- Select columnwhen Insert to table is ticked
The column that receives the answer.
Examplesummary
Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.
What it hands on
The answer goes to the variable you named, here {{variables.summary}}, to the table column if you chose one, and on to the next block as {{prevBlockData}}. With Answer in JSON, saved as an object it is an object; otherwise it is text. The log line reads like ChatGPT <model> · 412 tokens, and opening it shows the prompt, the instructions and the answer the run actually used. The block leaves by its single output. When the provider refuses, the block fails with the provider's own reason, such as ChatGPT answered 401: Incorrect API key provided.
Example: Summarise a product page into JSON and keep it in the table
- Start
- Open URL
- Get text
- ChatGPT
- Insert data
- Create an API key at
platform.openai.com/api-keys. In WarpX Browser, open Databases → Credentials and save it asopenaiKey. - Add Open URL with
https://shop.example.com/p/wireless-earbuds-x2, then Get text with the selectormainand Assign to variablepageText. - Add ChatGPT. Set API key to
{{secrets.openaiKey}}and leave Model empty to usegpt-5-mini. - Under Instructions (optional) write
You extract product facts. Answer only with JSON.and under Prompt ask fortitle,price,currencyandsummary, followed by{{variables.pageText}}. - Set Max tokens (0 for no limit) to
400, tick Answer in JSON, saved as an object, and name the variablesummary. - Add Insert data with rows Table |
title|{{variables.summary.title}}and Table |price|{{variables.summary.price}}. - Run it. The log line reads like
ChatGPT gpt-5-mini · 1840 tokens, and the table getsWireless Earbuds X2and49.9.
Good to know
- The request goes from this computer straight to OpenAI, not through the profile's browser or its proxy. The provider sees your own connection, and it bills your key for every run.
- The prompt, the instructions and the answer are kept in the run's log. Values that came from Credentials are shown there as
••••••, but anything else you put in the prompt — scraped text, an email address — is written down as it was sent. - A key typed straight into API key is saved in the workflow and travels with every exported copy of it.
{{secrets.name}}avoids that. - The block waits up to two minutes for an answer. A slow model with a long answer can hit that; ask for less, or set Max tokens (0 for no limit).
- Each run of the block is one new conversation: the model does not remember earlier runs or earlier blocks. Put everything it needs into the prompt.
- With Answer in JSON, saved as an object, OpenAI insists that the word JSON appears in the messages. If neither the prompt nor the instructions mention it, the block adds
Answer in JSON.as an instruction for you. - A page's whole text can be long, and you pay per token. Read only the part you need with Get text —
#product-detailsrather thanbody— or cap it with Slice variable.
See also
- Gemini — Ask a Google Gemini model a question built from the run's data and keep the answer in a variable.
- DeepSeek — Ask a DeepSeek model a question built from the run's data and keep the answer in a variable.
- Grok — Ask an xAI Grok model a question built from the run's data and keep the answer in a variable.
- Get text — Read the text of one element or many, and save it to the table or a variable.