Files
n8nworkflows.xyz/workflows/Audio-to-Trello Task Bot-5293/audio-to-trello_task_bot.json
T
nusquama 4fb43d526b creation
2025-11-13 14:45:39 +01:00

1 line
7.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"id":"ao9ZV2CMJSI4HjOc","meta":{"instanceId":"7904764d90c74cae7474cd6ee305fceb7aa965b02657b71728e2e1b3d47404b5","templateCredsSetupCompleted":true},"name":"Telegram tasker bot","tags":[],"nodes":[{"id":"6e003a17-2caa-45d3-8ba6-6ff1fdb0c0fe","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[700,160],"webhookId":"f914f76c-c9e5-4ca8-a7ca-2e511e091cbe","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"lY4w1OHVg8w6qZvx","name":"Telegram account"}},"typeVersion":1},{"id":"61bd5cc5-487f-48f2-8b39-2291ae7c5374","name":"Create Trello Card","type":"n8n-nodes-base.trello","maxTries":5,"position":[1980,160],"parameters":{"name":"={{ $json.name }}","listId":"64a39a922fd043526af50b36","description":"={{ $json.description }}","additionalFields":{}},"credentials":{"trelloApi":{"id":"ef5uqwZzflwiFeHR","name":"Trello account"}},"retryOnFail":true,"typeVersion":1},{"id":"48d69373-c391-4be0-adb5-776088e500ba","name":"Groq Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGroq","position":[1320,360],"parameters":{"options":{}},"credentials":{"groqApi":{"id":"OpI4WIyHLWBXJJlE","name":"Groq account"}},"typeVersion":1},{"id":"1696acb6-0917-42d6-81d8-e8666a5973a0","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1380,160],"parameters":{"text":"={{ $json.text }}","options":{"systemMessage":"=Сегодняшняя дата: {{$today}} (формат YYYY-MM-DD)\n\nТы — ассистент-парсер. Получаешь произвольный текст задачи и возвращаешь\nОДНУ строку JSON ровно в таком виде:\n{\"name\":\"…\",\"description\":\"…\",\"date_start\":\"…\",\"date_end\":\"…\"}\n\nПравила\n1. name — до 8-10 слов. Если текста мало, пиши \"Общая задача\".\n2. description — исходный текст целиком.\n3. Даты:\n ▸ Любые даты выводи числом в формате YYYY-MM-DD. \n ▸ Относительные выражения считай так:\n «сегодня» → {{$today}}\n «завтра» → {{$today+1}}\n «послезавтра» → {{$today+2}}\n «через N дней» → {{$today+N}}\n ▸ Если указан диапазон («с 1 по 5 июля») — date_start = первая дата,\n date_end = последняя. \n ▸ Одна дата? Запиши её в date_start, а date_end оставь \"\".\n ▸ Нет дат — обе строки пустые.\n4. Никакого текста вне JSON, никаких переводов строк или экранирования.\n\nПримеры \nВход: «Сделать завтра ремонт на кухне» \nВыход: {\"name\":\"Ремонт на кухне\",\"description\":\"Сделать завтра ремонт на кухне\",\"date_start\":\"{{$today+1}}\",\"date_end\":\"\"}\n\nВход: «Отчёт с 1 по 5 июля» \nВыход: {\"name\":\"Отчёт за 1-5 июля\",\"description\":\"Отчёт с 1 по 5 июля\",\"date_start\":\"2025-07-01\",\"date_end\":\"2025-07-05\"}\n"},"promptType":"define"},"typeVersion":2},{"id":"04dcbefa-57ac-4ad5-a826-db5092dbc227","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[1480,360],"parameters":{"sessionKey":"={{ $('Telegram Trigger').item.json.message.from.username }}","sessionIdType":"customKey"},"typeVersion":1.3},{"id":"85f2cf10-c37e-409f-acbc-86a3e0c6eadc","name":"Stop and Error","type":"n8n-nodes-base.stopAndError","position":[2640,320],"parameters":{"errorMessage":"Task creation failed"},"typeVersion":1},{"id":"0e58a91d-779b-46a4-ae16-fc106c882c41","name":"Send task message","type":"n8n-nodes-base.telegram","position":[2420,140],"webhookId":"8957795d-bec0-4cb6-be9a-4b77ef56ac07","parameters":{"text":"=Создана задача: {{ $json.name }}\nСсылка на задачу: {{ $('Create Trello Card').item.json.url }}","chatId":"={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields":{"appendAttribution":false,"reply_to_message_id":"={{ $('Telegram Trigger').item.json.message.message_id }}","disable_notification":false}},"credentials":{"telegramApi":{"id":"lY4w1OHVg8w6qZvx","name":"Telegram account"}},"typeVersion":1.2},{"id":"3eecd42f-23e3-466e-9e1a-e34f5f48fd99","name":"Send error message","type":"n8n-nodes-base.telegram","position":[2420,320],"webhookId":"8957795d-bec0-4cb6-be9a-4b77ef56ac07","parameters":{"text":"=Ошибка при создании задачи","chatId":"={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields":{"appendAttribution":false,"reply_to_message_id":"={{ $('Telegram Trigger').item.json.message.message_id }}","disable_notification":false}},"credentials":{"telegramApi":{"id":"lY4w1OHVg8w6qZvx","name":"Telegram account"}},"typeVersion":1.2},{"id":"58a1cde2-b9a9-445a-ba7e-686b50b1646b","name":"If trello card id exists","type":"n8n-nodes-base.if","position":[2180,160],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"a5cef062-5441-4a6c-a3ce-f9852844701b","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.id }}","rightValue":""}]}},"typeVersion":2.2},{"id":"60f66d20-165c-4eb6-8314-e07a0a9d602c","name":"Parse to json","type":"n8n-nodes-base.code","position":[1780,160],"parameters":{"jsCode":"const data = JSON.parse($input.first().json.output); // text — ответ модели\nreturn [{ json: data }];\n"},"typeVersion":2},{"id":"c18beb1f-308b-4be7-8e96-e00a5b30c314","name":"Transcriber","type":"@n8n/n8n-nodes-langchain.openAi","position":[1120,160],"parameters":{"options":{"language":"ru","temperature":0},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"SYuEZTDHiAFQZoGB","name":"OpenAi account"}},"typeVersion":1.8},{"id":"b4c68ea4-0317-4f54-ae1f-d3cb69e75100","name":"Get audio","type":"n8n-nodes-base.telegram","position":[900,160],"webhookId":"9490be79-9ec6-4570-9c93-1f357de477ef","parameters":{"fileId":"={{ $json.message.voice.file_id }}","resource":"file"},"credentials":{"telegramApi":{"id":"lY4w1OHVg8w6qZvx","name":"Telegram account"}},"typeVersion":1.2}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ae72f36e-da67-4844-9723-e915e2869d9d","connections":{"AI Agent":{"main":[[{"node":"Parse to json","type":"main","index":0}]]},"Get audio":{"main":[[{"node":"Transcriber","type":"main","index":0}]]},"Transcriber":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Parse to json":{"main":[[{"node":"Create Trello Card","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Groq Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Telegram Trigger":{"main":[[{"node":"Get audio","type":"main","index":0}]]},"Create Trello Card":{"main":[[{"node":"If trello card id exists","type":"main","index":0}]]},"Send error message":{"main":[[{"node":"Stop and Error","type":"main","index":0}]]},"If trello card id exists":{"main":[[{"node":"Send task message","type":"main","index":0}],[{"node":"Send error message","type":"main","index":0}]]}}}