Back to Alchemy
Alchemy RecipeIntermediateautomation

Manufacturing quality inspection report generation from photo documentation

24 March 2026

Introduction

Quality inspection in manufacturing relies on visual documentation. A production line generates hundreds of photos daily, yet manually reviewing each one and generating compliance reports takes hours of labour. Worse, the bottleneck sits between the inspection phase and the report: photos languish in folders whilst someone schedules time to review them and write up findings.

This is where workflow automation becomes practical. By connecting three AI tools—ai-boost for image analysis, hour-one for video report generation, and terrakotta-ai for structured data extraction—you can move from photo to finished report with no manual handoff. A photo uploaded to a folder triggers the entire chain: analysis happens, findings get structured, and a formal report video is generated and stored.

This guide walks through building that workflow using either Zapier or n8n. The example uses automotive parts inspection, but the pattern works for electronics, pharmaceuticals, or any industry where visual evidence must become documented records.

The Automated Workflow

Which Orchestration Tool to Use

For this particular workflow, n8n is the better choice. Here's why: the data transformations between tools are complex enough that Zapier's visual builder becomes unwieldy, yet the workflow doesn't demand the full power of Make's advanced features. n8n sits in the middle, offering good visibility into data flow whilst keeping setup manageable. That said, Zapier works fine if your tolerance for multi-step Zaps is high, and Make works if you're already using it for other automations.

We'll show the n8n approach in detail, with notes on equivalent Zapier steps.

The Overall Flow

Here's what happens when a quality inspector uploads a photo:

  1. A photo appears in a folder (Google Drive or similar).
  2. ai-boost receives the image and returns structured analysis (defects found, severity, location on part).
  3. terrakotta-ai takes the structured data and generates a JSON report object with all findings.
  4. hour-one receives that report and generates a professional video summary.
  5. The video is saved to a shared folder and an email notification is sent.

All of this takes about 3 minutes end-to-end.

Setting Up the Trigger

Start with n8n. Create a new workflow and add a trigger node. We'll use Google Drive as the photo source:


Trigger: Google Drive - File Created
Configuration:
- Folder ID: [your inspection photos folder]
- Recursive: true (to catch photos in subfolders)

Authenticate n8n with your Google Drive account. Once connected, any new file in that folder triggers the workflow.

Step 1: Receive and Validate the Image

The trigger node passes basic metadata (filename, file size, MIME type). Add a node to fetch the actual file content:


Node: Google Drive - Get File
Input:
- File ID: {{$node["Google Drive Trigger"].data.id}}
Output: file content as base64

Add a simple conditional node to check the file is actually an image:


Node: IF - Is Image
Condition: mime_type contains "image/"
True path: continue to ai-boost
False path: send error notification

This prevents the workflow from attempting to analyse documents, videos, or other file types.

Step 2: Analyse with ai-boost

ai-boost's API accepts base64-encoded images and returns structured defect analysis. The endpoint is:


POST https://api.ai-boost.io/v1/analyse/manufacturing

Create an HTTP Request node in n8n:


Node: ai-boost Analysis
Method: POST
URL: https://api.ai-boost.io/v1/analyse/manufacturing
Headers:
- Authorization: Bearer {{$env.AI_BOOST_API_KEY}}
- Content-Type: application/json
Body:
{
  "image_data": "{{$node["Google Drive Get File"].data.base64}}",
  "inspection_type": "automotive_part",
  "include_coordinates": true,
  "confidence_threshold": 0.75
}

Store your API key as an n8n environment variable for security.

The response looks like this:

{
  "analysis_id": "anal_7f2k9m1n",
  "image_url": "https://api.ai-boost.io/images/anal_7f2k9m1n",
  "defects_found": [
    {
      "defect_type": "surface_scratch",
      "severity": "minor",
      "confidence": 0.92,
      "location": {
        "x": 234,
        "y": 567,
        "width": 45,
        "height": 38
      },
      "description": "Shallow scratch on top surface, approximately 2mm length"
    },
    {
      "defect_type": "paint_overspray",
      "severity": "major",
      "confidence": 0.88,
      "location": {
        "x": 102,
        "y": 89,
        "width": 67,
        "height": 52
      },
      "description": "Overspray on adjacent component, approximately 15mm diameter"
    }
  ],
  "overall_quality": "pass_with_rework",
  "timestamp": "2024-01-15T09:34:22Z"
}

This structured data is what powers the next steps. Keep it in memory as a variable.

Step 3: Extract and Structure Data with terrakotta-ai

terrakotta-ai transforms raw analysis into a formal report object. Its strength is converting unstructured findings into compliance-ready documentation. The endpoint is:


POST https://api.terrakotta-ai.io/v1/reports/generate

Create another HTTP Request node:


