Integrations
n8n
Configuration

n8n Configuration

Learn how to configure and use the Canvelete (opens in a new tab) n8n node effectively in your automation workflows.

Node Overview

The Canvelete n8n node provides four main resources, each with specific operations:

  • Design: Create and manage design files
  • Render: Generate images and PDFs
  • Template: Browse and search templates
  • API Key: Manage programmatic access

Basic Configuration

Adding the Node to Workflows

  1. Create or Open Workflow

    • Open n8n workflow editor
    • Click the + button to add a node
  2. Search and Add

    • Type "Canvelete" in the search box
    • Click on the Canvelete node to add it
  3. Connect to Previous Node

    • Drag from the previous node's output to Canvelete input
    • Or use the connection handles

Credential Selection

Every Canvelete node requires authentication:

  1. Select Credential

    • In the node configuration panel
    • Choose your existing Canvelete OAuth2 credential
    • Or click "Create New" to set up authentication
  2. Test Connection

    • Click "Test" to verify the credential works
    • Should show "Connection successful"

Resource Configuration

Design Resource

Create, retrieve, and manage design files.

Create Operation

Creates a new design in your Canvelete account.

Required Parameters:

  • Name: Design name (string)

Optional Parameters:

  • Description: Design description (string)
  • Width: Canvas width in pixels (number, default: 1920)
  • Height: Canvas height in pixels (number, default: 1080)
  • Canvas Data: JSON string with design elements
  • Is Template: Mark as template (boolean, default: false)
  • Visibility: Design visibility (PRIVATE/PUBLIC/UNLISTED)

Example Configuration:

{
  "name": "Social Media Post - {{$json.title}}",
  "description": "Generated from workflow data",
  "width": 1080,
  "height": 1080,
  "canvasData": "{\"elements\":[{\"type\":\"text\",\"content\":\"{{$json.title}}\",\"x\":100,\"y\":100}]}",
  "visibility": "PRIVATE"
}

Get Operation

Retrieves a specific design by ID.

Required Parameters:

  • Design ID: The unique identifier of the design

Example:

{
  "designId": "{{$json.design_id}}"
}

Get Many Operation

Lists multiple designs with optional filtering.

Optional Parameters:

  • Limit: Number of designs to return (default: 50)
  • Return All: Get all designs (ignores limit)

Search Operation

Searches designs by name.

Required Parameters:

  • Query: Search term to match against design names

Render Resource

Generate images and PDFs from designs or templates.

Create Operation

Renders a design or template to various formats.

Required Parameters (one of):

  • Design ID: ID of design to render
  • Template ID: ID of template to render

Optional Parameters:

  • Format: Output format (png/jpg/jpeg/pdf, default: png)
  • Width: Custom width in pixels
  • Height: Custom height in pixels
  • Quality: JPEG quality 1-100 (default: 90)
  • Dynamic Data: JSON string with template variables

Example Configuration:

{
  "templateId": "template_abc123",
  "format": "png",
  "quality": 95,
  "dynamicData": "{\"title\":\"{{$json.product_name}}\",\"price\":\"{{$json.price}}\",\"image_url\":\"{{$json.image}}\"}"
}

Dynamic Data Format:

{
  "title": "Product Launch",
  "subtitle": "Special Offer",
  "price": "$29.99",
  "image_url": "https://example.com/product.jpg",
  "qr_code_data": "https://canvelete.com/product/123"
}

Get Many Operation

Retrieves render history.

Optional Parameters:

  • Limit: Number of renders to return

Template Resource

Browse and search available templates.

Get Many Operation

Lists available templates.

Optional Parameters:

  • Limit: Number of templates to return
  • Category: Filter by template category

Search Operation

Searches templates by name or description.

Required Parameters:

  • Query: Search term

API Key Resource

Manage API keys programmatically.

Create Operation

Generates a new API key.

Required Parameters:

  • Name: API key name

Optional Parameters:

  • Description: Key description
  • Scopes: Comma-separated list of scopes
  • Expires At: Expiration date (ISO format)

Example:

{
  "name": "Workflow API Key - {{$json.workflow_name}}",
  "description": "Generated for automated workflow",
  "scopes": "designs:read,designs:write,render:write",
  "expiresAt": "2024-12-31T23:59:59Z"
}

Get Many Operation

Lists existing API keys.

Optional Parameters:

  • Include Expired: Include expired keys (boolean)

Advanced Configuration

Using Expressions

n8n expressions allow dynamic configuration using data from previous nodes.

Basic Expressions

// Use data from previous node
"{{$json.field_name}}"
 
// Use data from specific node
"{{$node['Node Name'].json.field}}"
 
