Skip to content

Audio-Visual Trainer Analysis Workflow

This workflow provides automated analysis of trainer video recordings, evaluating speech patterns, engagement levels, and overall presentation quality. It transcribes video content, analyzes filler words and speaking pace, generates AI-powered performance insights, and delivers comprehensive feedback reports to help trainers improve their delivery skills.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

How It Works

  1. Receives Analysis Request: A webhook receives a video analysis request containing recording metadata and video URL
  2. Extracts Payload Data: Parses the incoming request to extract analysis ID, recording details, and callback information
  3. Prepares Transcription: Configures the video for speech-to-text processing with trainer-specific optimization
  4. Submits to AssemblyAI: Sends the video to AssemblyAI's transcription service for processing
  5. Waits for Processing: Pauses execution to allow transcription to complete
  6. Retrieves Transcript: Fetches the completed transcription with word-level timestamps
  7. Analyzes Speech Patterns: Examines the transcript for filler words, pauses, and speaking pace metrics
  8. Performs AI Analysis: Uses GPT-4 to evaluate trainer performance and generate recommendations
  9. Calculates Engagement: Analyzes the content for interactive elements and audience engagement indicators
  10. Compiles Final Report: Combines all analysis results into a comprehensive performance report
  11. Sends Results: Delivers the complete analysis back to the requesting application
  12. Responds to Webhook: Confirms successful processing to the original requester

Workflow Diagram

graph TD
    A[Webhook Trigger] --> B[Extract Payload]
    B --> C[Prepare for Transcription]
    C --> D[Submit to AssemblyAI]
    D --> E[Wait for Processing]
    E --> F[Get Transcription Result]
    F --> G[Analyze Speech Patterns]
    G --> H[AI Performance Analysis]
    G --> I[Engagement Analysis]
    H --> J[Compile Final Report]
    I --> J
    J --> K[Send Results to App]
    J --> L[Code]
    K --> M[Webhook Response]

    N[Error Handler] --> O[Send Error Callback]

Trigger

Webhook: POST /analyze-trainer-video - Accepts video analysis requests with recording metadata - Expects JSON payload containing analysis ID, recording details, and callback URL - Responds immediately with processing confirmation while analysis runs asynchronously

Nodes Used

Node Type Node Name Purpose
Webhook Webhook Trigger Receives incoming video analysis requests
Code Extract Payload Parses and validates request data
Code Prepare for Transcription Configures video for speech processing
HTTP Request Submit to AssemblyAI Initiates video transcription
Wait Wait for Processing Pauses for transcription completion
HTTP Request Get Transcription Result Retrieves completed transcript
Function Analyze Speech Patterns Analyzes filler words, pauses, and pace
HTTP Request AI Performance Analysis Gets AI-powered performance evaluation
Function Engagement Analysis Calculates audience engagement metrics
Function Compile Final Report Combines all analysis into final report
HTTP Request Send Results to App Delivers results to callback endpoint
Respond to Webhook Webhook Response Confirms processing start to requester
Function Error Handler Handles processing failures
HTTP Request Send Error Callback Notifies application of errors
Code Code Additional processing step

External Services & Credentials Required

AssemblyAI

  • Purpose: Video transcription and speech analysis
  • API Key: Required for transcription services
  • Endpoint: https://api.assemblyai.com/v2/transcript

OpenAI

  • Purpose: AI-powered performance analysis and recommendations
  • Credential Type: openAiApi
  • Model: GPT-4
  • Endpoint: https://api.openai.com/v1/chat/completions

Supabase

  • Purpose: Callback endpoint for delivering results
  • Endpoint: https://ecwihbiaztxsfouvqzam.supabase.co/functions/v1/video-analysis-callback
  • Authorization: Bearer token authentication

Environment Variables

No specific environment variables are configured in this workflow. All API keys and endpoints are managed through n8n's credential system or hardcoded in the nodes.

Data Flow

Input

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "analysisId": "unique-analysis-id",
  "recordingId": "recording-identifier",
  "callbackUrl": "callback-endpoint",
  "timestamp": "analysis-timestamp",
  "recording": {
    "title": "session-title",
    "description": "session-description",
    "file_url": "video-url",
    "duration_seconds": 1800,
    "session_duration_minutes": 30
  }
}

Output

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "analysisId": "unique-analysis-id",
  "recordingId": "recording-identifier",
  "status": "success",
  "filler_words": {
    "total_count": 15,
    "percentage": 3.2,
    "breakdown": {"um": 8, "uh": 7},
    "score": 8,
    "assessment": "good"
  },
  "pauses_analysis": {
    "total_pauses": 12,
    "average_duration": 1.5,
    "assessment": "excellent"
  },
  "pace_analysis": {
    "words_per_minute": 145,
    "rating": "good",
    "assessment": "optimal"
  },
  "engagement_score": {
    "score": 7.2,
    "assessment": "highly_engaging"
  },
  "transcript": "full-session-transcript",
  "recommendations": {
    "priority_actions": ["action-items"],
    "strengths": ["identified-strengths"],
    "improvement_areas": ["areas-to-improve"]
  }
}

Error Handling

The workflow includes comprehensive error handling:

  • Error Handler: Catches processing failures and formats error responses
  • Send Error Callback: Notifies the requesting application when analysis fails
  • Graceful Degradation: Returns structured error responses with helpful messages
  • Retry Logic: Some nodes are configured with retry capabilities
  • Continue on Fail: Error callback node continues even if delivery fails

Error responses maintain the same structure as successful responses but with status: "error" and error details.

Known Limitations

Based on the workflow implementation:

  • Processing Time: Analysis takes 2-5 minutes depending on video length
  • Video Format Support: Limited to formats supported by AssemblyAI
  • Language Support: Optimized for English content with trainer-specific vocabulary
  • File Size Limits: Constrained by AssemblyAI's file size restrictions
  • API Rate Limits: Subject to AssemblyAI and OpenAI rate limiting
  • Single Language: Currently configured for English-only analysis

No related workflows identified in the current context.

Setup Instructions

  1. Import Workflow

    • Import the JSON workflow into your n8n instance
    • Ensure all required nodes are available
  2. Configure Credentials

    • Set up AssemblyAI API credentials with your API key
    • Configure OpenAI API credentials for GPT-4 access
    • Verify Supabase endpoint accessibility
  3. Update Endpoints

    • Modify the Supabase callback URL if using a different instance
    • Update any hardcoded API endpoints as needed
  4. Test Webhook

    • Activate the workflow
    • Note the webhook URL for integration
    • Test with a sample video analysis request
  5. Configure Error Handling

    • Verify error callback endpoints are reachable
    • Test error scenarios to ensure proper notification
  6. Monitor Performance

    • Set up logging for transcription processing times
    • Monitor API usage and rate limits
    • Track analysis accuracy and user feedback

The workflow is designed to handle trainer video analysis at scale while providing detailed feedback for presentation improvement.