Page cover

n8n Integration

This guide explains how to import and use the Blurit anonymization n8n workflow template to automatically blur faces and license plates in your media files.

How to Import and Use

Overview

The n8n-blurit-create-task.json template provides a complete n8n workflow that:

  • Accepts media file uploads through a web form

  • Authenticates with the BlurIt API

  • Creates anonymization tasks with configurable blur settings

  • Monitors task progress

  • Downloads the processed result file

Prerequisites

  • An n8n instance (cloud or self-hosted)

  • A BlurIt account with API credentials

  • Access to the BlurIt Developer section for API keys

Step 1: Import the Template

  1. Download the template file

    • Download or copy the JSON content

  2. Import into n8n

    • Open your n8n instance

    • Click the "+" button to create a new workflow

    • Click on the three dots menu (⋯) in the top right

    • Select "Import from file"

    • Upload the n8n-blurit-create-task.json file

Import the json template in your n8n Project

Once imported, the workflow should present this :

Blurit Create Task Workflow

Step 2: Configure BlurIt Credentials

  1. Get your API credentials

    • Log in to your BlurIt account

    • Navigate to Blurit Developer section

    • Copy your Client ID and Secret ID

    Get your credentials from blurit app manager

  2. Update the workflow configuration

    • In the imported workflow, double-click the "Set Auth Config" node

    • Replace the placeholder values:

      • [REPLACE_BY_YOUR_CLIENT_ID] → Your actual Client ID

      • [REPLACE_BY_YOUR_SECRET_ID] → Your actual Secret ID

    Set your personnal credentials
    • The BASE_URL is pre-configured as https://api.services.wassa.io

Step 3: Configure the Upload Form

The workflow includes a form trigger that generates upload URLs (this is a demo purpose, replace by your own media flow if needed) :

  1. Access form URLs

    • Click link present in Sticky Note or Double-click the "Upload Input File" node

    • Note the webhook ID (used in the URLs)

    • The form will be available at:

      • Test: https://[your-n8n-instance]/webhook-test/[webhook-id]/n8n-form

      • Production: https://[your-n8n-instance]/webhook/[webhook-id]/n8n-form

  2. Form configuration

    • Form title: "Media Upload Form"

    • Description: "Upload an image or video for anonymization"

    • Accepts: Single file upload (images and videos)

    n8n upload file form

Step 4: Customize Blur Settings (Optional)

The default configuration blurs both faces and license plates. To customize:

  1. Edit blur configuration

    • Double-click the "Create Blurit Task" node

    • Modify the body parameters:

      • activation_plates_blur: "true" or "false"

      • activation_faces_blur: "true" or "false"

      • blur_type: JSON configuration for blur settings

  2. Example blur_type configurations

    // Standard blur
    {"anonymization_type": "blur"}
    
    // Pixelation
    {"anonymization_type": "pixelate", "num_pixels": 7}
    
    // Black boxes
    {"anonymization_type": "opaque", "hex_color": "#000000"}

Step 5: Run the Workflow

  1. Execute the workflow

    • Click "⚡️ Execute Workflow" button

    • The workflow will start and wait for file upload

  2. Upload your media file

    • Use one of the form URLs from the sticky note instructions

    • Upload an image or video file

    • Return to the n8n console (refresh if needed)

  3. Monitor progress

    • The workflow will automatically:

      • Authenticate with BlurIt API

      • Create the anonymization task

      • Wait for processing (2-second intervals)

      • Check task status

      • Download the result when completed

Step 6: Get Your Results

  1. Successful completion

    • When the task succeeds, the "Get Result File" node will execute

    • The processed file will be available in the node's output data

    • Click "View" or "Download" in the output section

  2. Handle different outcomes

    • Task Succeeded: Result file is downloaded

    • Task Failed: Check error messages in the workflow execution

    • Pending: Workflow continues to wait and retry

Troubleshooting

Common Issues

  1. Authentication Errors

    • Verify your Client ID and Secret ID are correct

    • Check that credentials are properly configured in "Set Auth Config"

  2. File Upload Issues

    • Ensure the webhook URLs are accessible

    • Check file size limits (varies by n8n instance)

    • Verify supported file formats (images: JPG, PNG; videos: MP4, AVI, etc.)

  3. Task Processing Failures

    • Check the BlurIt API status

    • Verify your account has sufficient credits

    • Review error messages in the workflow execution log

  4. Timeout Issues

    • Large files may take longer to process

    • Consider increasing the wait time in the "Wait" node

    • Check your n8n execution timeout settings

Debug Tips

  1. Check node outputs

    • Click on any node to see its input/output data

    • Use the "View" option to inspect JSON responses

  2. Monitor API responses

    • Check the "Auth Get Token" output for authentication success

    • Review "Create Blurit Task" response for task creation

    • Monitor "Get Task Status" for processing updates

  3. Test with small files first

    • Start with small image files for initial testing

    • Gradually test with larger files and videos

API Endpoints Used

  • Authentication: POST /login

  • Create Task: POST /innovation-service/anonymization

  • Check Status: GET /innovation-service/anonymization?anonymization_job_id={id}

  • Download Result: GET /innovation-service/anonymization/{output_filename}

Security Considerations

  • Store API credentials securely in n8n

  • Use environment variables for sensitive data in production

  • Regularly rotate your API keys

  • Monitor API usage from Blurit dashboard

Support

For additional help:


This template provides a complete automation solution for media anonymization using the Blurit API within n8n workflows.

Last updated