// Use workflow data
"{{$workflow.name}}"
 
// Current timestamp
"{{$now}}"

Complex Expressions

// Conditional values
"{{$json.is_premium ? 'PREMIUM' : 'BASIC'}}"
 
// String manipulation
"{{$json.title.toUpperCase()}}"
 
// Date formatting
"{{$json.date.toDateTime().toFormat('yyyy-MM-dd')}}"
 
// JSON construction
"{\"title\":\"{{$json.title}}\",\"date\":\"{{$now.toISODate()}}\"}"

Error Handling

Configure how the node handles errors:

  1. Continue on Fail

    • Enable to continue workflow on node errors
    • Useful for optional operations
  2. Retry on Fail

    • Set number of retry attempts
    • Configure retry delay

Example Error Handling:

{
  "continueOnFail": true,
  "retryOnFail": 3,
  "waitBetweenTries": 1000
}

Batch Processing

Process multiple items efficiently:

Split in Batches Node

Input Data (100 items)

Split in Batches (10 items each)

Canvelete - Render: Create

Merge (combine results)

Loop Over Items

// In Canvelete node, use item data
{
  "templateId": "{{$json.template_id}}",
  "dynamicData": "{\"name\":\"{{$json.customer_name}}\",\"order\":\"{{$json.order_id}}\"}"
}

Performance Optimization

Rate Limiting

Canvelete API has rate limits based on your plan:

  • Free: 100 requests/hour
  • Starter: 500 requests/hour
  • Professional: 2,000 requests/hour
  • Team: 5,000 requests/hour
  • Company: 10,000 requests/hour

Optimization Strategies

  1. Use Delays

    Canvelete Node
    
    Wait (1 second)
    
    Next Canvelete Node
  2. Batch Operations

    • Process items in smaller batches
    • Use Split in Batches node
    • Implement proper delays between batches
  3. Cache Results

    • Store frequently used template IDs
    • Cache rendered images when possible
    • Use n8n's Set/Get nodes for temporary storage

Memory Management

For large workflows:

  1. Limit Data Size

    • Use appropriate image dimensions
    • Optimize JPEG quality settings
    • Clean up temporary data
  2. Stream Processing

    • Process items one at a time
    • Don't accumulate large datasets
    • Use pagination for large lists

Common Patterns

Template-Based Generation

Trigger (Webhook/Schedule)

Get Data (Database/API)

Canvelete - Template: Search
  Query: "{{$json.template_type}}"

Canvelete - Render: Create
  Template ID: "{{$json.id}}"
  Dynamic Data: "{{$json.data}}"

Upload/Send Result

Design Backup Workflow

Schedule Trigger (Daily)

Canvelete - Design: Get Many

Loop Over Items

  Canvelete - Render: Create (PNG backup)

  Upload to Cloud Storage

Conditional Processing

Trigger

IF Node (Check condition)
  ├─ TRUE: Canvelete - Premium Template
  └─ FALSE: Canvelete - Basic Template

Merge Results

Debugging and Testing

Testing Individual Nodes

  1. Use Manual Trigger

    • Add Manual Trigger before Canvelete node
    • Set test data in trigger
    • Execute single node
  2. Check Output Data

    • View node execution results
    • Verify data structure
    • Check for errors in output

Common Issues

Authentication Errors

{
  "error": "Authentication failed"
}

Solution: Reconnect OAuth2 credential

Invalid Parameters

{
  "error": "Design ID is required"
}

Solution: Check required parameters are provided

Rate Limit Errors

{
  "error": "Rate limit exceeded"
}

Solution: Add delays or upgrade plan

Logging and Monitoring

  1. Enable Logging

    • Check n8n execution logs
    • Monitor for errors and warnings
    • Track performance metrics
  2. Set Up Alerts

    • Use n8n's error handling
    • Send notifications on failures
    • Monitor workflow success rates

Best Practices

Security

  1. Credential Management

    • Use separate credentials per environment
    • Regularly rotate OAuth2 secrets
    • Monitor credential usage
  2. Data Handling

    • Validate input data
    • Sanitize user inputs
    • Handle sensitive data appropriately

Performance

  1. Efficient Workflows

    • Minimize API calls
    • Use appropriate batch sizes
    • Implement proper error handling
  2. Resource Usage

    • Monitor memory usage
    • Optimize image sizes
    • Clean up temporary data

Maintenance

  1. Regular Updates

    • Keep n8n node updated
    • Monitor for new features
    • Update workflows as needed
  2. Documentation

    • Document workflow purposes
    • Maintain configuration notes
    • Share best practices with team

Next Steps