E
Expanso json-to-csv
Verified@aronchick
npx machina-cli add skill @aronchick/expanso-json-to-csv --openclawFiles (1)
SKILL.md
708 B
json-to-csv
"Convert JSON array of objects to CSV format"
Requirements
- Expanso Edge installed (
expanso-edgebinary in PATH) - Install via:
clawhub install expanso-edge
Usage
CLI Pipeline
# Run standalone
echo '<input>' | expanso-edge run pipeline-cli.yaml
MCP Pipeline
# Start as MCP server
expanso-edge run pipeline-mcp.yaml
Deploy to Expanso Cloud
expanso-cli job deploy https://skills.expanso.io/json-to-csv/pipeline-cli.yaml
Files
| File | Purpose |
|---|---|
skill.yaml | Skill metadata (inputs, outputs, credentials) |
pipeline-cli.yaml | Standalone CLI pipeline |
pipeline-mcp.yaml | MCP server pipeline |
Overview
Converts a JSON array of objects into CSV using Expanso Edge pipelines. It supports both standalone CLI workflows and MCP server pipelines, and can be deployed to Expanso Cloud for automated data transformation.
How This Skill Works
Two pipelines drive the conversion: a CLI pipeline (pipeline-cli.yaml) for single-shot transforms and an MCP pipeline (pipeline-mcp.yaml) for server-based processing. You feed a JSON array of objects into the pipeline (via stdin or input files); the pipeline emits CSV on stdout or to the next stage in your Expanso flow.
When to Use It
- You receive a JSON array of records from an API and need a CSV for spreadsheets or BI tools.
- You want a quick local conversion without coding, using the CLI pipeline.
- You operate large-scale data workflows and need MCP to batch process JSON-to-CSV on a server.
- You want to deploy and schedule the transformation in Expanso Cloud as part of a data pipeline.
- You need a consistent, reusable JSON-to-CSV transformation across teams using a pipeline.
Quick Start
- Step 1: Install Expanso Edge and verify it's in PATH (clawhub install expanso-edge).
- Step 2: For CLI pipeline, run: echo '<input>' | expanso-edge run pipeline-cli.yaml.
- Step 3: Pick your workflow: start an MCP server with expanso-edge run pipeline-mcp.yaml or deploy to Expanso Cloud with expanso-cli job deploy https://skills.expanso.io/json-to-csv/pipeline-cli.yaml.
Best Practices
- Ensure the input is a well-formed JSON array of objects with consistent keys.
- Align the CSV field order with downstream consumers to avoid re-mapping.
- Test with a small sample before processing large datasets.
- For very large inputs, consider streaming or chunking to avoid memory spikes.
- Define inputs, outputs, and credentials in skill.yaml to simplify deployment and reuse.
Example Use Cases
- Convert a JSON API response of orders into a CSV for a sales dashboard.
- Transform server logs stored as a JSON array into CSV for analytics.
- Export CRM data from a JSON API into CSV for bulk import into spreadsheets.
- Migrate JSON-based exports to CSV during a data warehouse load.
- Automate JSON-to-CSV conversion in Expanso Cloud as part of a scheduled pipeline.
Frequently Asked Questions
Add this skill to your agents