TG-Bot-Module-Quiz-v4-db-sell-full
Este es unSales, Building Blocks, Marketingflujo de automatización del dominio deautomatización que contiene 36 nodos.Utiliza principalmente nodos como If, Set, Code, Sort, Wait. Automatizar pruebas y recopilación de respuestas en Postgres a través de Telegram (módulo "Encuestas")
- •Información de conexión de la base de datos PostgreSQL
- •Bot Token de Telegram
{
"id": "Tetxh8UaZ85ELSAL",
"meta": {
"instanceId": "888b5b52ac2aa3f8f1bab6800cae8fce6f3d7947e840e64245b5198449908655",
"templateCredsSetupCompleted": true
},
"name": "TG-Bot-Module-Quiz-v4-db-sell-full",
"tags": [
{
"id": "EwFGeL3ePPNgm0R7",
"name": "telegram",
"createdAt": "2025-02-10T18:10:47.435Z",
"updatedAt": "2025-02-10T18:10:47.435Z"
},
{
"id": "XPad0ERjSdqfxG52",
"name": "module",
"createdAt": "2025-03-31T08:11:00.151Z",
"updatedAt": "2025-03-31T08:11:00.151Z"
},
{
"id": "2ocrWSzdKoCOU2AC",
"name": "sell",
"createdAt": "2025-04-19T15:39:51.859Z",
"updatedAt": "2025-04-19T15:39:51.859Z"
}
],
"nodes": [
{
"id": "c6772c56-7373-46f6-b550-106b0912f725",
"name": "For Tests",
"type": "n8n-nodes-base.switch",
"position": [
1560,
-380
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "8bc83292-4eb2-4580-aedb-14ff3f66c40a",
"name": "Test",
"type": "n8n-nodes-base.telegram",
"position": [
2040,
-580
],
"webhookId": "fa9dab38-1032-401d-a22b-81ad71c93b22",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "57fe6fd6-476c-4516-b230-c8e01d0c9ffb",
"name": "Randomize questions",
"type": "n8n-nodes-base.sort",
"position": [
2260,
-580
],
"parameters": {},
"executeOnce": false,
"typeVersion": 1
},
{
"id": "8c36a7a3-c912-4d3f-87a6-6b700795c8ef",
"name": "Esperar",
"type": "n8n-nodes-base.wait",
"position": [
3140,
-580
],
"webhookId": "5c6a2358-d77f-470d-b4e2-201ad524f965",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "69461198-edcf-451c-9847-1f359d109c7a",
"name": "Variables",
"type": "n8n-nodes-base.set",
"position": [
2480,
-780
],
"parameters": {},
"executeOnce": true,
"typeVersion": 3.4
},
{
"id": "0c9b0b8d-70af-4716-b675-9bb3dd426466",
"name": "Fusionar",
"type": "n8n-nodes-base.merge",
"position": [
2700,
-580
],
"parameters": {},
"typeVersion": 3
},
{
"id": "7d5994d0-fb8b-45f3-ae5a-515075b5228d",
"name": "Question",
"type": "n8n-nodes-base.telegram",
"position": [
2920,
-580
],
"webhookId": "1ecc015e-a82d-4f0c-a925-842976a3f4b1",
"parameters": {},
"executeOnce": true,
"retryOnFail": false,
"typeVersion": 1.2
},
{
"id": "f277d6f3-8fa0-4704-b82e-e9508cfe92b0",
"name": "Commands",
"type": "n8n-nodes-base.switch",
"position": [
1180,
20
],
"parameters": {},
"retryOnFail": false,
"typeVersion": 3.2
},
{
"id": "465e22be-5d23-4889-8a5e-aca17c4b9a11",
"name": "Buttons",
"type": "n8n-nodes-base.switch",
"position": [
1180,
-380
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "f972e09f-4a96-45e8-977f-62ac6e479613",
"name": "Interruptor",
"type": "n8n-nodes-base.switch",
"position": [
900,
-180
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "00300fed-0dfc-469f-a58e-6428f7f97141",
"name": "List tests",
"type": "n8n-nodes-base.telegram",
"position": [
2480,
-40
],
"webhookId": "c2c62c30-a0e7-4652-8900-a0649ee01922",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "091321f2-80e4-4fe0-8118-b7b0464989d9",
"name": "Main Menu",
"type": "n8n-nodes-base.telegram",
"position": [
1560,
-780
],
"webhookId": "58039678-a25b-4fef-b163-0d578950a916",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "4b372e39-86dc-494d-9479-1416564e450a",
"name": "Update Bot Status on start",
"type": "n8n-nodes-base.postgres",
"position": [
1820,
-780
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "b760dbfd-6415-4099-baa0-2d65c6107882",
"name": "Disparador de Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
0,
-180
],
"webhookId": "1bced82d-35e8-45ad-a06c-175b68ec6797",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "d517ac45-bfc1-4499-92b0-ebd884ccaf95",
"name": "Initialization",
"type": "n8n-nodes-base.set",
"position": [
460,
-180
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "faa1c338-6312-4bfe-a94e-f19dc021bf79",
"name": "Any questions?",
"type": "n8n-nodes-base.if",
"position": [
2260,
-380
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "881939f8-27e9-4b76-8bf0-bb827b058aa6",
"name": "Delete message",
"type": "n8n-nodes-base.telegram",
"position": [
3360,
-580
],
"webhookId": "7137be3f-013b-4aab-b83e-283890cf5846",
"parameters": {},
"typeVersion": 1.2
},
{
"id": "d1142c38-0438-4b00-ae0f-edfc9d40b339",
"name": "Código",
"type": "n8n-nodes-base.code",
"position": [
2480,
-580
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2
},
{
"id": "b7ef9d15-b4ba-437a-b1ce-c6c91620366b",
"name": "Get Questions AND Answers",
"type": "n8n-nodes-base.postgres",
"position": [
2040,
-780
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "b76407ba-058d-47a2-9e34-4e934baf9a24",
"name": "Update Answer",
"type": "n8n-nodes-base.postgres",
"position": [
1820,
-380
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "de961e0f-cfc8-4d3d-a22c-bd60bbaeea93",
"name": "Get Non-Answered Questions",
"type": "n8n-nodes-base.postgres",
"position": [
2040,
-380
],
"parameters": {},
"typeVersion": 2.5,
"alwaysOutputData": true
},
{
"id": "4b242a0a-96b3-4e68-901f-5a51203a1aab",
"name": "Get Tests",
"type": "n8n-nodes-base.postgres",
"position": [
1820,
-40
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "d4578eb5-351e-42da-b8aa-dd7b31cd273a",
"name": "Union Number with Question",
"type": "n8n-nodes-base.set",
"position": [
2040,
-40
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "c41aad19-b64d-4b65-9897-9db4dbe4d173",
"name": "Union list",
"type": "n8n-nodes-base.summarize",
"position": [
2260,
-40
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "34ce463e-0a46-4c18-ad0c-93eb27451d1a",
"name": "Get Test",
"type": "n8n-nodes-base.postgres",
"position": [
1820,
-580
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "c352c16b-c407-4a66-9157-26b8b7ccf2e2",
"name": "Result Test",
"type": "n8n-nodes-base.telegram",
"position": [
2700,
-380
],
"webhookId": "b0dd03ee-8a93-4a0f-9c87-4f881ebe2195",
"parameters": {},
"executeOnce": true,
"retryOnFail": false,
"typeVersion": 1.2
},
{
"id": "3cd53065-2bb5-42e6-8052-e0d8145a6d33",
"name": "Calculate answers",
"type": "n8n-nodes-base.postgres",
"position": [
2480,
-380
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "fd55a57b-e510-4f5e-9739-a83a7eca457b",
"name": "Upsert pred Answer",
"type": "n8n-nodes-base.postgres",
"position": [
2920,
-780
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "0fcc8a1d-f643-4999-9508-6992149d913b",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
160
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "abdcb075-fe51-4ae0-b7c5-14c42b8db097",
"name": "Variables TG",
"type": "n8n-nodes-base.set",
"position": [
220,
-180
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "d8ed0d39-d250-436f-b5fb-ef727d4e4fb0",
"name": "Is Inicio?",
"type": "n8n-nodes-base.if",
"position": [
680,
-180
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "b9db0964-0e46-4335-859e-5a9d11b2132c",
"name": "Welcome Message",
"type": "n8n-nodes-base.telegram",
"position": [
680,
-380
],
"webhookId": "75295e22-ccce-48b3-b0a8-80690f0a8449",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "f3319cfd-6d30-4efd-b322-1c8eb46302a3",
"name": "Error",
"type": "n8n-nodes-base.telegram",
"position": [
1560,
160
],
"webhookId": "8b2f9495-7524-4579-953e-71f9d0e3ea04",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "5cf3c126-a6a9-4d25-98d2-191af91b12d9",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-440,
-420
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "40325b66-5ac3-4275-b00b-d097834dfe15",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-440,
-180
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f31c4ec7-3651-4c02-8c3c-8dd2f135a291",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-440,
160
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "f377e631-c16e-4bc3-a4f5-4c66d314fe5d",
"connections": {
"Code": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"8bc83292-4eb2-4580-aedb-14ff3f66c40a": {
"main": [
[
{
"node": "b7ef9d15-b4ba-437a-b1ce-c6c91620366b",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "881939f8-27e9-4b76-8bf0-bb827b058aa6",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "fd55a57b-e510-4f5e-9739-a83a7eca457b",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "465e22be-5d23-4889-8a5e-aca17c4b9a11",
"type": "main",
"index": 0
}
],
[
{
"node": "f277d6f3-8fa0-4704-b82e-e9508cfe92b0",
"type": "main",
"index": 0
}
]
]
},
"465e22be-5d23-4889-8a5e-aca17c4b9a11": {
"main": [
[
{
"node": "091321f2-80e4-4fe0-8118-b7b0464989d9",
"type": "main",
"index": 0
}
],
[
{
"node": "c6772c56-7373-46f6-b550-106b0912f725",
"type": "main",
"index": 0
}
]
]
},
"f277d6f3-8fa0-4704-b82e-e9508cfe92b0": {
"main": [
[
{
"node": "4b242a0a-96b3-4e68-901f-5a51203a1aab",
"type": "main",
"index": 0
}
],
[
{
"node": "f3319cfd-6d30-4efd-b322-1c8eb46302a3",
"type": "main",
"index": 0
}
],
[
{
"node": "f3319cfd-6d30-4efd-b322-1c8eb46302a3",
"type": "main",
"index": 0
}
]
]
},
"34ce463e-0a46-4c18-ad0c-93eb27451d1a": {
"main": [
[
{
"node": "8bc83292-4eb2-4580-aedb-14ff3f66c40a",
"type": "main",
"index": 0
}
]
]
},
"7d5994d0-fb8b-45f3-ae5a-515075b5228d": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"c6772c56-7373-46f6-b550-106b0912f725": {
"main": [
[
{
"node": "4b242a0a-96b3-4e68-901f-5a51203a1aab",
"type": "main",
"index": 0
}
],
[
{
"node": "34ce463e-0a46-4c18-ad0c-93eb27451d1a",
"type": "main",
"index": 0
}
],
[
{
"node": "b76407ba-058d-47a2-9e34-4e934baf9a24",
"type": "main",
"index": 0
}
]
]
},
"4b242a0a-96b3-4e68-901f-5a51203a1aab": {
"main": [
[
{
"node": "d4578eb5-351e-42da-b8aa-dd7b31cd273a",
"type": "main",
"index": 0
}
]
]
},
"Is Start?": {
"main": [
[
{
"node": "b9db0964-0e46-4335-859e-5a9d11b2132c",
"type": "main",
"index": 0
}
],
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"091321f2-80e4-4fe0-8118-b7b0464989d9": {
"main": [
[
{
"node": "4b372e39-86dc-494d-9479-1416564e450a",
"type": "main",
"index": 0
}
]
]
},
"69461198-edcf-451c-9847-1f359d109c7a": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"c41aad19-b64d-4b65-9897-9db4dbe4d173": {
"main": [
[
{
"node": "00300fed-0dfc-469f-a58e-6428f7f97141",
"type": "main",
"index": 0
}
]
]
},
"abdcb075-fe51-4ae0-b7c5-14c42b8db097": {
"main": [
[
{
"node": "d517ac45-bfc1-4499-92b0-ebd884ccaf95",
"type": "main",
"index": 0
}
]
]
},
"b76407ba-058d-47a2-9e34-4e934baf9a24": {
"main": [
[
{
"node": "de961e0f-cfc8-4d3d-a22c-bd60bbaeea93",
"type": "main",
"index": 0
}
]
]
},
"faa1c338-6312-4bfe-a94e-f19dc021bf79": {
"main": [
[
{
"node": "57fe6fd6-476c-4516-b230-c8e01d0c9ffb",
"type": "main",
"index": 0
}
],
[
{
"node": "3cd53065-2bb5-42e6-8052-e0d8145a6d33",
"type": "main",
"index": 0
}
]
]
},
"d517ac45-bfc1-4499-92b0-ebd884ccaf95": {
"main": [
[
{
"node": "Is Start?",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "abdcb075-fe51-4ae0-b7c5-14c42b8db097",
"type": "main",
"index": 0
}
]
]
},
"3cd53065-2bb5-42e6-8052-e0d8145a6d33": {
"main": [
[
{
"node": "c352c16b-c407-4a66-9157-26b8b7ccf2e2",
"type": "main",
"index": 0
}
]
]
},
"fd55a57b-e510-4f5e-9739-a83a7eca457b": {
"main": [
[
{
"node": "7d5994d0-fb8b-45f3-ae5a-515075b5228d",
"type": "main",
"index": 0
}
]
]
},
"57fe6fd6-476c-4516-b230-c8e01d0c9ffb": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
},
{
"node": "69461198-edcf-451c-9847-1f359d109c7a",
"type": "main",
"index": 0
}
]
]
},
"b7ef9d15-b4ba-437a-b1ce-c6c91620366b": {
"main": [
[
{
"node": "57fe6fd6-476c-4516-b230-c8e01d0c9ffb",
"type": "main",
"index": 0
}
]
]
},
"de961e0f-cfc8-4d3d-a22c-bd60bbaeea93": {
"main": [
[
{
"node": "faa1c338-6312-4bfe-a94e-f19dc021bf79",
"type": "main",
"index": 0
}
]
]
},
"d4578eb5-351e-42da-b8aa-dd7b31cd273a": {
"main": [
[
{
"node": "c41aad19-b64d-4b65-9897-9db4dbe4d173",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Ventas, Bloques de construcción, Marketing
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Compartir este flujo de trabajo