Automated MediaPipe Blend Shape Labeling with V-Sekai and Replicate - n8n Workflow

Use this robust n8n workflow to automate MediaPipe blend shape labeling from images via the Replicate API. This n8n template features intelligent status polling and error handling.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

3D Content Creators and Animators requiring automated face landmark or blend shape data.
AI/ML Engineers testing custom MediaPipe models hosted on Replicate.
Developers looking for reliable n8n templates for handling long-running AI API tasks.
Automation Specialists needing a reusable n8n node structure for polling external services.

Overview

Generating complex AI outputs, such as MediaPipe blend shape labels for 3D modeling, often involves asynchronous API calls. This means the initial request only returns a prediction ID, requiring continuous monitoring (polling) until the job completes. This specialized n8n workflow solves this complexity entirely.

This robust n8n workflow initiates the prediction using the fire/v-sekai.mediapipe-labeler model and implements a crucial status-checking loop. By leveraging core logic n8n node components, the automation waits for the result, whether success or failure, ensuring that developers using this n8n template can reliably integrate advanced AI labeling without writing complex polling scripts. This complete, production-ready n8n template includes setup for API tokens, parameter configuration, logging, and comprehensive error handling.

How it Works

This automation is initiated by the Manual Trigger n8n node, acting as the starting n8n trigger for execution.


  1. Setup & Configuration: The workflow first sets the necessary Replicate API token and then defines image parameters (like mediapath and maxpeople) using dedicated Set n8n node functions.

  2. Request Initiation: The Create Image Prediction HTTP Request n8n node sends a POST request to Replicate's API, starting the labeling job and receiving a prediction ID.

  3. Logging: A Code n8n node (Log Request) briefly logs the job details for monitoring purposes.

  4. Polling Loop: The workflow enters a polling loop. It first waits 5 seconds (Wait 5s) before the Check Status HTTP Request n8n node uses the prediction ID to fetch the current job status.

  5. Decision Making: The Is Complete? If n8n node checks if the status is 'succeeded'. If true, it moves to Success Response. If false, it checks the Has Failed? If n8n node.

  6. Retry Logic: If the status is neither 'succeeded' nor 'failed' (meaning it's still running), the logic routes through the Wait 10s n8n node and loops back to Check Status, repeating the process.

  7. Finalization: Both the Success Response and Error Response nodes standardize the output, which is finally displayed by the Display Result n8n node, concluding the n8n workflow execution.

Installation Guide

To deploy and run this powerful n8n workflow, follow these steps:


  1. Import the n8n template: Copy the entire JSON code and paste it into your n8n instance using the 'New' menu -> 'Import from JSON'.

  2. Acquire Credentials: You need an API token from Replicate. Sign up or log in at https://replicate.com and retrieve your API token from your account settings.

  3. Configure API Token: Open the Set API Token n8n node and replace the placeholder value 'YOURREPLICATEAPITOKEN' with your actual Replicate API key. This is critical for the Create Image Prediction n8n node to function.

  4. Set Image Input: Adjust the image URL (mediapath) and other input parameters (like maxpeople or exporttrain) within the Set Image Parameters n8n node to fit your specific needs.

  5. Activate and Test: Activate the n8n workflow and click the Manual Trigger to run your first test. Monitor the execution path to confirm the polling loop successfully retrieves the generated data.

Node Details

Manual Trigger (n8n trigger): Initiates the n8n workflow execution manually, allowing for immediate testing and data processing.
Set API Token (n8n node): Securely stores the Replicate API token, which is referenced dynamically by the subsequent HTTP Request n8n nodes for authorization.
Set Image Parameters (n8n node): Configures all input variables required by the AI model, including the image URL (mediapath) and specific model settings like framesample_rate.
Create Image Prediction (HTTP Request n8n node): Sends the initial request to Replicate's API using the POST method, including the model version and input parameters. It uses Bearer authentication, ensuring the n8n workflow is secure.
Wait 5s / Wait 10s (Wait n8n node): Used to pause the n8n workflow execution, crucial for implementing intelligent polling intervals to wait for the asynchronous AI job to complete.
Check Status (HTTP Request n8n node): Polls the Replicate API using a GET request and the prediction ID to determine the current status of the AI generation job.
Is Complete? / Has Failed? (If n8n node): These core logic n8n node elements control the flow, checking the status field returned by Replicate to decide whether to proceed to success, failure handling, or back into the polling loop.
Success Response / Error Response (Set n8n node): Structures the final output data (or error message) into a clean JSON object for external consumption or display.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Featured*