Skip to content

jsoncut/n8n-nodes-jsoncut

Repository files navigation

JsonCut Logo

JsonCut n8n Node

Create, edit, and transform images and videos programmatically in your n8n workflows

npm version License: MIT

This is an n8n community node that lets you use JsonCut in your n8n workflows. JsonCut is a powerful media processing platform that enables you to create, edit, and transform images and videos programmatically through a comprehensive REST API.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Usage
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Manual Installation

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-jsoncut in Enter npm package name
  4. Agree to the risks of using community nodes
  5. Select Install

After installing the node, you can use it like any other node in your workflows.

Credentials

To use this node, you'll need a JsonCut API key. You can get one by:

  1. Signing up for a free account at app.jsoncut.com
  2. Navigate to your API settings
  3. Generate an API key

In n8n:

  1. Create new credentials of type "JsonCut API"
  2. Enter your API key
  3. Test the connection

Operations

The JsonCut node supports three main resources with various operations:

File Operations

  • Upload - Upload a file (image, video, audio, or font) to JsonCut
  • Download - Download a file by its ID
  • List - List your uploaded files with filtering options
  • Get Metadata - Get metadata for a specific file
  • Delete - Delete a file
  • Validate - Validate a file without uploading it

Job Operations

  • Create - Create a new image or video generation job
  • Get Status - Get the current status of a job
  • List - List your jobs with filtering options
  • Cancel - Cancel a pending job
  • Validate - Validate a job configuration without creating it

Combined Operations

  • Create and Wait - Create a job and automatically poll until completion, optionally downloading the output
  • Full Pipeline - Upload input files, validate configuration, create job, wait for completion, and download output - all in one operation

Usage

Simple Example: Create Image Job and Wait

This example creates an image generation job and waits for it to complete:

  1. Add the JsonCut node to your workflow
  2. Select Combined as the resource
  3. Select Create and Wait as the operation
  4. Set Job Type to "Image"
  5. Enter your job configuration in JSON format:
{
  "width": 800,
  "height": 600,
  "format": "png",
  "layers": [
    {
      "type": "rectangle",
      "x": 0,
      "y": 0,
      "width": 800,
      "height": 600,
      "fill": "#3b82f6"
    },
    {
      "type": "text",
      "text": "Hello from n8n!",
      "position": "center",
      "fontSize": 48,
      "color": "#ffffff"
    }
  ]
}
  1. Enable Download Output
  2. The node will create the job, wait for completion, and output the generated image

Advanced Example: Full Pipeline

This example uploads an image, processes it, and downloads the result:

  1. Use a "Read Binary File" node to load an image
  2. Add the JsonCut node
  3. Select Combined as the resource
  4. Select Full Pipeline as the operation
  5. Configure the input files:
    • Add a file item
    • Set Binary Field to "data" (or your binary field name)
    • Set Category to "image"
    • Set TTL Hours to 24
  6. Configure your job:
{
  "width": 1200,
  "height": 630,
  "format": "png",
  "layers": [
    {
      "type": "image",
      "path": "{{$json.uploadedFiles[0].storageUrl}}",
      "position": "center",
      "fit": "cover"
    },
    {
      "type": "text",
      "text": "Social Media Post",
      "position": {
        "x": 0.5,
        "y": 0.1,
        "originX": "center",
        "originY": "top"
      },
      "fontSize": 72,
      "color": "#ffffff"
    }
  ]
}
  1. Enable Download Output
  2. The node will handle the entire pipeline automatically

Video Generation Example

Create a video with text overlay:

{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "format": "mp4",
  "clips": [
    {
      "duration": 5,
      "layers": [
        {
          "type": "fill-color",
          "color": "#1e293b"
        },
        {
          "type": "title",
          "text": "Welcome to JsonCut",
          "position": "center",
          "fontSize": 84,
          "color": "#f1f5f9"
        }
      ],
      "transition": {
        "name": "fade",
        "duration": 1
      }
    },
    {
      "duration": 5,
      "layers": [
        {
          "type": "fill-color",
          "color": "#3b82f6"
        },
        {
          "type": "subtitle",
          "text": "Create videos programmatically",
          "position": "center",
          "fontSize": 48,
          "color": "#ffffff"
        }
      ]
    }
  ]
}

Workflow Examples

Example 1: Automated Social Media Graphics

  1. Trigger: Schedule every day at 9 AM
  2. HTTP Request: Fetch content from your CMS
  3. JsonCut: Create image with dynamic text
  4. Twitter/LinkedIn: Post the generated image

Example 2: Batch Image Processing

  1. Read Binary Files: Load multiple images
  2. Split In Batches: Process 5 images at a time
  3. JsonCut (Full Pipeline): Process each image
  4. Save to Cloud Storage: Upload results to S3/Dropbox

Example 3: Video Generation from Templates

  1. Webhook: Receive video request
  2. Set Variables: Extract parameters
  3. JsonCut: Generate video with custom text/images
  4. Send Email: Notify user when video is ready

Configuration Options

Polling Options (Combined Operations)

  • Polling Interval: How often to check job status (1-60 seconds, default: 5)
  • Max Wait Time: Maximum time to wait for completion (1-120 minutes, default: 30)

File Upload Options

  • Category: Type of file (image, video, audio, font)
  • TTL Hours: How long to keep the file (1-48 hours, default: 1)

Job Options

  • Job Type: Image or Video
  • Configuration: JSON object with job parameters
  • Validate Before Create: Validate configuration before submitting (recommended)

Error Handling

The node provides detailed error messages for common issues:

  • Invalid API Key: Check your credentials
  • Invalid Configuration: Validate your JSON configuration
  • Insufficient Tokens: Check your account balance at app.jsoncut.com
  • Job Failed: Check the error message in the output
  • Timeout: Increase the Max Wait Time for long-running jobs

Resources

Support

For issues with this n8n node:

For JsonCut API support:

Version History

0.1.0

  • Initial release
  • File operations (upload, download, list, delete, validate)
  • Job operations (create, status, list, cancel, validate)
  • Combined operations (create & wait, full pipeline)
  • Automatic polling for job completion
  • Binary file support for uploads and downloads

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ by the JsonCut team

About

this is the official n8n node for jsoncut.com

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •