NetSuite and MySQL: Invoice Warehouse Sync Template
A scheduled Spojit workflow that pulls new and updated NetSuite invoices every night and upserts them into a MySQL reporting warehouse for fast finance dashboards.
What It Builds
A Schedule trigger fires nightly and a NetSuite Connector node (Direct mode) fetches invoices created or modified since the last run. A Loop node walks each invoice and a MySQL Connector node upserts it into your warehouse table, keyed on the invoice ID so re-syncs update rather than duplicate. The result is a clean SQL table your BI tools and ad-hoc queries can read in milliseconds.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every night at 1am and pulls all NetSuite invoices created or updated in the last 24 hours, then upserts each one into a MySQL table called invoices_warehouse keyed on the invoice id, mapping the invoice number, customer name, amount, currency, status, and dates into columns so finance can run SQL reports against it.
Connectors Used
- Schedule trigger - runs the sync nightly on a cron schedule in your timezone.
- NetSuite - reads invoices filtered by created/modified date.
- MySQL - upserts each invoice row into the reporting warehouse.
Customize It
Change the cron time and lookback window, the target table name, or the column mapping in the prompt. To include credit memos or only paid invoices, name that filter in the prompt so Miraxa adds a Condition node.
Tips
- Use a unique key (invoice ID) so the MySQL step upserts and re-runs stay idempotent.
- Keep the NetSuite node in Direct mode for a fixed, no-AI-cost fetch.
- Widen the lookback window slightly to catch late edits across the schedule boundary.