AutomationFlowsAI & RAG › Capture Q&A Pairs via Form and Enrich with AI

Capture Q&A Pairs via Form and Enrich with AI

Original n8n title: Ingest and Enrich Q&a Pairs Then Store in Data Table [1/2]

ByMax Tkacz @max-n8n on n8n.io

This workflow serves an n8n Form to end user to capture a Question and Answer pair (to be used by an Q&A AI Agent in a separate workflow).

Event trigger★★★★☆ complexityAI-powered9 nodesForm TriggerOpenAI ChatChain LlmData Table
AI & RAG Trigger: Event Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13353 — we link there as the canonical source.

This workflow follows the Chainllm → Form Trigger 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
{
  "id": "U0SJOgXrL6E04BlM",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "QA Ingest [quickstart 2026]",
  "tags": [],
  "nodes": [
    {
      "id": "c4fba515-9db2-495c-838e-25eb58413e94",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "formTitle": "QA Submission",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Name"
            },
            {
              "fieldLabel": "Email"
            },
            {
              "fieldLabel": "Question"
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Answer"
            }
          ]
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "24d9713e-12f0-4870-b150-b5d595efbd17",
      "name": "is n8n.io email?",
      "type": "n8n-nodes-base.if",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2c77555f-438e-4756-8c5a-51b4cec4bd80",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.Email }}",
              "rightValue": "n8n.io"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7653d339-0a23-47b4-8bcb-03cf209b8cb9",
      "name": "isTrusted:true",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        -112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "38f6f1bc-e298-484c-b763-fd43b670b293",
              "name": "isTrusted",
              "type": "boolean",
              "value": true
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "7f97f6eb-4928-4b4b-a27e-e3da7ba9f856",
      "name": "isTrusted:false",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "38f6f1bc-e298-484c-b763-fd43b670b293",
              "name": "isTrusted",
              "type": "boolean",
              "value": false
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "d451864a-2ef6-48cd-b479-414963e5ee3f",
      "name": "ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        720,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1f90264e-a8eb-449c-8b10-40d175d01d73",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        896,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "5d4d0bac-9515-494a-88fa-621225113798",
      "name": "Add tags",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        912,
        -16
      ],
      "parameters": {
        "text": "=Analyze the following question and answer and output relevant tags\n\nQuestion: {{ $json.Question }}\nAnswer: {{ $json.Answer }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a content tagging expert. Your task is to analyze Question and Answer submissions and generate relevant, descriptive tags that categorize the content based on topic, key concepts, and technical terms. Always provide 4-8 tags as a comma separated list. Keep tags short and focused in individual length.\n\nExample Output:\npartner, partnerships, agency, external contractors, lead referral "
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "aa14ad57-c47c-4901-9e1b-33fc1422a110",
      "name": "Insert row",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1232,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('ref').item.json.Name }}",
            "Tags": "={{ $json.text }}",
            "Email": "={{ $('ref').item.json.Email }}",
            "Answer": "={{ $('ref').item.json.Answer }}",
            "Question": "={{ $('ref').item.json.Question }}",
            "isTrusted": "={{ $('ref').item.json.isTrusted }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false
            },
            {
              "id": "Question",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Question",
              "defaultMatch": false
            },
            {
              "id": "Answer",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Answer",
              "defaultMatch": false
            },
            {
              "id": "Tags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Tags",
              "defaultMatch": false
            },
            {
              "id": "isTrusted",
              "type": "boolean",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "isTrusted",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "PM3CHtETy7TT6wnb",
          "cachedResultUrl": "/projects/Z00J79cBs01Yrr1J/datatables/PM3CHtETy7TT6wnb",
          "cachedResultName": "q&a"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "43f1e1bc-723a-4ebf-ac2a-bea8d004ab87",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -480
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 256,
        "content": "## QA Ingest Template\n### Flow 1/2\nThis workflow lets users submit Question and Answer pairs, automatically enriches them by flagging trusted submissions based on email validation and using an LLM to generate relevant tags, then stores everything in an n8n Data Table.\n\nBy [Max Tkacz | The Original Flowgrammer](https://www.linkedin.com/in/maxtkacz/)\n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "0dc57da8-493e-40d1-82f2-f5b80255c5ff",
  "connections": {
    "ref": {
      "main": [
        [
          {
            "node": "Add tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add tags": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        []
      ]
    },
    "isTrusted:true": {
      "main": [
        [
          {
            "node": "ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isTrusted:false": {
      "main": [
        [
          {
            "node": "ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "is n8n.io email?": {
      "main": [
        [
          {
            "node": "isTrusted:true",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "isTrusted:false",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Add tags",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "is n8n.io email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

This workflow serves an n8n Form to end user to capture a Question and Answer pair (to be used by an Q&A AI Agent in a separate workflow).

Source: https://n8n.io/workflows/13353/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Upload a construction photo via web form → get a detailed cost estimate with work breakdown, resource costs, and professional HTML report. Powered by GPT-4 Vision and the open-source DDC CWICR databas

Form Trigger, Chain Llm, OpenAI Chat +2
AI & RAG

Indexation. Uses formTrigger, embeddingsOllama, textSplitterRecursiveCharacterTextSplitter, modelSelector. Event-driven trigger; 36 nodes.

Form Trigger, Ollama Embeddings, Text Splitter Recursive Character Text Splitter +10
AI & RAG

This workflow implements a complete Retrieval-Augmented Generation (RAG) knowledge assistant with built-in document ingestion, conversational AI, and automated analytics using n8n, OpenAI, and Pinecon

Form Trigger, Data Table, Text Splitter Recursive Character Text Splitter +8
AI & RAG

aiNodes. Uses openAi, gmailTool, chainLlm, lmChatOpenAi. Event-driven trigger; 19 nodes.

OpenAI, Gmail Tool, Chain Llm +11
AI & RAG

A lightweight, self-hosted AI assistant built entirely in n8n. Multi-channel messaging (Telegram, WhatsApp, Gmail), persistent memory, task management, and autonomous work — all in a single visual wor

Telegram Trigger, OpenRouter Chat, Data Table +20