fileforge_export_action
Write stored results or SQL query output to CSV, JSON, Markdown, HAR, or ZIP files to hand data to another tool; saves only in FileForge's exports folder.
Instructions
Write stored results or SQL query output to a file in formats such as CSV, JSON, Markdown, HAR or ZIP. Use this to hand data to another tool. Use fileforge_result_action or fileforge_sql_action to read data without creating a file. Writes only to FileForge's exports folder, and a filename you reuse replaces that file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Ref of a stored result. | |
| query | No | SQL SELECT whose rows to export. | |
| action | Yes | What to do. Required parameters are in brackets. result (ref): Export a stored result ref to a file. query (query): Run a SQL query and export results to a file. | |
| format | No | Output format. | csv |
| filename | No | Output filename. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False if the action failed or a check did not pass. | |
| ref | No | Stored result ID, for fileforge_result_action. | |
| data | No | The result. Its shape depends on the action. | |
| meta | No | Tool, action and context. | |
| error | No | Failure code and message. | |
| warnings | No | Notes about a call that still ran. |