MySQL to CSV: On-Demand Query Export via Webhook Template

A Webhook trigger runs a parameterized MySQL query, converts the result set to CSV, and returns the file straight to the caller.

What It Builds

A Webhook trigger receives an HTTP POST carrying query parameters in its JSON body. A Connector node on the mysql connector runs an execute-query against your database, a Connector node on the csv connector turns the rows into CSV with from-json, and a Response node hands the CSV text back to whoever called the webhook. The result is a self-service export endpoint your tools or teammates can hit on demand in Spojit.

The Prompt

Paste this into Miraxa and it builds the workflow, connecting the tools for you:

Build a workflow with a Webhook trigger that reads a status value from the request body, runs a MySQL query that selects orders matching that status, converts the returned rows to CSV, and returns the CSV file to the caller with a Response node.

Connectors Used

  • Webhook trigger - external HTTP POST starts the run; the request body supplies query parameters.
  • mysql - runs your parameterized SELECT with execute-query.
  • csv - converts the JSON result set into CSV with from-json.
  • Response node - returns the CSV text to the synchronous caller.

Customize It

Change the prompt to read a different parameter (a date range, customer id, or region), point the query at another table, or select specific columns so the CSV matches your reporting layout. You can also widen the export to multiple statuses or add an upper row limit by naming it in the prompt.

Tips

  • Keep the MySQL Connector node in Direct mode so the query runs deterministically with no AI cost.
  • Always bind body values into the query as parameters rather than concatenating them into the SQL string.
  • Verify the webhook with a signing connection so only trusted callers can trigger an export.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.