MongoDB to CSV: Collection Export to FTP Template
A scheduled workflow that reads a MongoDB collection, converts the documents to CSV, and uploads the export to an FTP server for partners.
What It Builds
This template starts with a Schedule trigger on a cron you choose. A Connector node on MongoDB runs find-documents to read the collection you name, a Connector node on csv turns those documents into a CSV file, and a final Connector node on ftp runs upload-file to drop the export on a partner's FTP server. The result is a fresh CSV delivered on a regular cadence with no manual export.
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, reads all documents from my MongoDB "orders" collection, converts them to a CSV file, and uploads that file to my FTP server in the /exports folder named orders-export.csv.
Connectors Used
- Schedule trigger - fires on a cron and timezone you set, for example
0 6 * * 1-5. - MongoDB -
find-documentsreads the source collection. - csv -
from-jsonconverts the documents into CSV rows. - ftp -
upload-filedelivers the export to the partner server.
Customize It
Change the cron expression for a different cadence, swap the collection name, point the upload at a different FTP path or filename, or add a date stamp to the filename so each run keeps its own file. You can also narrow the MongoDB query to export only recent records instead of the whole collection.
Tips
- Add an MongoDB connection (API key style) and an ftp connection with the partner's host, credentials, and folder before you run.
- Use Direct mode on each Connector node since the steps are predictable single-tool calls with no AI cost.
- For large collections, filter the
find-documentsquery so each export stays a manageable size.
Related
- Want the step-by-step? See How to Export Orders to CSV via FTP.
- How to Export BigCommerce Orders to MongoDB.
- How to Transform CSV Data to JSON for API Uploads.