Node: terrakotta-ai Report Generation
Method: POST
URL: https://api.terrakotta-ai.io/v1/reports/generate
Headers:
- Authorization: Bearer {{$env.TERRAKOTTA_API_KEY}}
- Content-Type: application/json
Body:
{
  "report_type": "quality_inspection_summary",
  "inspection_data": {
    "part_id": "{{$node["Google Drive Trigger"].data.properties.part_id}}",
    "inspection_timestamp": "{{$node["ai-boost Analysis"].data.timestamp}}",
    "defects": "{{$node["ai-boost Analysis"].data.defects_found}}",
    "overall_status": "{{$node["ai-boost Analysis"].data.overall_quality}}"
  },
  "include_recommendations": true,
  "format": "json_structured"
}

Note: part_id assumes you've named files like "part_12345_photo.jpg". If not, add a File Properties node to extract it from metadata or filename parsing.

The terrakotta-ai response includes:

{
  "report_id": "rep_4g5h6j7k",
  "formatted_report": {
    "header": {
      "part_number": "12345",
      "inspection_date": "2024-01-15",
      "inspector_id": "auto_ai_suite"
    },
    "findings": [
      {
        "finding_number": 1,
        "defect_classification": "Surface Defect",
        "severity_level": "Minor",
        "action_required": "Monitor in production",
        "details": "Shallow scratch on top surface, approximately 2mm length"
      },
      {
        "finding_number": 2,
        "defect_classification": "Paint Quality",
        "severity_level": "Major",
        "action_required": "Rework and re-inspect",
        "details": "Overspray on adjacent component, approximately 15mm diameter"
      }
    ],
    "summary": "Part passes inspection with rework required for paint defect before shipment.",
    "compliance_status": "conditional_pass"
  }
}

Store this as a JSON variable for the next step.

Step 4: Generate Video Report with hour-one

hour-one converts the structured report into a professional video. This is the document that gets archived and potentially shared with stakeholders. The API endpoint is:


POST https://api.hour-one.io/v1/videos/create

Create an HTTP Request node:


Node: hour-one Video Generation
Method: POST
URL: https://api.hour-one.io/v1/videos/create
Headers:
- Authorization: Bearer {{$env.HOUR_ONE_API_KEY}}
- Content-Type: application/json
Body:
{
  "video_type": "report_summary",
  "title": "Quality Inspection Report - Part {{$node["Google Drive Trigger"].data.properties.part_id}}",
  "script": "Part number {{$node["terrakotta-ai Report Generation"].data.formatted_report.header.part_number}} inspected on {{$node["terrakotta-ai Report Generation"].data.formatted_report.header.inspection_date}}. {{$node["terrakotta-ai Report Generation"].data.formatted_report.summary}}. Findings: {{$node["terrakotta-ai Report Generation"].data.formatted_report.findings.length}} items identified. Compliance status is {{$node["terrakotta-ai Report Generation"].data.formatted_report.compliance_status}}.",
  "speaker": "professional_male_2",
  "duration_preference": "auto",
  "include_visuals": true,
  "background_type": "corporate_blue"
}

hour-one doesn't immediately return the video file; instead it returns a job ID and a polling URL. Add a Wait node for 2 minutes (hour-one typically processes within 90 seconds), then poll for completion:


Node: Wait
Duration: 120 seconds

Node: hour-one Video Status Check
Method: GET
URL: https://api.hour-one.io/v1/videos/{{$node["hour-one Video Generation"].data.video_id}}/status
Headers:
- Authorization: Bearer {{$env.HOUR_ONE_API_KEY}}

The status response includes:

{
  "video_id": "vid_8k9l0m1n",
  "status": "completed",
  "video_url": "https://videos.hour-one.io/vid_8k9l0m1n.mp4",
  "duration_seconds": 45,
  "created_at": "2024-01-15T09:36:44Z"
}

Once you have the video URL, download it and save it to Google Drive:


Node: Google Drive - Upload File
Input:
- File name: QI_Report_{{$node["Google Drive Trigger"].data.properties.part_id}}_{{$node["hour-one Video Generation"].data.created_at}}.mp4
- File content: {{$node["hour-one Video Status Check"].data.video_url}}
- Parent folder ID: {{$env.REPORTS_FOLDER_ID}}

Use an environment variable for your reports folder ID.

Step 5: Notification and Logging

Add an email notification to alert the quality manager:


Node: Send Email
To: {{$env.QA_MANAGER_EMAIL}}
Subject: Quality Inspection Report Generated - Part {{$node["Google Drive Trigger"].data.properties.part_id}}
Body:
Part {{$node["Google Drive Trigger"].data.properties.part_id}} has been inspected.
Status: {{$node["terrakotta-ai Report Generation"].data.formatted_report.compliance_status}}
Findings: {{$node["terrakotta-ai Report Generation"].data.formatted_report.findings.length}} defects identified.
Video report: {{$node["Google Drive - Upload File"].data.webViewLink}}

Optionally, log the entire workflow output to a Google Sheet for compliance tracking:


