> For the complete documentation index, see [llms.txt](https://doc-api.blurit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc-api.blurit.io/n8n-integration.md).

# n8n Integration

## How to Import and Use <a href="#blurit-n8n-template---how-to-import-and-use" id="blurit-n8n-template---how-to-import-and-use"></a>

### Overview <a href="#overview" id="overview"></a>

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 <a href="#prerequisites" id="prerequisites"></a>

* 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 <a href="#step-1-import-the-template" id="step-1-import-the-template"></a>

{% file src="/files/IeNeNBLXopPgrRbHw8ur" %}

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"&#x20;
   * Upload the `n8n-blurit-create-task.json` file

<div align="left"><figure><img src="/files/yoWWs22dhlb6lsiAsiju" alt="" width="343"><figcaption><p>Import the json template in your n8n Project</p></figcaption></figure></div>

Once imported, the workflow should present this :

<figure><img src="/files/WUIQNezm4Dftj55pOU03" alt=""><figcaption><p>Blurit Create Task Workflow</p></figcaption></figure>

### Step 2: Configure BlurIt Credentials <a href="#step-2-configure-blurit-credentials" id="step-2-configure-blurit-credentials"></a>

1. **Get your API credentials**

   * Log in to your BlurIt account
   * Navigate to [Blurit Developer](https://app.blurit.io/account/developer) section
   * Copy your `Client ID` and `Secret ID`

   <div align="left"><figure><img src="/files/btt6VCPPMYbzQFoaxlGg" alt="" width="563"><figcaption><p>Get your credentials from blurit app manager</p></figcaption></figure></div>

2. **Update the workflow configuration**

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

   <div align="left"><figure><img src="/files/c3X5hQyLr98LBwLWkxu1" alt=""><figcaption></figcaption></figure></div>

   * Replace the placeholder values:
     * `[REPLACE_BY_YOUR_CLIENT_ID]` → Your actual Client ID
     * `[REPLACE_BY_YOUR_SECRET_ID]` → Your actual Secret ID

   <div align="left"><figure><img src="/files/5iaFbVQk5q5tmFA9MPqf" alt="" width="563"><figcaption><p>Set your personnal credentials</p></figcaption></figure></div>

   * The `BASE_URL` is pre-configured as `https://api.services.wassa.io`

### Step 3: Configure the Upload Form <a href="#step-3-configure-the-upload-form" id="step-3-configure-the-upload-form"></a>

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

   <div align="left"><figure><img src="/files/Zri3lY6rYhY3CRFNtpSx" alt=""><figcaption></figcaption></figure></div>

   * 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)

   <div align="left"><figure><img src="/files/ye8Mu6tWRtGz23xLBlLR" alt=""><figcaption><p>n8n upload file form</p></figcaption></figure></div>

### Step 4: Customize Blur Settings (Optional) <a href="#step-4-customize-blur-settings-optional" id="step-4-customize-blur-settings-optional"></a>

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

1. **Edit blur configuration**

   * Double-click the **"Create Blurit Task"** node

   <div align="left"><figure><img src="/files/MJSss0GsEBhH233y8SYf" alt=""><figcaption></figcaption></figure></div>

   * 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**

   ```json
   // 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 <a href="#step-5-run-the-workflow" id="step-5-run-the-workflow"></a>

1. **Execute the workflow**
   * Click **"⚡️ Execute Workflow"** button\
     ![](/files/zbRuhrnnhDcafGAf4Gkn)
   * 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**

   <div align="left"><figure><img src="/files/kapzIFpV0mDPsMsmFzU4" alt=""><figcaption></figcaption></figure></div>

   * 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 <a href="#step-6-get-your-results" id="step-6-get-your-results"></a>

1. **Successful completion**

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

   <div align="left"><figure><img src="/files/LON845R6tGXLmAEBc1Co" alt=""><figcaption></figcaption></figure></div>

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

   <div align="left"><figure><img src="/files/MtYxbwHiifh9UjavRE0e" alt="" width="512"><figcaption></figcaption></figure></div>

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

   <div align="left"><figure><img src="/files/y7mKP3Nel3PudLUIVU4d" alt="" width="554"><figcaption></figcaption></figure></div>

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 <a href="#troubleshooting" id="troubleshooting"></a>

#### Common Issues <a href="#common-issues" id="common-issues"></a>

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 <a href="#debug-tips" id="debug-tips"></a>

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 <a href="#api-endpoints-used" id="api-endpoints-used"></a>

* **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 <a href="#security-considerations" id="security-considerations"></a>

* 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 <a href="#support" id="support"></a>

For additional help:

* Blurit API Documentation: [Developer Portal](https://doc-api.blurit.io/)
* n8n Documentation: [n8n.io/docs](https://docs.n8n.io/)
* Blurit Support: Contact through your Blurit account

***

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