You can create a scene for sending an HTTP request. It works, but how do you know the response and use the reply that only appears in the test frame, but not in the main table or the scenes table? It would be great to have a tag that displays the response and that can be used for other conditional actions (if then).
Hi @bob ![]()
Good news: it’s already possible today, but there’s a non-intuitive step that explains why you can’t find the answer anywhere but in the preview ![]()
1. Click on « Try » a first time
The « Try » button doesn’t just test: it allows Gladys to analyze the JSON returned by the API and remember the list of available fields. Until you’ve clicked on it at least once, no variables are proposed in the following blocks.
2. Use the response in the following actions
Once the test is done, in any action placed after your « Make an HTTP request » block, type {{ in a text field: you’ll see the variables from your request appear, in the form data.my_field (for JSON fields, including nested ones like data.results.temperature) and status (the HTTP code, e.g. 200).
3. To display the response
- The easiest way: a « Send a message » action with the variable inside, you receive the value on Telegram / in the Gladys chat.
- Even better if it’s a numerical value you want to see in your dashboard: a « Control a device » action, choosing the « Calculated » mode instead of « Simple », pointed to a virtual device. There you have the value displayed permanently on your dashboard, with the history and graphs that go with it

4. For the « if… then… »
This is exactly the role of the « Condition on variables » or « Condition « If… Then… Else… » » blocks: you select the variable from your HTTP request, an operator (=, !=, >, >=, <, <=) and a value. For example: if data.temperature > 25 then turn on the fan.
Two limits to know:
- The automatic analysis of fields only works if the API responds in JSON (
Content-Type: application/json). If the API returns raw text or XML, no variables are proposed. - If you modify the URL or the API returns new fields, you need to click on « Try » again to refresh the list.
What’s it for? ![]()
I would add that you need to type the curly braces AND a space (so {{ ) afterwards, otherwise the list of variables will never appear.