Node: Google Sheets - Append Row
Sheet: Quality Inspection Log
Row:
- Part ID: {{$node["Google Drive Trigger"].data.properties.part_id}}
- Inspection Date: {{$node["ai-boost Analysis"].data.timestamp}}
- Status: {{$node["terrakotta-ai Report Generation"].data.formatted_report.compliance_status}}
- Defects: {{$node["terrakotta-ai Report Generation"].data.formatted_report.findings.length}}
- Video URL: {{$node["Google Drive - Upload File"].data.webViewLink}}

This gives you an audit trail without manual data entry.

Error Handling

Add an error catch node at the workflow level to handle API failures gracefully:


Node: Catch Errors
On error from any node:
- Save error details to Google Sheet
- Send alert email to ops team
- Move original photo to a "failed_analysis" folder
- Include workflow execution ID for debugging

This prevents photos from disappearing into a failed queue without visibility.

The Manual Alternative

If you prefer tighter control over each step, you can run the workflow manually in smaller batches. Instead of a folder trigger, use an n8n manual start node. This gives you the chance to review ai-boost's analysis before passing it to terrakotta-ai, and to edit the video script before hour-one generates it.

The tradeoff is obvious: full automation saves hours daily, but manual checkpoints catch edge cases where the AI misread a defect or generated a confusing report. For high-stakes parts or initial rollout, run in semi-automated mode with manual approval gates. Once you're confident in accuracy, flip to full automation.

To add manual approval, insert a Pause node after the ai-boost analysis step:


Node: Pause on Branches
Wait for: Manual input
Display: {{$node["ai-boost Analysis"].data.defects_found}}
Options: "Approve and Continue" or "Edit Findings"

If a user selects "Edit Findings", you can route them to a form where they modify the defect list before continuing.

Pro Tips

Rate Limiting and Batching

ai-boost allows 100 requests per minute on its standard plan. If your production line generates more than 100 photos per minute, add a queue node that buffers requests:


Node: Queue Items
Max concurrent: 2
This prevents API throttling and ensures smooth processing across peak hours.

terrakotta-ai has a 50 concurrent request limit. Use the same queue approach there.

Cost Optimisation

hour-one's video generation costs per minute of final video. A 45-second report costs roughly 1 credit. You're paying even if the report is identical to one generated an hour ago. If you run high volumes of similar parts, implement caching: hash the report content and only call hour-one if that hash is new.


Node: Lookup Record (cache check)
Table: Report Hash Cache
Lookup: {{md5($node["terrakotta-ai Report Generation"].data.formatted_report)}}
If found: use cached video URL
If not found: proceed to hour-one, then cache result

This alone can cut hour-one costs by 30—40 percent in mature deployments.

Handling OCR for Part Numbers

The workflow above assumes part IDs are embedded in filenames. If your inspectors just snap photos without naming them, use ai-boost's text detection feature:


ai-boost Body (modified):
{
  "image_data": "...",
  "inspection_type": "automotive_part",
  "include_coordinates": true,
  "include_text_detection": true
}

The response will include any visible text (like printed part numbers on the component). Extract and use that as the part ID.

Retry Logic for Flaky APIs

hour-one occasionally times out during video rendering. Add exponential backoff:


Node: Try Again
Max attempts: 3
Backoff type: exponential
Wait between retries: 5, 25, 125 seconds

This handles transient failures without requiring manual intervention.

Compliance and Audit Trails

Manufacturing quality inspection is often audited. Log every step with timestamps and API response codes:


Node: Log to Google Sheets (detailed)
Columns:
- Workflow ID: {{$execution.id}}
- Timestamp: {{$now.toISO()}}
- Step: {{$node.name}}
- Status: success/failure
- HTTP Code: {{$node.data.statusCode}}
- Input Hash: {{md5($node.data.input)}}
- Output Hash: {{md5($node.data.output)}}

This gives you proof that the process ran correctly and the reports weren't tampered with.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
ai-boostStarter£150Includes 5,000 analyses/month. £0.05 per additional analysis.
terrakotta-aiProfessional£120Includes 1,000 reports/month. Structured data essential for compliance.
hour-oneGrowth£300Includes 100 minutes of video generation/month. Pay per additional minute.
n8nSelf-hosted£0Open source. Run on your own server or use n8n Cloud at £10/month for convenience.
Google DriveWorkspace Standard£10Per user. Includes 2TB storage. Sufficient for typical photo volumes.
Google SheetsIncluded£0Audit log storage is free with Workspace.
Total£580For 5,000 inspections monthly. Scales linearly with volume.

If you use Zapier instead of n8n, add £50-100/month depending on the number of tasks per workflow. Make sits between n8n and Zapier on pricing, typically £80-150/month for this workload.

For volumes exceeding 10,000 inspections monthly, contact each vendor for custom enterprise pricing; discounts of 20-30 percent are common.