NetSuite to MySQL: SuiteQL Reporting Sync Template
On a schedule, run a SuiteQL query in NetSuite and write the result rows into a MySQL reporting table for fast dashboard access.
What It Builds
This Spojit template uses a Schedule trigger to run on a cron you choose. A Connector node on the netsuite connector calls run-suiteql to pull the rows you care about (open sales orders, daily revenue, item balances, and so on), and a Connector node on the mysql connector writes those rows into a reporting table with execute-query and insert-rows. The outcome is a MySQL table your BI tool or dashboard can read instantly, without hitting NetSuite live every time.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every weekday at 6am Australia/Sydney time, runs a SuiteQL query in NetSuite to get open sales orders (order number, customer name, status, total, and date), and writes those rows into a MySQL table called sales_order_report. Clear the table first, then insert the fresh rows so the report always reflects the latest pull.
Connectors Used
- Schedule trigger - fires on a 5-field cron with an IANA timezone (for example
0 6 * * 1-5inAustralia/Sydney); a single trigger can hold several schedules. - netsuite - the
run-suiteqltool runs your SuiteQL query and returns the result rows. - mysql -
execute-querytruncates or prepares the reporting table, andinsert-rowswrites the fresh rows.
Customize It
Change the cron and timezone for how often the report refreshes, swap the SuiteQL statement for any saved-search-style query you need (invoices, item fulfillment, customer balances), and rename sales_order_report to your target table. If a full clear-and-reload is too heavy, change "clear the table first" to "upsert rows on the order number" so existing rows update in place. You can also point the MySQL connector at a dedicated reporting database so analytics load never touches your operational tables.
Tips
- Use a Direct mode Connector node for both the NetSuite query and the MySQL write: the steps are predictable single-tool calls, so you avoid AI credit cost and keep results deterministic.
- Keep your SuiteQL
SELECTcolumn order aligned with the MySQL table columns so the row mapping intoinsert-rowsstays simple and obvious. - Scaffold the flow with Miraxa, then open each node in the properties panel to confirm the connection, the exact query text, and the table name before you enable the schedule.
Common Pitfalls
- Cron runs in the timezone you set, not your local one: a
0 6 * * 1-5schedule inAustralia/Sydneyfires at Sydney 6am regardless of where you sit, so double-check the IANA zone. - A clear-and-reload table leaves the report empty for a moment mid-run; if a dashboard reads it constantly, prefer the upsert variant so the table is never blank.
- Large SuiteQL result sets can be slow or paged. Filter by date in the query (for example only the last day or week) so each run stays fast and within limits.
Related
- How to Sync Shopify Data to MySQL for Reporting - the step-by-step pattern for writing source data into a MySQL reporting table.
- How to Sync NetSuite Records to MongoDB for Analytics - the same idea, landing NetSuite data in a database for analytics.
- How to Use SQL Queries to Drive Workflow Decisions - more ways to put SQL results to work in a workflow.