Droplist in Form n8n

Describe the problem/error/question

I need to create a form which have a dropdown list. Dropdown list’s value field will be taken from NocoDB data. However, the dropdown list just take one row instead of a list (50+ items).

What is the error message (if any)?

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“authentication”: “nocoDbApiToken”,
“operation”: “getAll”,
“projectId”: “pfsyb9hg3pitv1v”,
“table”: “mx4pm45d8d1c8rp”,
“limit”: 100,
“options”: {}
},
“type”: “n8n-nodes-base.nocoDb”,
“typeVersion”: 3,
“position”: [
-500,
200
],
“id”: “bc133d81-fdb3-45b1-9775-d484c0308d36”,
“name”: “NocoDB1”,
“credentials”: {
“nocoDbApiToken”: {
“id”: “SA8CvjmTLctpXvsn”,
“name”: “NocoDB Token account 2”
}
}
},
{
“parameters”: {
“formTitle”: “test”,
“formDescription”: “fill in all pls”,
“formFields”: {
“values”: [
{
“fieldLabel”: “test”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.formTrigger”,
“typeVersion”: 2.2,
“position”: [
-700,
200
],
“id”: “fedcd5c1-64b7-4064-b72a-84bd2dce3237”,
“name”: “On form submission”,
“webhookId”: “0aa158c1-532a-4c09-ace8-86cbb27b79c2”
},
{
“parameters”: {
“formFields”: {
“values”: [
{
“fieldLabel”: “item id”,
“fieldType”: “dropdown”,
“fieldOptions”: {
“values”: [
{
“option”: “={{ $json[‘Tên SP’]}}”
}
]
}
},
{
“fieldLabel”: “cum chi tiet”,
“fieldType”: “dropdown”,
“fieldOptions”: {
“values”: [
{
“option”: “={{ $json[‘Cụm Chi Tiết’] }}”
}
]
}
},
{
“fieldType”: “hiddenField”,
“fieldName”: “tên sp”,
“fieldValue”: “={{ $json[‘Tên SP’] }}”
},
{
“fieldLabel”: “chi tiet”,
“fieldType”: “dropdown”,
“fieldOptions”: {
“values”: [
{
“option”: “={{ $json[‘Tên Chi Tiết’] }}”
}
]
}
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.form”,
“typeVersion”: 1,
“position”: [
-260,
200
],
“id”: “9209d13b-285a-499a-abc8-aed64d5f91e6”,
“name”: “Form”,
“webhookId”: “30b32bcf-4e8c-4c4d-a664-9183e1c04859”
}
],
“connections”: {
“NocoDB1”: {
“main”: [
[
{
“node”: “Form”,
“type”: “main”,
“index”: 0
}
]
]
},
“On form submission”: {
“main”: [
[
{
“node”: “NocoDB1”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “65060e67f10b7941004a6be86d2b27dec96065c9cda96d52cf840bec529243cb”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi!

I think the best approach here is to split your flow into two workflows:

Workflow 1: fetch options from NocoDB

This workflow queries your NocoDB table.
It extracts and formats the values you need for dropdowns.
Then it returns those values via a Webhook node.

Workflow 2: display form

This is the workflow triggered by the Form Trigger node.

Before showing the form, you call Workflow 1 using an HTTP Request node to get the dropdown values.

Then, you pass the values into a Set node, and use them to populate the dropdowns inside the Form node.

I don’t honestly know if it’s the best solution, tell me if it makes sense.

Let me know

You can do it like the sample below. Add your lookup before the Set node and format the output as per the documentation.

Essentially it is a form node trigger with the next page form node since you cant trigger any data lookup before the trigger, you are forced to use the next page node. On the next page node you simply use the set items with json option and then build your dropdown list. See documentation for more