Hi all,
Building a form in Retool that orchestrates multiple inserts to Supabase
(REST API resource using PostgREST).
The save button's event handler runs a Run script. Inside the script,
I'm doing:
await create_merchant.trigger();
await get_all_merchants.trigger();
// then look up merchant by name in get_all_merchants.data
The script DOES execute (validation messages fire, get_all_merchants
returns data).
But create_merchant never actually fires — I've confirmed this in the
browser Network tab: no POST request to /merchants ever appears. The
trigger() is silently skipped.
When I run create_merchant directly with hardcoded body values, it
works perfectly.
Query config:
- Action type: POST
- URL: /merchants
- Headers: Prefer: return=representation, Content-Type: application/json
- Body type: Raw
- Body uses {{ JSON.stringify({ merchant_legal_name: new_merchant_legal_name.value, ... }) }}
- Run mode: Manual
- No "Only run when" condition
All component names are confirmed correct. Component is a TextInput
named exactly new_merchant_legal_name.
What would cause await query.trigger() to silently skip inside a
Run script event handler?