MongoDB to CSV to FTP: Weekly Collection Export Template
A scheduled Spojit workflow that aggregates a MongoDB collection each week, writes the result to a CSV file, and uploads it to an FTP destination your analysts already use.
What It Builds
A Schedule trigger fires once a week and a Connector node in Direct mode queries your MongoDB collection for the rows you care about. A csv utility node turns those records into a CSV file, and an FTP Connector node uploads it to the destination folder. No one has to run an export by hand again.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every Monday at 6am and queries my MongoDB "orders" collection for documents created in the last 7 days. Convert the matching documents into a CSV file with columns for order id, customer email, total, and created date, then upload that file to my FTP server in the /reports/weekly folder named orders-export-{{ date }}.csv.
Connectors Used
- Schedule trigger - runs the export on a weekly cron with your time zone.
- MongoDB - reads the collection and filters the documents to export.
- csv - builds the CSV file from the query results.
- FTP - uploads the finished file to the destination folder.
Customize It
Change the cron to a daily or monthly cadence, point at a different collection, or adjust the date window from 7 days. Edit the column list to match the fields your analysts expect, and update the /reports/weekly path and filename pattern to suit your FTP layout.
Tips
- Keep the MongoDB Connector node in Direct mode so the query runs with no AI cost and a predictable result.
- Make sure your FTP connection has write access to the target folder before the first scheduled run.
- Use a date token in the filename so each week's export lands as a separate file instead of overwriting the last one.