AutomationFlowsWeb Scraping › Analyze Student Emotion

Analyze Student Emotion

Analyze Student Emotion. Uses httpRequest. Webhook trigger; 4 nodes.

Webhook trigger★★★★☆ complexity4 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Analyze Student Emotion",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "analyze-emotion",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "webhook-node",
      "name": "Webhook"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://ollama:11434/api/generate",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"gemma2:2b\",\n  \"prompt\": \"Eres un psic\u00f3logo educativo experto en an\u00e1lisis emocional de estudiantes.\\n\\nAnaliza la siguiente respuesta de un estudiante peruano y determina su estado emocional.\\n\\nRespuesta del estudiante:\\n={{ $json.body.text }}\\n\\nCalificaci\u00f3n obtenida: ={{ $json.body.grade }}/100\\n\\nResponde SOLAMENTE con este formato:\\nEMOCI\u00d3N: [POSITIVO/NEUTRAL/NEGATIVO]\\nENGAGEMENT: [0.0 a 1.0]\\nRAZ\u00d3N: [breve explicaci\u00f3n en una l\u00ednea]\",\n  \"stream\": false,\n  \"options\": {\n    \"num_predict\": 200,\n    \"temperature\": 0.3\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        208,
        0
      ],
      "id": "http-request-node",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "jsCode": "// Obtener respuesta de Ollama\nconst ollamaResponse = $input.first().json;\nconst content = ollamaResponse.response;\n\n// Parsear emoci\u00f3n\nlet emotion = 'NEUTRAL';\nconst emotionMatch = content.match(/EMOCI\u00d3N:\\s*(POSITIVO|NEUTRAL|NEGATIVO)/i);\nif (emotionMatch) {\n  emotion = emotionMatch[1].toUpperCase();\n}\n\n// Parsear engagement\nlet engagement = 0.5;\nconst engagementMatch = content.match(/ENGAGEMENT:\\s*([\\d.]+)/i);\nif (engagementMatch) {\n  engagement = Number.parseFloat(engagementMatch[1]);\n  // Asegurar que est\u00e1 entre 0 y 1\n  engagement = Math.max(0, Math.min(1, engagement));\n}\n\n// Extraer raz\u00f3n\nlet reason = '';\nconst reasonMatch = content.match(/RAZ\u00d3N:\\s*(.+)/i);\nif (reasonMatch) {\n  reason = reasonMatch[1].trim();\n}\n\n// Retornar respuesta estructurada\nreturn {\n  json: {\n    emotion: emotion,\n    engagement: engagement,\n    reason: reason,\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        416,
        0
      ],
      "id": "code-node",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        624,
        0
      ],
      "id": "respond-node",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Analyze Student Emotion. Uses httpRequest. Webhook trigger; 4 nodes.

Source: https://github.com/CarlitoUwU/backend-EduPlay/blob/fd9441bba24bafab9df34a2371c0baf3b14167fb/n8n-workflows/2-analyze-emotion.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request