Action References
DataToFileAction
DataToFileAction
Purpose Converts context data into a downloadable file (CSV, JSON, PDF, etc.). Can either send the file to the client or keep it internal for later use (e.g., archive, mail attachment).
When to use it
- At the end of workflows (
afterBuildOutput) - After rendering templates or generating structured data
Key fields
| Field | Type | Description |
|---|---|---|
inputData | MScript | Data or rendered string to serialize into a file. |
outputFormat | Enum(FileFormats) | Format (json, csv, pdf, etc.). |
sendToClient | Boolean | If true → sends file as download; false → keeps it internal. |
Example
{
"id": "a90-generate-pdf",
"name": "generateInvoicePDF",
"inputData": "this.emailHtml",
"outputFormat": "pdf",
"sendToClient": true
}
Was this page helpful?
Built with Documentation.AI
Last updated Jan 3, 2026