AutomationFlowsData & Sheets › Feedback Webhook to Email & Postgres

Feedback Webhook to Email & Postgres

Original n8n title: Enviador De Feedback - Adeptify.es

Enviador de Feedback - Adeptify.es. Uses emailSend, postgres. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexity7 nodesEmail SendPostgres
Data & Sheets Trigger: Webhook Nodes: 7 Complexity: ★★★★☆ Added:

This workflow follows the Emailsend → Postgres recipe pattern — see all workflows that pair these two integrations.

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": "Enviador de Feedback - Adeptify.es",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "send-feedback",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook de Feedback",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Preparar les dades per a l'enviament de feedback\nconst evaluation = $input.first().json;\n\n// Crear plantilla d'email personalitzada\nconst emailTemplate = {\n  to: evaluation.studentEmail,\n  subject: `Avaluaci\u00f3 del teu treball - ${evaluation.subject}`,\n  template: 'feedback-template',\n  data: {\n    studentName: evaluation.studentName,\n    subject: evaluation.subject,\n    submissionDate: evaluation.submissionDate,\n    evaluationDate: evaluation.evaluationDate,\n    aiResponse: evaluation.aiResponse,\n    metadata: evaluation.metadata\n  }\n};\n\nreturn [emailTemplate];"
      },
      "id": "prepare-feedback",
      "name": "Preparar Feedback",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Generar el contingut HTML de l'email de feedback\nconst emailData = $input.first().json;\nconst data = emailData.data;\n\n// Plantilla HTML per a l'email\nconst htmlTemplate = `\n<!DOCTYPE html>\n<html lang=\"ca\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Avaluaci\u00f3 del teu treball</title>\n    <style>\n        body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }\n        .container { max-width: 600px; margin: 0 auto; padding: 20px; }\n        .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; border-radius: 10px 10px 0 0; }\n        .content { background: #f9f9f9; padding: 30px; border-radius: 0 0 10px 10px; }\n        .evaluation { background: white; padding: 20px; margin: 20px 0; border-radius: 8px; border-left: 4px solid #667eea; }\n        .footer { text-align: center; margin-top: 30px; color: #666; font-size: 14px; }\n        .highlight { background: #fff3cd; padding: 15px; border-radius: 5px; margin: 15px 0; }\n        .button { display: inline-block; background: #667eea; color: white; padding: 12px 24px; text-decoration: none; border-radius: 5px; margin: 10px 0; }\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <div class=\"header\">\n            <h1>\ud83d\udcda Avaluaci\u00f3 del teu treball</h1>\n            <p>Adeptify.es - Plataforma Educativa</p>\n        </div>\n        \n        <div class=\"content\">\n            <h2>Hola ${data.studentName},</h2>\n            \n            <p>Hem rebut i avaluat el teu treball per a l'assignatura <strong>${data.subject}</strong>.</p>\n            \n            <div class=\"highlight\">\n                <strong>\ud83d\udcc5 Data de lliurament:</strong> ${new Date(data.submissionDate).toLocaleDateString('ca-ES')}<br>\n                <strong>\ud83d\udcc5 Data d'avaluaci\u00f3:</strong> ${new Date(data.evaluationDate).toLocaleDateString('ca-ES')}\n            </div>\n            \n            <div class=\"evaluation\">\n                <h3>\ud83d\udccb Avaluaci\u00f3 detallada:</h3>\n                <div style=\"white-space: pre-wrap;\">${data.aiResponse}</div>\n            </div>\n            \n            <p>Recorda que aquesta avaluaci\u00f3 t\u00e9 com a objectiu ajudar-te a millorar i aprendre. Si tens alguna pregunta sobre la teva avaluaci\u00f3, no dubtis a contactar amb el teu professor.</p>\n            \n            <p>Continua treballant amb entusiasme! \ud83d\udcaa</p>\n            \n            <p>Salutacions,<br>\n            <strong>Equip d'Adeptify.es</strong></p>\n        </div>\n        \n        <div class=\"footer\">\n            <p>\u00a9 2024 Adeptify.es - Tots els drets reservats</p>\n            <p>Aquest email ha estat generat autom\u00e0ticament pel sistema d'avaluaci\u00f3.</p>\n        </div>\n    </div>\n</body>\n</html>`;\n\n// Crear versi\u00f3 de text pla\nconst textTemplate = `\nAVALUACI\u00d3 DEL TEU TREBALL - Adeptify.es\n=====================================\n\nHola ${data.studentName},\n\nHem rebut i avaluat el teu treball per a l'assignatura: ${data.subject}\n\nData de lliurament: ${new Date(data.submissionDate).toLocaleDateString('ca-ES')}\nData d'avaluaci\u00f3: ${new Date(data.evaluationDate).toLocaleDateString('ca-ES')}\n\nAVALUACI\u00d3 DETALLADA:\n${data.aiResponse}\n\nRecorda que aquesta avaluaci\u00f3 t\u00e9 com a objectiu ajudar-te a millorar i aprendre.\n\nSalutacions,\nEquip d'Adeptify.es\n\n\u00a9 2024 Adeptify.es - Tots els drets reservats`;\n\nreturn [{\n  ...emailData,\n  htmlContent: htmlTemplate,\n  textContent: textTemplate\n}];"
      },
      "id": "generate-email",
      "name": "Generar Email",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "fromEmail": "n8n@adeptify.es",
        "toEmail": "={{ $json.to }}",
        "subject": "={{ $json.subject }}",
        "text": "={{ $json.textContent }}",
        "html": "={{ $json.htmlContent }}",
        "options": {}
      },
      "id": "send-email",
      "name": "Enviar Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        900,
        300
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "insert",
        "resource": "feedback_sent",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "email_id": "={{ $('Preparar Feedback').first().json.data.metadata.emailId }}",
            "student_email": "={{ $('Preparar Feedback').first().json.to }}",
            "subject": "={{ $('Preparar Feedback').first().json.subject }}",
            "sent_date": "={{ new Date().toISOString() }}",
            "status": "sent",
            "metadata": "={{ JSON.stringify($('Preparar Feedback').first().json.data.metadata) }}"
          }
        }
      },
      "id": "log-feedback",
      "name": "Registrar Feedback",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.4,
      "position": [
        1120,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Crear notificaci\u00f3 per al professor\nconst feedbackData = $('Preparar Feedback').first().json;\nconst emailResult = $('Enviar Email').first().json;\n\nconst notification = {\n  type: 'feedback_sent',\n  title: 'Feedback enviat amb \u00e8xit',\n  message: `S'ha enviat el feedback a ${feedbackData.to} per al treball de ${feedbackData.data.subject}`,\n  data: {\n    studentEmail: feedbackData.to,\n    studentName: feedbackData.data.studentName,\n    subject: feedbackData.data.subject,\n    sentAt: new Date().toISOString(),\n    emailId: emailResult.messageId\n  },\n  metadata: {\n    workflow: 'feedback-sender',\n    version: '1.0',\n    timestamp: new Date().toISOString()\n  }\n};\n\nreturn [notification];"
      },
      "id": "create-notification",
      "name": "Crear Notificaci\u00f3",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "operation": "insert",
        "resource": "notifications",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "type": "={{ $json.type }}",
            "title": "={{ $json.title }}",
            "message": "={{ $json.message }}",
            "data": "={{ JSON.stringify($json.data) }}",
            "created_at": "={{ new Date().toISOString() }}",
            "metadata": "={{ JSON.stringify($json.metadata) }}"
          }
        }
      },
      "id": "save-notification",
      "name": "Desar Notificaci\u00f3",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.4,
      "position": [
        1560,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook de Feedback": {
      "main": [
        [
          {
            "node": "Preparar Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preparar Feedback": {
      "main": [
        [
          {
            "node": "Generar Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generar Email": {
      "main": [
        [
          {
            "node": "Enviar Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enviar Email": {
      "main": [
        [
          {
            "node": "Registrar Feedback",
            "type": "main",
            "index": 0
          },
          {
            "node": "Crear Notificaci\u00f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crear Notificaci\u00f3": {
      "main": [
        [
          {
            "node": "Desar Notificaci\u00f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "feedback-sender",
  "tags": [
    {
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z",
      "id": "feedback-sender-tag",
      "name": "Adeptify"
    }
  ]
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Enviador de Feedback - Adeptify.es. Uses emailSend, postgres. Webhook trigger; 7 nodes.

Source: https://github.com/benetandujar72/GEI_adeptify/blob/38f9ae29d3fe17e17f5b43784d53d62d1b5075e2/n8n_bitacola/workflows/feedback-sender.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

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

Data & Sheets

How it works

Postgres, Email Send
Data & Sheets

This workflow automates data maturity evaluation to measure how well an organization uses data to create value by capturing assessment data through forms or APIs, processing and scoring responses usin

Email Send, Postgres
Data & Sheets

This n8n workflow automates the transformation of raw text ideas into structured visual diagrams and content assets using NapkinAI.

HTTP Request, Email Send, Postgres
Data & Sheets

Receive request via webhook with customer question Analyze sentiment and detect urgency using JavaScript Send urgent alerts to Slack for critical cases Search knowledge base and fetch conversation his

HTTP Request, Postgres, Email Send +1
Data & Sheets

PURPOSE: Automatically send professional appointment reminders via email and SMS to reduce no-shows and improve patient experience.

Google Sheets, Airtable, Email Send +2