I’m having trouble with
Reading the output of a “Run Velo Code” step in a subsequent “Send HTTP Request” action within the same automation. I’m also unsure whether a “Local Variable” step can be updated programmatically from Velo code, or if the return value of the Velo step is directly accessible in later steps.
Working in
Wix Editor, Automations (new builder)
Site link
dev site, not accessible outside.
What I’m trying to do
I have a scheduled pg_cron job in Supabase that POSTs a JSON payload { "lastSyncedAt": "..." } to a Wix Automation using a Webhook Received trigger. The automation flow I’m building is:
-
Webhook Received — receives
lastSyncedAtfrom Supabase -
Creation of Local variable
-
Run Velo Code — uses
lastSyncedAtto query all paid event orders viawix-events.v2, returns a list of tickets as{ tickets: [...] }.
Not able to Local Variable (or equivalent) — store the tickets array to pass it forward -
Send HTTP Request — POST the tickets data to a Supabase REST endpoint to upsert into a table
The goal is to sync paid Wix event ticket data into a Supabase database on a schedule.
What I’ve tried so far
Returning { tickets } from the Velo code step — I can return value in the editor but I’m not sure how to reference it in the “Send HTTP Request” body field as a dynamic variable
-
Adding a “Local Variable” step before the Velo code step and trying to map
{{Run Velo Code: tickets}}into it — it’s not clear how to assign the value. -
Inside the Velo code to write the data to a Global Storage item, then reference
{{Global Storage: myVar}}in the HTTP request body — this worked partially, but I’m not sure it’s the right approach for array/JSON data
Extra context
The tickets value is a JSON array. The HTTP request needs to send it as the raw body with Content-Type: application/json to Supabase’s REST API (/rest/v1/tickets). The main question is: what is the correct way to pass a JSON value returned from “Run Velo Code” into the body of a “Send HTTP Request” action in the same automation