diff --git a/cypress/composables/ndv.ts b/cypress/composables/ndv.ts index 05d783ec5e8f9..4819e7fcccf91 100644 --- a/cypress/composables/ndv.ts +++ b/cypress/composables/ndv.ts @@ -72,6 +72,10 @@ export function getOutputPanelTable() { return getOutputPanelDataContainer().get('table'); } +export function getRunDataInfoCallout() { + return cy.getByTestId('run-data-callout'); +} + export function getOutputPanelItemsCount() { return getOutputPanel().getByTestId('ndv-items-count'); } diff --git a/cypress/e2e/30-langchain.cy.ts b/cypress/e2e/30-langchain.cy.ts index 78934c3ce5d69..96a03be961df7 100644 --- a/cypress/e2e/30-langchain.cy.ts +++ b/cypress/e2e/30-langchain.cy.ts @@ -26,6 +26,8 @@ import { clickCreateNewCredential, clickExecuteNode, clickGetBackToCanvas, + getRunDataInfoCallout, + getOutputPanelTable, toggleParameterCheckboxInputByName, } from '../composables/ndv'; import { @@ -418,4 +420,102 @@ describe('Langchain Integration', () => { assertInputOutputText('Berlin', 'not.exist'); assertInputOutputText('Kyiv', 'not.exist'); }); + + it('should show tool info notice if no existing tools were used during execution', () => { + addNodeToCanvas(MANUAL_CHAT_TRIGGER_NODE_NAME, true); + addNodeToCanvas(AGENT_NODE_NAME, true); + + addLanguageModelNodeToParent( + AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME, + AGENT_NODE_NAME, + true, + ); + + clickCreateNewCredential(); + setCredentialValues({ + apiKey: 'sk_test_123', + }); + clickGetBackToCanvas(); + + addToolNodeToParent(AI_TOOL_CALCULATOR_NODE_NAME, AGENT_NODE_NAME); + clickGetBackToCanvas(); + openNode(AGENT_NODE_NAME); + + const inputMessage = 'Hello!'; + const outputMessage = 'Hi there! How can I assist you today?'; + + clickExecuteNode(); + + runMockWorkflowExecution({ + trigger: () => sendManualChatMessage(inputMessage), + runData: [ + createMockNodeExecutionData(AGENT_NODE_NAME, { + jsonData: { + main: { output: outputMessage }, + }, + metadata: { + subRun: [{ node: AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME, runIndex: 0 }], + }, + }), + ], + lastNodeExecuted: AGENT_NODE_NAME, + }); + closeManualChatModal(); + openNode(AGENT_NODE_NAME); + + getRunDataInfoCallout().should('exist'); + }); + + it('should not show tool info notice if tools were used during execution', () => { + addNodeToCanvas(MANUAL_CHAT_TRIGGER_NODE_NAME, true); + addNodeToCanvas(AGENT_NODE_NAME, true, true); + getRunDataInfoCallout().should('not.exist'); + clickGetBackToCanvas(); + + addLanguageModelNodeToParent( + AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME, + AGENT_NODE_NAME, + true, + ); + + clickCreateNewCredential(); + setCredentialValues({ + apiKey: 'sk_test_123', + }); + clickGetBackToCanvas(); + + addToolNodeToParent(AI_TOOL_CALCULATOR_NODE_NAME, AGENT_NODE_NAME); + clickGetBackToCanvas(); + openNode(AGENT_NODE_NAME); + + getRunDataInfoCallout().should('not.exist'); + + const inputMessage = 'Hello!'; + const outputMessage = 'Hi there! How can I assist you today?'; + + clickExecuteNode(); + + runMockWorkflowExecution({ + trigger: () => sendManualChatMessage(inputMessage), + runData: [ + createMockNodeExecutionData(AGENT_NODE_NAME, { + jsonData: { + main: { output: outputMessage }, + }, + metadata: { + subRun: [{ node: AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME, runIndex: 0 }], + }, + }), + createMockNodeExecutionData(AI_TOOL_CALCULATOR_NODE_NAME, {}), + ], + lastNodeExecuted: AGENT_NODE_NAME, + }); + + closeManualChatModal(); + openNode(AGENT_NODE_NAME); + // This waits to ensure the output panel is rendered + getOutputPanelTable(); + + getRunDataInfoCallout().should('not.exist'); + }); }); diff --git a/cypress/e2e/34-template-credentials-setup.cy.ts b/cypress/e2e/34-template-credentials-setup.cy.ts index 815f4b1cebfcb..386c83eb0ad0d 100644 --- a/cypress/e2e/34-template-credentials-setup.cy.ts +++ b/cypress/e2e/34-template-credentials-setup.cy.ts @@ -56,10 +56,10 @@ describe('Template credentials setup', () => { it('can be opened from template collection page', () => { visitTemplateCollectionPage(testData.ecommerceStarterPack); templateCredentialsSetupPage.enableTemplateCredentialSetupFeatureFlag(); - clickUseWorkflowButtonByTitle('Promote new Shopify products on Twitter and Telegram'); + clickUseWorkflowButtonByTitle('Promote new Shopify products'); templateCredentialsSetupPage.getters - .title("Set up 'Promote new Shopify products on Twitter and Telegram' template") + .title("Set up 'Promote new Shopify products' template") .should('be.visible'); }); @@ -67,7 +67,7 @@ describe('Template credentials setup', () => { templateCredentialsSetupPage.visitTemplateCredentialSetupPage(testTemplate.id); templateCredentialsSetupPage.getters - .title("Set up 'Promote new Shopify products on Twitter and Telegram' template") + .title("Set up 'Promote new Shopify products' template") .should('be.visible'); templateCredentialsSetupPage.getters diff --git a/cypress/e2e/42-nps-survey.cy.ts b/cypress/e2e/42-nps-survey.cy.ts index e06fe43ba8050..11e5ebb88e5e4 100644 --- a/cypress/e2e/42-nps-survey.cy.ts +++ b/cypress/e2e/42-nps-survey.cy.ts @@ -10,7 +10,7 @@ import { WorkflowPage } from '../pages/workflow'; const workflowPage = new WorkflowPage(); -const NOW = 1717771477012; +const NOW = Date.now(); const ONE_DAY = 24 * 60 * 60 * 1000; const THREE_DAYS = ONE_DAY * 3; const SEVEN_DAYS = ONE_DAY * 7; diff --git a/cypress/e2e/45-ai-assistant.cy.ts b/cypress/e2e/45-ai-assistant.cy.ts index 9b50fef44a0df..9d3381136327b 100644 --- a/cypress/e2e/45-ai-assistant.cy.ts +++ b/cypress/e2e/45-ai-assistant.cy.ts @@ -557,6 +557,8 @@ describe('General help', () => { }).as('chatRequest'); aiAssistant.getters.askAssistantFloatingButton().click(); + wf.getters.zoomToFitButton().click(); + aiAssistant.actions.sendMessage('What is wrong with this workflow?'); cy.wait('@chatRequest'); diff --git a/cypress/fixtures/Ecommerce_starter_pack_template_collection.json b/cypress/fixtures/Ecommerce_starter_pack_template_collection.json index 1f908c587bae5..d6235b358c90f 100644 --- a/cypress/fixtures/Ecommerce_starter_pack_template_collection.json +++ b/cypress/fixtures/Ecommerce_starter_pack_template_collection.json @@ -1 +1,1555 @@ -{"collection":{"id":1,"name":"eCommerce Starter Pack","description":"eCommerce operations are complex — but there are many things that you can automate to make your life easier. This collection provides a few ideas to get started.\n\nReduce manual work and the risk of human error by automating processes such as social media promotion of products, updating customer databases, and get notifications for important events.","totalViews":0,"createdAt":"2022-02-17T12:40:50.498Z","nodes":[{"id":20,"name":"n8n-nodes-base.if","defaults":{"name":"IF","color":"#408000"},"displayName":"IF","icon":"fa:map-signs","iconData":{"icon":"map-signs","type":"icon"},"typeVersion":1,"categories":[{"id":9,"name":"Core Nodes"}]},{"id":49,"name":"n8n-nodes-base.telegram","defaults":{"name":"Telegram"},"displayName":"Telegram","icon":"file:telegram.svg","iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjYgNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTAgMzJjMCAxNy42NzMgMTQuMzI3IDMyIDMyIDMyczMyLTE0LjMyNyAzMi0zMlM0OS42NzMgMCAzMiAwIDAgMTQuMzI3IDAgMzIiIGZpbGw9IiMzN2FlZTIiLz48cGF0aCBkPSJNMjEuNjYxIDM0LjMzOGwzLjc5NyAxMC41MDhzLjQ3NS45ODMuOTgzLjk4MyA4LjA2OC03Ljg2NCA4LjA2OC03Ljg2NGw4LjQwNy0xNi4yMzctMjEuMTE5IDkuODk4eiIgZmlsbD0iI2M4ZGFlYSIvPjxwYXRoIGQ9Ik0yNi42OTUgMzcuMDM0bC0uNzI5IDcuNzQ2cy0uMzA1IDIuMzczIDIuMDY4IDBsNC42NDQtNC4yMDMiIGZpbGw9IiNhOWM2ZDgiLz48cGF0aCBkPSJNMjEuNzMgMzQuNzEybC03LjgwOS0yLjU0NXMtLjkzMi0uMzc4LS42MzMtMS4yMzdjLjA2Mi0uMTc3LjE4Ni0uMzI4LjU1OS0uNTg4IDEuNzMxLTEuMjA2IDMyLjAyOC0xMi4wOTYgMzIuMDI4LTEyLjA5NnMuODU2LS4yODggMS4zNjEtLjA5N2MuMjMxLjA4OC4zNzguMTg3LjUwMy41NDguMDQ1LjEzMi4wNzEuNDExLjA2OC42ODktLjAwMy4yMDEtLjAyNy4zODYtLjA0NS42NzgtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg=="},"typeVersion":1,"categories":[{"id":6,"name":"Communication"}]},{"id":107,"name":"n8n-nodes-base.shopifyTrigger","defaults":{"name":"Shopify Trigger"},"displayName":"Shopify Trigger","icon":"file:shopify.svg","iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PH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jMyMywwLTE1MS4wNDEsNjcuNzE4LTE1MS4wNDEsMTUxLjA0MVM5MS41NjcsMzI2LjIyNSwxNzQuODksMzI2LjIyNWM4My4zMjMsMCwxNTEuMDQxLTY3LjcxOCwxNTEuMDQxLTE1MS4wNDENCgljMC0xNy45Ni0yLjk0NC0zNS4zMzItOS4xMjctNTEuODE5Yy0yLjM1NS02LjE4MywwLjg4My0xMi45NTUsNy4wNjYtMTUuMzFjNi4xODMtMi4zNTUsMTIuOTU0LDAuODgzLDE1LjMxLDcuMDY2DQoJYzcuMDY2LDE5LjEzOCwxMC42LDM5LjQ1MywxMC42LDYwLjA2M0MzNDkuNzc5LDI3MS4xNjcsMjcxLjQ2MiwzNDkuNzc5LDE3NC44OSwzNDkuNzc5Ii8+DQo8Zz4NCgk8cG9seWdvbiBmaWxsPSIjRkRCOTMzIiBwb2ludHM9IjI1MS40NCwxNTYuOTMgMjI0LjM1NCwxODUuMTk0IDIzOS4zNjksMjQ4LjQ5NiAyNzMuNTIyLDI0OC40OTYgCSIvPg0KPC9nPg0KPHBvbHlnb24gZmlsbD0iI0ZEQjkzMyIgcG9pbnRzPSIyNDAuMjUzLDczLjMxMiAyNDkuNjc0LDgyLjczNCAxNzQuODksMTYxLjkzNSAxMTAuOTk5LDk2LjI3NyA3NC4xOTYsMjQ4LjQ5NiAxMDguMzUsMjQ4LjQ5NiANCgkxMjguNjY1LDE2My45OTYgMTc0Ljg5LDIxNC4zNDMgMjczLjgxNywxMDYuNTgzIDI4My4yMzksMTE2LjI5OSAyOTIuNjYsNjMuMDA3ICIvPg0KPC9zdmc+DQo="},"typeVersion":1,"categories":[{"id":1,"name":"Marketing & Content"},{"id":6,"name":"Communication"}]},{"id":235,"name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"displayName":"WooCommerce Trigger","icon":"file:wooCommerce.svg","iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhd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EtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"typeVersion":1,"categories":[{"id":2,"name":"Sales"}]},{"id":325,"name":"n8n-nodes-base.twitter","defaults":{"name":"X"},"displayName":"X (Formerly Twitter)","icon":"file:x.svg","iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K"},"typeVersion":2,"categories":[{"id":1,"name":"Marketing & Content"}]}],"categories":[{"id":2,"name":"Sales"}],"workflows":[{"id":1205,"name":"Promote new Shopify products on Twitter and Telegram","views":485,"recentViews":9850,"totalViews":485,"createdAt":"2021-08-24T10:40:50.007Z","description":"This workflow automatically promotes your new Shopify products on Twitter and Telegram. This workflow is also featured in the blog post [*6 e-commerce workflows to power up your Shopify store*](https://n8n.io/blog/no-code-ecommerce-workflow-automations/#promote-your-new-products-on-social-media).\n\n## Prerequisites\n\n- A Shopify account and [credentials](https://docs.n8n.io/integrations/credentials/shopify/)\n- A Twitter account and [credentials](https://docs.n8n.io/integrations/credentials/twitter/)\n- A Telegram account and [credentials](https://docs.n8n.io/integrations/credentials/telegram/) for the channel you want to send messages to.\n\n## Nodes\n\n- [Shopify Trigger node](https://docs.n8n.io/integrations/trigger-nodes/n8n-nodes-base.shopifytrigger/) triggers the workflow when you create a new product in Shopify.\n- [Twitter node](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.twitter/) posts a tweet with the text \"Hey there, my design is now on a new product! Visit my {shop name} to get this cool {product title} (and check out more {product type})\".\n- [Telegram node](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.telegram/) posts a message with the same text as above in a Telegram channel.","workflow":{"nodes":[{"name":"Twitter","type":"n8n-nodes-base.twitter","position":[720,-220],"parameters":{"text":"=Hey there, my design is now on a new product ✨\nVisit my {{$json[\"vendor\"]}} shop to get this cool{{$json[\"title\"]}} (and check out more {{$json[\"product_type\"]}}) 🛍️","additionalFields":{}},"credentials":{"twitterOAuth1Api":"twitter"},"typeVersion":1},{"name":"Telegram","type":"n8n-nodes-base.telegram","position":[720,-20],"parameters":{"text":"=Hey there, my design is now on a new product!\nVisit my {{$json[\"vendor\"]}} shop to get this cool{{$json[\"title\"]}} (and check out more {{$json[\"product_type\"]}})","chatId":"123456","additionalFields":{}},"credentials":{"telegramApi":"telegram_habot"},"typeVersion":1},{"name":"product created","type":"n8n-nodes-base.shopifyTrigger","position":[540,-110],"webhookId":"2a7e0e50-8f09-4a2b-bf54-a849a6ac4fe0","parameters":{"topic":"products/create"},"credentials":{"shopifyApi":"shopify_nodeqa"},"typeVersion":1}],"connections":{"product created":{"main":[[{"node":"Twitter","type":"main","index":0},{"node":"Telegram","type":"main","index":0}]]}}},"workflowInfo":{"nodeCount":3,"nodeTypes":{"n8n-nodes-base.twitter":{"count":1},"n8n-nodes-base.telegram":{"count":1},"n8n-nodes-base.shopifyTrigger":{"count":1}}},"user":{"username":"lorenanda"},"nodes":[{"id":49,"icon":"file:telegram.svg","name":"n8n-nodes-base.telegram","defaults":{"name":"Telegram"},"iconData":{"type":"file","file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jUwMy41NDguMDQ1LjEzMi4wNzEuNDExLjA2OC42ODktLjAwMy4yMDEtLjAyNy4zODYtLjA0NS42NzgtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg=="},"categories":[{"id":6,"name":"Communication"}],"displayName":"Telegram","typeVersion":1},{"id":107,"icon":"file:shopify.svg","name":"n8n-nodes-base.shopifyTrigger","defaults":{"name":"Shopify Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTggNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0i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MzYuNDcyIDY0bDE5Ljc2My00LjI2LTYuOTgtNDcuMjE4YS42OC42OCAwIDAwLS41NjQtLjU2NHoiIGZpbGw9IiM1ZThlM2UiLz48cGF0aCBkPSJNMjkuNzU4IDIyLjlsLTIuNDU0IDcuMjQyYTExLjM2IDExLjM2IDAgMDAtNC43NTItMS4xMzNjLTMuODQ4IDAtNC4wMzYgMi40MTItNC4wMzYgMy4wMTggMCAzLjI5OCA4LjYzNiA0LjU2NCA4LjYzNiAxMi4zMzMgMCA2LjEtMy44ODUgMTAuMDMtOS4xIDEwLjAzLTYuMjYgMC05LjQ2Ny0zLjg4NS05LjQ2Ny0zLjg4NWwxLjY2NS01LjU1czMuMjggMi44MyA2LjA3MyAyLjgzYTIuNDcgMi40NyAwIDAwMi41NjQtMi40OWMwLTQuMzQtNy4xLTQuNTI3LTcuMS0xMS42MTggMC01Ljk2MiA0LjI5OC0xMS43NyAxMi45MzQtMTEuNzcgMy4zOTQuMDUgNS4wMTggMSA1LjAxOCAxeiIvPjwvZz48L3N5bWJvbD48L3N2Zz4="},"categories":[{"id":2,"name":"Sales"}],"displayName":"Shopify Trigger","typeVersion":1},{"id":325,"icon":"file:x.svg","name":"n8n-nodes-base.twitter","defaults":{"name":"X"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K"},"categories":[{"id":1,"name":"Marketing & Content"}],"displayName":"X (Formerly Twitter)","typeVersion":2}],"categories":[{"id":2,"name":"Sales"},{"id":19,"name":"Marketing & Growth"}],"image":[{"id":527,"url":"https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/89a078b208fe4c6181902608b1cd1332.png"}]},{"id":1456,"name":"Add new customers from WooCommerce to Mautic","views":333,"recentViews":9833,"totalViews":333,"createdAt":"2022-02-17T15:00:40.748Z","description":"This workflow uses a WooCommerce trigger that will run when a new customer has been added, It will then add the customer to Mautic.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Mautic nodes.","workflow":{"id":83,"name":"New WooCommerce Customer to Mautic","nodes":[{"name":"Check for Existing","type":"n8n-nodes-base.mautic","position":[280,480],"parameters":{"options":{"search":"={{$json[\"email\"]}}"},"operation":"getAll","authentication":"oAuth2"},"credentials":{"mauticOAuth2Api":{"id":"54","name":"Mautic account"}},"typeVersion":1,"alwaysOutputData":true},{"name":"If New","type":"n8n-nodes-base.if","position":[460,480],"parameters":{"conditions":{"string":[{"value1":"={{$json[\"id\"]}}","operation":"isEmpty"}]}},"typeVersion":1},{"name":"Create Contact","type":"n8n-nodes-base.mautic","position":[680,320],"parameters":{"email":"={{$node[\"Customer Created\"].json[\"email\"]}}","company":"={{$node[\"Customer Created\"].json[\"billing\"][\"company\"]}}","options":{},"lastName":"={{$node[\"Customer Created\"].json[\"last_name\"]}}","firstName":"={{$node[\"Customer Created\"].json[\"first_name\"]}}","authentication":"oAuth2","additionalFields":{}},"credentials":{"mauticOAuth2Api":{"id":"54","name":"Mautic account"}},"typeVersion":1},{"name":"Update Contact","type":"n8n-nodes-base.mautic","position":[680,580],"parameters":{"options":{},"contactId":"={{$json[\"id\"]}}","operation":"update","updateFields":{"lastName":"={{$node[\"Customer Created or Updated\"].json[\"last_name\"]}}","firstName":"={{$node[\"Customer Created or Updated\"].json[\"first_name\"]}}"},"authentication":"oAuth2"},"credentials":{"mauticOAuth2Api":{"id":"54","name":"Mautic account"}},"typeVersion":1},{"name":"Customer Created or Updated","type":"n8n-nodes-base.wooCommerceTrigger","position":[100,480],"webhookId":"5d89e322-a5e0-4cce-9eab-185e8375175b","parameters":{"event":"customer.updated"},"credentials":{"wooCommerceApi":{"id":"48","name":"WooCommerce account"}},"typeVersion":1}],"active":false,"settings":{"saveManualExecutions":true,"saveExecutionProgress":true,"saveDataSuccessExecution":"all"},"connections":{"If New":{"main":[[{"node":"Create Contact","type":"main","index":0}],[{"node":"Update Contact","type":"main","index":0}]]},"Check for Existing":{"main":[[{"node":"If New","type":"main","index":0}]]},"Customer Created or Updated":{"main":[[{"node":"Check for Existing","type":"main","index":0}]]}}},"workflowInfo":{"nodeCount":6,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.mautic":{"count":3},"n8n-nodes-base.wooCommerceTrigger":{"count":1}}},"user":{"username":"jon-n8n"},"nodes":[{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","defaults":{"name":"IF","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"IF","typeVersion":1},{"id":42,"icon":"fa:play","name":"n8n-nodes-base.start","defaults":{"name":"Start","color":"#00e000"},"iconData":{"icon":"play","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"Start","typeVersion":1},{"id":126,"icon":"file:mautic.svg","name":"n8n-nodes-base.mautic","defaults":{"name":"Mautic"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1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LDYwLjA2M0MzNDkuNzc5LDI3MS4xNjcsMjcxLjQ2MiwzNDkuNzc5LDE3NC44OSwzNDkuNzc5Ii8+DQo8Zz4NCgk8cG9seWdvbiBmaWxsPSIjRkRCOTMzIiBwb2ludHM9IjI1MS40NCwxNTYuOTMgMjI0LjM1NCwxODUuMTk0IDIzOS4zNjksMjQ4LjQ5NiAyNzMuNTIyLDI0OC40OTYgCSIvPg0KPC9nPg0KPHBvbHlnb24gZmlsbD0iI0ZEQjkzMyIgcG9pbnRzPSIyNDAuMjUzLDczLjMxMiAyNDkuNjc0LDgyLjczNCAxNzQuODksMTYxLjkzNSAxMTAuOTk5LDk2LjI3NyA3NC4xOTYsMjQ4LjQ5NiAxMDguMzUsMjQ4LjQ5NiANCgkxMjguNjY1LDE2My45OTYgMTc0Ljg5LDIxNC4zNDMgMjczLjgxNywxMDYuNTgzIDI4My4yMzksMTE2LjI5OSAyOTIuNjYsNjMuMDA3ICIvPg0KPC9zdmc+DQo="},"categories":[{"id":1,"name":"Marketing & Content"},{"id":6,"name":"Communication"}],"displayName":"Mautic","typeVersion":1},{"id":235,"icon":"file:wooCommerce.svg","name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3R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UuNjEtNS40MTE0IDguODQ1NS04LjExNzEgMTguNjI4LTguMTE3MSAyOS4zNDYgMCA4LjAxMyAxLjY2NSAxNC44ODEgNC45OTUxIDIwLjYwNSAzLjc0NjMgNi41NTYxIDkuMjYxOCAxMC41MTEgMTYuNjUgMTIuMDcyIDEuOTc3MiAwLjQxNjI2IDMuODUwNCAwLjYyNDM5IDUuNjE5NSAwLjYyNDM5IDEwLjA5NCAwIDE4LjIxMS01LjIwMzMgMjQuNDU1LTE1LjYxIDUuNDExNC04Ljk0OTYgOC4xMTcxLTE4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"categories":[{"id":2,"name":"Sales"}],"displayName":"WooCommerce Trigger","typeVersion":1}],"categories":[{"id":2,"name":"Sales"}],"image":[]},{"id":1459,"name":"Notify on Telegram and Twitter when new order is added in WooCommerce","views":620,"recentViews":9823,"totalViews":620,"createdAt":"2022-02-17T15:02:14.961Z","description":"This workflow uses a WooCommerce trigger that will run a new product has been added, It will then post the product to Telegram and Twitter.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce, Twitter and Telegram nodes.","workflow":{"id":85,"name":"New WooCommerce Product to Twitter and Telegram","nodes":[{"name":"Twitter","type":"n8n-nodes-base.twitter","position":[720,300],"parameters":{"text":"=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.","additionalFields":{}},"credentials":{"twitterOAuth1Api":{"id":"37","name":"joffcom"}},"typeVersion":1},{"name":"Telegram","type":"n8n-nodes-base.telegram","position":[720,500],"parameters":{"text":"=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.","chatId":"123456","additionalFields":{}},"credentials":{"telegramApi":{"id":"56","name":"Telegram account"}},"typeVersion":1},{"name":"WooCommerce Trigger","type":"n8n-nodes-base.wooCommerceTrigger","position":[540,400],"webhookId":"ab7b134b-9b2d-4e0d-b496-1aee30db0808","parameters":{"event":"product.created"},"credentials":{"wooCommerceApi":{"id":"48","name":"WooCommerce account"}},"typeVersion":1}],"active":false,"settings":{},"connections":{"WooCommerce Trigger":{"main":[[{"node":"Twitter","type":"main","index":0},{"node":"Telegram","type":"main","index":0}]]}}},"workflowInfo":{"nodeCount":4,"nodeTypes":{"n8n-nodes-base.twitter":{"count":1},"n8n-nodes-base.telegram":{"count":1},"n8n-nodes-base.wooCommerceTrigger":{"count":1}}},"user":{"username":"jon-n8n"},"nodes":[{"id":42,"icon":"fa:play","name":"n8n-nodes-base.start","defaults":{"name":"Start","color":"#00e000"},"iconData":{"icon":"play","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"Start","typeVersion":1},{"id":49,"icon":"file:telegram.svg","name":"n8n-nodes-base.telegram","defaults":{"name":"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jMxLjA4OC4zNzguMTg3LjUwMy41NDguMDQ1LjEzMi4wNzEuNDExLjA2OC42ODktLjAwMy4yMDEtLjAyNy4zODYtLjA0NS42NzgtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg=="},"categories":[{"id":6,"name":"Communication"}],"displayName":"Telegram","typeVersion":1},{"id":235,"icon":"file:wooCommerce.svg","name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YW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guODQ1NS04LjExNzEgMTguNjI4LTguMTE3MSAyOS4zNDYgMCA4LjAxMyAxLjY2NSAxNC44ODEgNC45OTUxIDIwLjYwNSAzLjc0NjMgNi41NTYxIDkuMjYxOCAxMC41MTEgMTYuNjUgMTIuMDcyIDEuOTc3MiAwLjQxNjI2IDMuODUwNCAwLjYyNDM5IDUuNjE5NSAwLjYyNDM5IDEwLjA5NCAwIDE4LjIxMS01LjIwMzMgMjQuNDU1LTE1LjYxIDUuNDExNC04Ljk0OTYgOC4xMTcxLTE4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"categories":[{"id":2,"name":"Sales"}],"displayName":"WooCommerce Trigger","typeVersion":1},{"id":325,"icon":"file:x.svg","name":"n8n-nodes-base.twitter","defaults":{"name":"X"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K"},"categories":[{"id":1,"name":"Marketing & Content"}],"displayName":"X (Formerly Twitter)","typeVersion":2}],"categories":[{"id":2,"name":"Sales"},{"id":19,"name":"Marketing & Growth"}],"image":[]},{"id":1457,"name":"Notify on Slack when new order is registered in WooCommerce","views":178,"recentViews":9787,"totalViews":178,"createdAt":"2022-02-17T15:01:13.489Z","description":"This workflow uses a WooCommerce trigger that will run when an order has been placed.\n\nIf the value of this is over 100 it will post it to a Slack channel.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Slack nodes, You will also need to pick a channel to post the message to.","workflow":{"id":81,"name":"New WooCommerce order to Slack","nodes":[{"name":"Order Created","type":"n8n-nodes-base.wooCommerceTrigger","position":[340,500],"webhookId":"287b4bf4-67ec-4c97-85d9-c0d3e6f59e6b","parameters":{"event":"order.created"},"credentials":{"wooCommerceApi":{"id":"48","name":"WooCommerce account"}},"typeVersion":1},{"name":"Send to Slack","type":"n8n-nodes-base.slack","position":[780,480],"parameters":{"text":":sparkles: There is a new order :sparkles:","channel":"woo-commerce","blocksUi":{"blocksValues":[]},"attachments":[{"color":"#66FF00","fields":{"item":[{"short":true,"title":"Order ID","value":"={{$json[\"id\"]}}"},{"short":true,"title":"Status","value":"={{$json[\"status\"]}}"},{"short":true,"title":"Total","value":"={{$json[\"currency_symbol\"]}}{{$json[\"total\"]}}"},{"short":false,"title":"Link","value":"={{$node[\"Order Created\"].json[\"_links\"][\"self\"][0][\"href\"]}}"}]},"footer":"=*Ordered:* {{$json[\"date_created\"]}} | *Transaction ID:* {{$json[\"transaction_id\"]}}"}],"otherOptions":{}},"credentials":{"slackApi":{"id":"53","name":"Slack Access Token"}},"typeVersion":1},{"name":"Price over 100","type":"n8n-nodes-base.if","position":[540,500],"parameters":{"conditions":{"number":[{"value1":"={{$json[\"total\"]}}","value2":100,"operation":"largerEqual"}]}},"typeVersion":1}],"active":false,"settings":{"saveManualExecutions":true,"saveExecutionProgress":true,"saveDataSuccessExecution":"all"},"connections":{"Order Created":{"main":[[{"node":"Price over 100","type":"main","index":0}]]},"Price over 100":{"main":[[{"node":"Send to Slack","type":"main","index":0}],[]]}}},"workflowInfo":{"nodeCount":4,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.slack":{"count":1},"n8n-nodes-base.wooCommerceTrigger":{"count":1}}},"user":{"username":"jon-n8n"},"nodes":[{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","defaults":{"name":"IF","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"IF","typeVersion":1},{"id":40,"icon":"file:slack.svg","name":"n8n-nodes-base.slack","defaults":{"name":"Slack"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTUwLjg1MiAxNTAuODUyIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIHhsaW5rOmhyZWY9IiNhIiB4PSIuOTI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MzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjxnIHN0cm9rZS1saW5lam9pbj0ibWl0ZXIiPjxwYXRoIGQ9Ik03Ny43NzggMTMzLjMzM2MwIDguMjA4IDYuNjA3IDE0LjgxNSAxNC44MTUgMTQuODE1czE0LjgxNS02LjYwNyAxNC44MTUtMTQuODE1LTYuNjA3LTE0LjgxNS0xNC44MTUtMTQuODE1SDc3Ljc3OHoiIGZpbGw9IiNlY2IyMmQiIHN0cm9rZT0iI2VjYjIyZCIvPjxwYXRoIGQ9Ik0xMzMuMzM0IDcwLjM3MWgtMTQuODE1VjU1LjU1NmMwLTguMjA3IDYuNjA3LTE0LjgxNSAxNC44MTUtMTQuODE1czE0LjgxNSA2LjYwNyAxNC44MTUgMTQuODE1LTYuNjA3IDE0LjgxNS0xNC44MTUgMTQuODE1eiIgZmlsbD0iIzJmYjY3YyIgc3Ryb2tlPSIjMmZiNjdjIi8+PHBhdGggZD0iTTE0LjgxNSA3Ny43NzhIMjkuNjN2MTQuODE1YzAgOC4yMDctNi42MDcgMTQuODE1LTE0LjgxNSAxNC44MTVTMCAxMDAuOCAwIDkyLjU5M3M2LjYwNy0xNC44MTUgMTQuODE1LTE0LjgxNXoiIGZpbGw9IiNlMDFlNWEiIHN0cm9rZT0iI2UwMWU1YSIvPjxwYXRoIGQ9Ik03MC4zNzEgMTQuODE1VjI5LjYzSDU1LjU1NmMtOC4yMDcgMC0xNC44MTUtNi42MDctMTQuODE1LTE0LjgxNVM0Ny4zNDggMCA1NS41NTYgMHMxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+"},"categories":[{"id":6,"name":"Communication"}],"displayName":"Slack","typeVersion":2},{"id":42,"icon":"fa:play","name":"n8n-nodes-base.start","defaults":{"name":"Start","color":"#00e000"},"iconData":{"icon":"play","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"Start","typeVersion":1},{"id":235,"icon":"file:wooCommerce.svg","name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIi8+CjxkYzp0aXRsZS8+CjwvY2M6V29yaz4KPC9yZGY6UkRGPgo8L21ldGFkYXRhPgo8cGF0aCBkPSJtMjMuNzU5IDBoMjA4LjM4YzEzLjE4NyAwIDIzLjg2MyAxMC42NzUgMjMuODYzIDIzLjg2M3Y3OS41NDJjMCAxMy4xODctMTAuNjc1IDIzLjg2My0yMy44NjMgMjMuODYzaC03NC43MjdsMTAuMjU3IDI1LjExOC00NS4xMDktMjUuMTE4aC05OC42OTVjLTEzLjE4NyAwLTIzLjg2My0xMC42NzUtMjMuODYzLTIzLjg2M3YtNzkuNTQyYy0wLjEwNDY2LTEzLjA4MyA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NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"categories":[{"id":2,"name":"Sales"}],"displayName":"WooCommerce Trigger","typeVersion":1}],"categories":[{"id":2,"name":"Sales"}],"image":[]},{"id":1765,"name":"Get Slack notifications when new product published on WooCommerce","views":79,"recentViews":9577,"totalViews":79,"createdAt":"2022-08-12T12:36:53.409Z","description":"This workflow let's a bot in Slack notify a specific channel when a new product in WooCommerce is published and live on the site. \n\n## Prerequisites\n\n[WooCommerce](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.woocommercetrigger/) account\n[Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/) and a [Slack bot](https://slack.com/help/articles/115005265703-Create-a-bot-for-your-workspace)\n\n## How it works\n\n1. Listen for WooCommerce product creation\n2. If permalink starts with https://[your-url-here].com/product/\n3. Slack bot notifies channel that a new product has been added. \n\nPlease note, you must update the URL in the IF node to match your url. If your WooCommerce doesn't use the slug /product/, that will need to be updated too. \n","workflow":{"id":1016,"name":"Woocommerce to slack: notify new product created","tags":[{"id":"5","name":"FVF","createdAt":"2022-07-30T07:43:44.795Z","updatedAt":"2022-07-30T07:43:44.795Z"}],"nodes":[{"name":"If URL has /product/","type":"n8n-nodes-base.if","position":[640,300],"parameters":{"conditions":{"string":[{"value1":"={{$json[\"permalink\"]}}","value2":"https://[add-your-url-here]/product/","operation":"startsWith"}]}},"typeVersion":1},{"name":"Send message to slack","type":"n8n-nodes-base.slack","position":[920,260],"parameters":{"text":":new: A new product has been added! :new:","channel":"newproducts","blocksUi":{"blocksValues":[]},"attachments":[{"color":"#66FF00","fields":{"item":[{"short":false,"title":"Name","value":"={{$json[\"name\"]}}"},{"short":true,"title":"Price","value":"={{$json[\"regular_price\"]}}"},{"short":true,"title":"Sale Price","value":"={{$json[\"sale_price\"]}}"},{"short":false,"title":"Link","value":"={{$json[\"permalink\"]}}"}]},"footer":"=Added: {{$json[\"date_created\"]}}"}],"otherOptions":{}},"credentials":{"slackApi":{"id":"21","name":"FVF bot"}},"typeVersion":1},{"name":"On product creation","type":"n8n-nodes-base.wooCommerceTrigger","position":[460,300],"webhookId":"267c4855-6227-4d33-867e-74600097473e","parameters":{"event":"product.created"},"credentials":{"wooCommerceApi":{"id":"20","name":"WooCommerce account FVF"}},"typeVersion":1}],"active":true,"settings":{},"connections":{"On product creation":{"main":[[{"node":"If URL has /product/","type":"main","index":0}]]},"If URL has /product/":{"main":[[{"node":"Send message to slack","type":"main","index":0}]]}}},"workflowInfo":{"nodeCount":4,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.slack":{"count":1},"n8n-nodes-base.wooCommerceTrigger":{"count":1}}},"user":{"username":"n8n-team"},"nodes":[{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","defaults":{"name":"IF","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"IF","typeVersion":1},{"id":40,"icon":"file:slack.svg","name":"n8n-nodes-base.slack","defaults":{"name":"Slack"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHR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MxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+"},"categories":[{"id":6,"name":"Communication"}],"displayName":"Slack","typeVersion":2},{"id":42,"icon":"fa:play","name":"n8n-nodes-base.start","defaults":{"name":"Start","color":"#00e000"},"iconData":{"icon":"play","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"Start","typeVersion":1},{"id":235,"icon":"file:wooCommerce.svg","name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIi8+CjxkYzp0aXRsZS8+CjwvY2M6V29yaz4KPC9yZGY6UkRGPgo8L21ldGFkYXRhPgo8cGF0aCBkPSJtMjMuNzU5IDBoMjA4LjM4YzE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EtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"categories":[{"id":2,"name":"Sales"}],"displayName":"WooCommerce Trigger","typeVersion":1}],"categories":[{"id":2,"name":"Sales"}],"image":[]},{"id":1460,"name":"Notify on Slack when refund is registered in WooCommerce","views":85,"recentViews":9541,"totalViews":85,"createdAt":"2022-02-17T15:02:58.662Z","description":"This workflow uses a WooCommerce trigger that will run when an order has been updated and the status is refunded.\n\nIf the value of this is over 100 it will post it to a Slack channel.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Slack nodes, You will also need to pick a channel to post the message to.","workflow":{"id":82,"name":"New WooCommerce refund to Slack","nodes":[{"name":"Order Updated","type":"n8n-nodes-base.wooCommerceTrigger","position":[320,500],"webhookId":"f7736be3-e978-4a17-b936-7ce9f8ccdb72","parameters":{"event":"order.updated"},"credentials":{"wooCommerceApi":{"id":"48","name":"WooCommerce account"}},"typeVersion":1},{"name":"If Refund and Over 100","type":"n8n-nodes-base.if","position":[540,500],"parameters":{"conditions":{"number":[{"value1":"={{$json[\"total\"]}}","value2":100,"operation":"largerEqual"}],"string":[{"value1":"={{$json[\"status\"]}}","value2":"refunded"}]}},"typeVersion":1},{"name":"Send to Slack","type":"n8n-nodes-base.slack","position":[780,480],"parameters":{"text":":x: A refund has been issued :x:","channel":"woo-commerce","blocksUi":{"blocksValues":[]},"attachments":[{"color":"#FF0000","fields":{"item":[{"short":true,"title":"Order ID","value":"={{$json[\"id\"]}}"},{"short":true,"title":"Status","value":"={{$json[\"status\"]}}"},{"short":true,"title":"Total","value":"={{$json[\"currency_symbol\"]}}{{$json[\"total\"]}}"}]},"footer":"=*Order updated:* {{$json[\"date_modified\"]}}"}],"otherOptions":{}},"credentials":{"slackApi":{"id":"53","name":"Slack Access Token"}},"typeVersion":1}],"active":false,"settings":{"saveManualExecutions":true,"saveExecutionProgress":true,"saveDataSuccessExecution":"all"},"connections":{"Order Updated":{"main":[[{"node":"If Refund and Over 100","type":"main","index":0}]]},"If Refund and Over 100":{"main":[[{"node":"Send to Slack","type":"main","index":0}],[]]}}},"workflowInfo":{"nodeCount":4,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.slack":{"count":1},"n8n-nodes-base.wooCommerceTrigger":{"count":1}}},"user":{"username":"jon-n8n"},"nodes":[{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","defaults":{"name":"IF","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"IF","typeVersion":1},{"id":40,"icon":"file:slack.svg","name":"n8n-nodes-base.slack","defaults":{"name":"Slack"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zO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MCA1NS41NTYgMHMxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+"},"categories":[{"id":6,"name":"Communication"}],"displayName":"Slack","typeVersion":2},{"id":42,"icon":"fa:play","name":"n8n-nodes-base.start","defaults":{"name":"Start","color":"#00e000"},"iconData":{"icon":"play","type":"icon"},"categories":[{"id":9,"name":"Core Nodes"}],"displayName":"Start","typeVersion":1},{"id":235,"icon":"file:wooCommerce.svg","name":"n8n-nodes-base.wooCommerceTrigger","defaults":{"name":"WooCommerce Trigger"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIi8+CjxkYzp0aXRsZS8+CjwvY2M6V29yaz4KPC9yZGY6UkRGPgo8L21ldGFkYXRhPgo8cGF0aCBkPSJtMjMuNzU5ID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4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo="},"categories":[{"id":2,"name":"Sales"}],"displayName":"WooCommerce Trigger","typeVersion":1}],"categories":[{"id":2,"name":"Sales"},{"id":8,"name":"Finance & Accounting"}],"image":[]}],"image":[]}} +{ + "collection": { + "id": 1, + "name": "eCommerce Starter Pack", + "description": "eCommerce operations are complex — but there are many things that you can automate to make your life easier. This collection provides a few ideas to get started.\n\nReduce manual work and the risk of human error by automating processes such as social media promotion of products, updating customer databases, and get notifications for important events.", + "totalViews": 0, + "createdAt": "2022-02-17T12:40:50.498Z", + "nodes": [ + { + "id": 20, + "name": "n8n-nodes-base.if", + "defaults": { + "name": "IF", + "color": "#408000" + }, + "displayName": "IF", + "icon": "fa:map-signs", + "iconData": { + "icon": "map-signs", + "type": "icon" + }, + "typeVersion": 1, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ] + }, + { + "id": 49, + "name": "n8n-nodes-base.telegram", + "defaults": { + "name": "Telegram" + }, + "displayName": "Telegram", + "icon": "file:telegram.svg", + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjYgNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTAgMzJjMCAxNy42NzMgMTQuMzI3IDMyIDMyIDMyczMyLTE0LjMyNyAzMi0zMlM0OS42NzMgMCAzMiAwIDAgMTQuMzI3IDAgMzIiIGZpbGw9IiMzN2FlZTIiLz48cGF0aCBkPSJNMjEuNjYxIDM0LjMzOGwzLjc5NyAxMC41MDhzLjQ3NS45ODMuOTgzLjk4MyA4LjA2OC03Ljg2NCA4LjA2OC03Ljg2NGw4LjQwNy0xNi4yMzctMjEuMTE5IDkuODk4eiIgZmlsbD0iI2M4ZGFlYSIvPjxwYXRoIGQ9Ik0yNi42OTUgMzcuMDM0bC0uNzI5IDcuNzQ2cy0uMzA1IDIuMzczIDIuMDY4IDBsNC42NDQtNC4yMDMiIGZpbGw9IiNhOWM2ZDgiLz48cGF0aCBkPSJNMjEuNzMgMzQuNzEybC03LjgwOS0yLjU0NXMtLjkzMi0uMzc4LS42MzMtMS4yMzdjLjA2Mi0uMTc3LjE4Ni0uMzI4LjU1OS0uNTg4IDEuNzMxLTEuMjA2IDMyLjAyOC0xMi4wOTYgMzIuMDI4LTEyLjA5NnMuODU2LS4yODggMS4zNjEtLjA5N2MuMjMxLjA4OC4zNzguMTg3LjUwMy41NDguMDQ1LjEzMi4wNzEuNDExLjA2OC42ODktLjAwMy4yMDEtLjAyNy4zODYtLjA0NS42NzgtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg==" + }, + "typeVersion": 1, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ] + }, + { + "id": 107, + "name": "n8n-nodes-base.shopifyTrigger", + "defaults": { + "name": "Shopify Trigger" + }, + "displayName": "Shopify Trigger", + "icon": "file:shopify.svg", + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTggNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWN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MTYuNjY4IDEwLjAzIDE5Ljk4OCAyLjI2IDI1LjkxIDIuMjZ6IiBmaWxsPSIjOTViZjQ3Ii8+PHBhdGggZD0iTTQ4LjY5MSAxMS45NTdjLS4yMjUtLjAzNy01LjE3LS4zNzYtNS4xNy0uMzc2bC0zLjc3LTMuNzdhLjc1My43NTMgMCAwMC0uNTI3LS4yMjVMMzYuNDcyIDY0bDE5Ljc2My00LjI2LTYuOTgtNDcuMjE4YS42OC42OCAwIDAwLS41NjQtLjU2NHoiIGZpbGw9IiM1ZThlM2UiLz48cGF0aCBkPSJNMjkuNzU4IDIyLjlsLTIuNDU0IDcuMjQyYTExLjM2IDExLjM2IDAgMDAtNC43NTItMS4xMzNjLTMuODQ4IDAtNC4wMzYgMi40MTItNC4wMzYgMy4wMTggMCAzLjI5OCA4LjYzNiA0LjU2NCA4LjYzNiAxMi4zMzMgMCA2LjEtMy44ODUgMTAuMDMtOS4xIDEwLjAzLTYuMjYgMC05LjQ2Ny0zLjg4NS05LjQ2Ny0zLjg4NWwxLjY2NS01LjU1czMuMjggMi44MyA2LjA3MyAyLjgzYTIuNDcgMi40NyAwIDAwMi41NjQtMi40OWMwLTQuMzQtNy4xLTQuNTI3LTcuMS0xMS42MTggMC01Ljk2MiA0LjI5OC0xMS43NyAxMi45MzQtMTEuNzcgMy4zOTQuMDUgNS4wMTggMSA1LjAxOCAxeiIvPjwvZz48L3N5bWJvbD48L3N2Zz4=" + }, + "typeVersion": 1, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ] + }, + { + "id": 126, + "name": "n8n-nodes-base.mautic", + "defaults": { + "name": "Mautic" + }, + "displayName": "Mautic", + "icon": "file:mautic.svg", + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1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jctNTEuODE5Yy0yLjM1NS02LjE4MywwLjg4My0xMi45NTUsNy4wNjYtMTUuMzFjNi4xODMtMi4zNTUsMTIuOTU0LDAuODgzLDE1LjMxLDcuMDY2DQoJYzcuMDY2LDE5LjEzOCwxMC42LDM5LjQ1MywxMC42LDYwLjA2M0MzNDkuNzc5LDI3MS4xNjcsMjcxLjQ2MiwzNDkuNzc5LDE3NC44OSwzNDkuNzc5Ii8+DQo8Zz4NCgk8cG9seWdvbiBmaWxsPSIjRkRCOTMzIiBwb2ludHM9IjI1MS40NCwxNTYuOTMgMjI0LjM1NCwxODUuMTk0IDIzOS4zNjksMjQ4LjQ5NiAyNzMuNTIyLDI0OC40OTYgCSIvPg0KPC9nPg0KPHBvbHlnb24gZmlsbD0iI0ZEQjkzMyIgcG9pbnRzPSIyNDAuMjUzLDczLjMxMiAyNDkuNjc0LDgyLjczNCAxNzQuODksMTYxLjkzNSAxMTAuOTk5LDk2LjI3NyA3NC4xOTYsMjQ4LjQ5NiAxMDguMzUsMjQ4LjQ5NiANCgkxMjguNjY1LDE2My45OTYgMTc0Ljg5LDIxNC4zNDMgMjczLjgxNywxMDYuNTgzIDI4My4yMzksMTE2LjI5OSAyOTIuNjYsNjMuMDA3ICIvPg0KPC9zdmc+DQo=" + }, + "typeVersion": 1, + "categories": [ + { + "id": 1, + "name": "Marketing & Content" + }, + { + "id": 6, + "name": "Communication" + } + ] + }, + { + "id": 235, + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "displayName": "WooCommerce Trigger", + "icon": "file:wooCommerce.svg", + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8v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yIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "typeVersion": 1, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ] + }, + { + "id": 325, + "name": "n8n-nodes-base.twitter", + "defaults": { + "name": "X" + }, + "displayName": "X (Formerly Twitter)", + "icon": "file:x.svg", + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K" + }, + "typeVersion": 2, + "categories": [ + { + "id": 1, + "name": "Marketing & Content" + } + ] + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "workflows": [ + { + "id": 1205, + "name": "Promote new Shopify products", + "views": 485, + "recentViews": 9850, + "totalViews": 485, + "createdAt": "2021-08-24T10:40:50.007Z", + "description": "This workflow automatically promotes your new Shopify products on Twitter and Telegram. This workflow is also featured in the blog post [*6 e-commerce workflows to power up your Shopify store*](https://n8n.io/blog/no-code-ecommerce-workflow-automations/#promote-your-new-products-on-social-media).\n\n## Prerequisites\n\n- A Shopify account and [credentials](https://docs.n8n.io/integrations/credentials/shopify/)\n- A Twitter account and [credentials](https://docs.n8n.io/integrations/credentials/twitter/)\n- A Telegram account and [credentials](https://docs.n8n.io/integrations/credentials/telegram/) for the channel you want to send messages to.\n\n## Nodes\n\n- [Shopify Trigger node](https://docs.n8n.io/integrations/trigger-nodes/n8n-nodes-base.shopifytrigger/) triggers the workflow when you create a new product in Shopify.\n- [Twitter node](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.twitter/) posts a tweet with the text \"Hey there, my design is now on a new product! Visit my {shop name} to get this cool {product title} (and check out more {product type})\".\n- [Telegram node](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.telegram/) posts a message with the same text as above in a Telegram channel.", + "workflow": { + "nodes": [ + { + "name": "Twitter", + "type": "n8n-nodes-base.twitter", + "position": [ + 720, + -220 + ], + "parameters": { + "text": "=Hey there, my design is now on a new product ✨\nVisit my {{$json[\"vendor\"]}} shop to get this cool{{$json[\"title\"]}} (and check out more {{$json[\"product_type\"]}}) 🛍️", + "additionalFields": {} + }, + "credentials": { + "twitterOAuth1Api": "twitter" + }, + "typeVersion": 1 + }, + { + "name": "Telegram", + "type": "n8n-nodes-base.telegram", + "position": [ + 720, + -20 + ], + "parameters": { + "text": "=Hey there, my design is now on a new product!\nVisit my {{$json[\"vendor\"]}} shop to get this cool{{$json[\"title\"]}} (and check out more {{$json[\"product_type\"]}})", + "chatId": "123456", + "additionalFields": {} + }, + "credentials": { + "telegramApi": "telegram_habot" + }, + "typeVersion": 1 + }, + { + "name": "product created", + "type": "n8n-nodes-base.shopifyTrigger", + "position": [ + 540, + -110 + ], + "webhookId": "2a7e0e50-8f09-4a2b-bf54-a849a6ac4fe0", + "parameters": { + "topic": "products/create" + }, + "credentials": { + "shopifyApi": "shopify_nodeqa" + }, + "typeVersion": 1 + } + ], + "connections": { + "product created": { + "main": [ + [ + { + "node": "Twitter", + "type": "main", + "index": 0 + }, + { + "node": "Telegram", + "type": "main", + "index": 0 + } + ] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 3, + "nodeTypes": { + "n8n-nodes-base.twitter": { + "count": 1 + }, + "n8n-nodes-base.telegram": { + "count": 1 + }, + "n8n-nodes-base.shopifyTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "lorenanda" + }, + "nodes": [ + { + "id": 49, + "icon": "file:telegram.svg", + "name": "n8n-nodes-base.telegram", + "defaults": { + "name": "Telegram" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjYgNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBzdHJva2U9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTAgMzJjMCAxNy42NzMgMTQuMzI3IDMyIDMyIDMyczMyLTE0LjMyNyAzMi0zMlM0OS42NzMgMCAzMiAwIDAgMTQuMzI3IDAgMzIiIGZpbGw9IiMzN2FlZTIiLz48cGF0aCBkPSJNMjEuNjYxIDM0LjMzOGwzLjc5NyAxMC41MDhzLjQ3NS45ODMuOTgzLjk4MyA4LjA2OC03Ljg2NCA4LjA2OC03Ljg2NGw4LjQwNy0xNi4yMzctMjEuMTE5IDkuODk4eiIgZmlsbD0iI2M4ZGFlYSIvPjxwYXRoIGQ9Ik0yNi42OTUgMzcuMDM0bC0uNzI5IDcuNzQ2cy0uMzA1IDIuMzczIDIuMDY4IDBsNC42NDQtNC4yMDMiIGZpbGw9IiNhOWM2ZDgiLz48cGF0aCBkPSJNMjEuNzMgMzQuNzEybC03LjgwOS0yLjU0NXMtLjkzMi0uMzc4LS42MzMtMS4yMzdjLjA2Mi0uMTc3LjE4Ni0uMzI4LjU1OS0uNTg4IDEuNzMxLTEuMjA2IDMyLjAyOC0xMi4wOTYgMzIuMDI4LTEyLjA5NnMuODU2LS4yODggMS4zNjEtLjA5N2MuMjMxLjA4OC4zNzguMTg3LjUwMy41NDguMDQ1LjEzMi4wNzEuNDExLjA2OC42ODktLjAwMy4yMDEtLjAyNy4zODYtLjA0NS42NzgtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg==" + }, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Telegram", + "typeVersion": 1 + }, + { + "id": 107, + "icon": "file:shopify.svg", + "name": "n8n-nodes-base.shopifyTrigger", + "defaults": { + "name": "Shopify Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTggNjYiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJl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PSIjOTViZjQ3Ii8+PHBhdGggZD0iTTQ4LjY5MSAxMS45NTdjLS4yMjUtLjAzNy01LjE3LS4zNzYtNS4xNy0uMzc2bC0zLjc3LTMuNzdhLjc1My43NTMgMCAwMC0uNTI3LS4yMjVMMzYuNDcyIDY0bDE5Ljc2My00LjI2LTYuOTgtNDcuMjE4YS42OC42OCAwIDAwLS41NjQtLjU2NHoiIGZpbGw9IiM1ZThlM2UiLz48cGF0aCBkPSJNMjkuNzU4IDIyLjlsLTIuNDU0IDcuMjQyYTExLjM2IDExLjM2IDAgMDAtNC43NTItMS4xMzNjLTMuODQ4IDAtNC4wMzYgMi40MTItNC4wMzYgMy4wMTggMCAzLjI5OCA4LjYzNiA0LjU2NCA4LjYzNiAxMi4zMzMgMCA2LjEtMy44ODUgMTAuMDMtOS4xIDEwLjAzLTYuMjYgMC05LjQ2Ny0zLjg4NS05LjQ2Ny0zLjg4NWwxLjY2NS01LjU1czMuMjggMi44MyA2LjA3MyAyLjgzYTIuNDcgMi40NyAwIDAwMi41NjQtMi40OWMwLTQuMzQtNy4xLTQuNTI3LTcuMS0xMS42MTggMC01Ljk2MiA0LjI5OC0xMS43NyAxMi45MzQtMTEuNzcgMy4zOTQuMDUgNS4wMTggMSA1LjAxOCAxeiIvPjwvZz48L3N5bWJvbD48L3N2Zz4=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "Shopify Trigger", + "typeVersion": 1 + }, + { + "id": 325, + "icon": "file:x.svg", + "name": "n8n-nodes-base.twitter", + "defaults": { + "name": "X" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K" + }, + "categories": [ + { + "id": 1, + "name": "Marketing & Content" + } + ], + "displayName": "X (Formerly Twitter)", + "typeVersion": 2 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + }, + { + "id": 19, + "name": "Marketing & Growth" + } + ], + "image": [ + { + "id": 527, + "url": "https://n8niostorageaccount.blob.core.windows.net/n8nio-strapi-blobs-prod/assets/89a078b208fe4c6181902608b1cd1332.png" + } + ] + }, + { + "id": 1456, + "name": "Add new customers from WooCommerce to Mautic", + "views": 333, + "recentViews": 9833, + "totalViews": 333, + "createdAt": "2022-02-17T15:00:40.748Z", + "description": "This workflow uses a WooCommerce trigger that will run when a new customer has been added, It will then add the customer to Mautic.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Mautic nodes.", + "workflow": { + "id": 83, + "name": "New WooCommerce Customer to Mautic", + "nodes": [ + { + "name": "Check for Existing", + "type": "n8n-nodes-base.mautic", + "position": [ + 280, + 480 + ], + "parameters": { + "options": { + "search": "={{$json[\"email\"]}}" + }, + "operation": "getAll", + "authentication": "oAuth2" + }, + "credentials": { + "mauticOAuth2Api": { + "id": "54", + "name": "Mautic account" + } + }, + "typeVersion": 1, + "alwaysOutputData": true + }, + { + "name": "If New", + "type": "n8n-nodes-base.if", + "position": [ + 460, + 480 + ], + "parameters": { + "conditions": { + "string": [ + { + "value1": "={{$json[\"id\"]}}", + "operation": "isEmpty" + } + ] + } + }, + "typeVersion": 1 + }, + { + "name": "Create Contact", + "type": "n8n-nodes-base.mautic", + "position": [ + 680, + 320 + ], + "parameters": { + "email": "={{$node[\"Customer Created\"].json[\"email\"]}}", + "company": "={{$node[\"Customer Created\"].json[\"billing\"][\"company\"]}}", + "options": {}, + "lastName": "={{$node[\"Customer Created\"].json[\"last_name\"]}}", + "firstName": "={{$node[\"Customer Created\"].json[\"first_name\"]}}", + "authentication": "oAuth2", + "additionalFields": {} + }, + "credentials": { + "mauticOAuth2Api": { + "id": "54", + "name": "Mautic account" + } + }, + "typeVersion": 1 + }, + { + "name": "Update Contact", + "type": "n8n-nodes-base.mautic", + "position": [ + 680, + 580 + ], + "parameters": { + "options": {}, + "contactId": "={{$json[\"id\"]}}", + "operation": "update", + "updateFields": { + "lastName": "={{$node[\"Customer Created or Updated\"].json[\"last_name\"]}}", + "firstName": "={{$node[\"Customer Created or Updated\"].json[\"first_name\"]}}" + }, + "authentication": "oAuth2" + }, + "credentials": { + "mauticOAuth2Api": { + "id": "54", + "name": "Mautic account" + } + }, + "typeVersion": 1 + }, + { + "name": "Customer Created or Updated", + "type": "n8n-nodes-base.wooCommerceTrigger", + "position": [ + 100, + 480 + ], + "webhookId": "5d89e322-a5e0-4cce-9eab-185e8375175b", + "parameters": { + "event": "customer.updated" + }, + "credentials": { + "wooCommerceApi": { + "id": "48", + "name": "WooCommerce account" + } + }, + "typeVersion": 1 + } + ], + "active": false, + "settings": { + "saveManualExecutions": true, + "saveExecutionProgress": true, + "saveDataSuccessExecution": "all" + }, + "connections": { + "If New": { + "main": [ + [ + { + "node": "Create Contact", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Update Contact", + "type": "main", + "index": 0 + } + ] + ] + }, + "Check for Existing": { + "main": [ + [ + { + "node": "If New", + "type": "main", + "index": 0 + } + ] + ] + }, + "Customer Created or Updated": { + "main": [ + [ + { + "node": "Check for Existing", + "type": "main", + "index": 0 + } + ] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 6, + "nodeTypes": { + "n8n-nodes-base.if": { + "count": 1 + }, + "n8n-nodes-base.mautic": { + "count": 3 + }, + "n8n-nodes-base.wooCommerceTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "jon-n8n" + }, + "nodes": [ + { + "id": 20, + "icon": "fa:map-signs", + "name": "n8n-nodes-base.if", + "defaults": { + "name": "IF", + "color": "#408000" + }, + "iconData": { + "icon": "map-signs", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "IF", + "typeVersion": 1 + }, + { + "id": 42, + "icon": "fa:play", + "name": "n8n-nodes-base.start", + "defaults": { + "name": "Start", + "color": "#00e000" + }, + "iconData": { + "icon": "play", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "Start", + "typeVersion": 1 + }, + { + "id": 126, + "icon": "file:mautic.svg", + "name": "n8n-nodes-base.mautic", + "defaults": { + "name": "Mautic" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMzQ5Ljc3OXB4IiBoZWlnaHQ9IjM0OS43NzlweCIgdmlld0JveD0iMCAwIDM0OS43NzkgMzQ5Ljc3OSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzQ5Ljc3OSAzNDkuNzc5Ig0KCSB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRk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2My45OTYgMTc0Ljg5LDIxNC4zNDMgMjczLjgxNywxMDYuNTgzIDI4My4yMzksMTE2LjI5OSAyOTIuNjYsNjMuMDA3ICIvPg0KPC9zdmc+DQo=" + }, + "categories": [ + { + "id": 1, + "name": "Marketing & Content" + }, + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Mautic", + "typeVersion": 1 + }, + { + "id": 235, + "icon": "file:wooCommerce.svg", + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIi8+CjxkYzp0aXRsZS8+CjwvY2M6V29yaz4KPC9yZGY6UkRGPgo8L21ldGFkYXRhPgo8cGF0aCBkPSJtMjMuNzU5IDBoMjA4LjM4YzEzLjE4NyAwIDIzLjg2MyAxMC42NzUgMjMuODYzIDIzLjg2M3Y3OS41NDJjMCAxMy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MTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "WooCommerce Trigger", + "typeVersion": 1 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "image": [] + }, + { + "id": 1459, + "name": "Notify on Telegram and Twitter when new order is added in WooCommerce", + "views": 620, + "recentViews": 9823, + "totalViews": 620, + "createdAt": "2022-02-17T15:02:14.961Z", + "description": "This workflow uses a WooCommerce trigger that will run a new product has been added, It will then post the product to Telegram and Twitter.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce, Twitter and Telegram nodes.", + "workflow": { + "id": 85, + "name": "New WooCommerce Product to Twitter and Telegram", + "nodes": [ + { + "name": "Twitter", + "type": "n8n-nodes-base.twitter", + "position": [ + 720, + 300 + ], + "parameters": { + "text": "=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.", + "additionalFields": {} + }, + "credentials": { + "twitterOAuth1Api": { + "id": "37", + "name": "joffcom" + } + }, + "typeVersion": 1 + }, + { + "name": "Telegram", + "type": "n8n-nodes-base.telegram", + "position": [ + 720, + 500 + ], + "parameters": { + "text": "=✨ New Product Announcement ✨\nWe have just added {{$json[\"name\"]}}, Head to {{$json[\"permalink\"]}} to find out more.", + "chatId": "123456", + "additionalFields": {} + }, + "credentials": { + "telegramApi": { + "id": "56", + "name": "Telegram account" + } + }, + "typeVersion": 1 + }, + { + "name": "WooCommerce Trigger", + "type": "n8n-nodes-base.wooCommerceTrigger", + "position": [ + 540, + 400 + ], + "webhookId": "ab7b134b-9b2d-4e0d-b496-1aee30db0808", + "parameters": { + "event": "product.created" + }, + "credentials": { + "wooCommerceApi": { + "id": "48", + "name": "WooCommerce account" + } + }, + "typeVersion": 1 + } + ], + "active": false, + "settings": {}, + "connections": { + "WooCommerce Trigger": { + "main": [ + [ + { + "node": "Twitter", + "type": "main", + "index": 0 + }, + { + "node": "Telegram", + "type": "main", + "index": 0 + } + ] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 4, + "nodeTypes": { + "n8n-nodes-base.twitter": { + "count": 1 + }, + "n8n-nodes-base.telegram": { + "count": 1 + }, + "n8n-nodes-base.wooCommerceTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "jon-n8n" + }, + "nodes": [ + { + "id": 42, + "icon": "fa:play", + "name": "n8n-nodes-base.start", + "defaults": { + "name": "Start", + "color": "#00e000" + }, + "iconData": { + "icon": "play", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "Start", + "typeVersion": 1 + }, + { + "id": 49, + "icon": "file:telegram.svg", + "name": "n8n-nodes-base.telegram", + "defaults": { + "name": "Telegram" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHht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gtLjE4NCAyLjk3OC01LjcwNiAyNS4xOTgtNS43MDYgMjUuMTk4cy0uMzMgMS4zLTEuNTE0IDEuMzQ1Yy0uNDMyLjAxNi0uOTU2LS4wNzEtMS41ODItLjYxLTIuMzIzLTEuOTk4LTEwLjM1Mi03LjM5NC0xMi4xMjYtOC41OGEuMzQuMzQgMCAwMS0uMTQ2LS4yMzljLS4wMjUtLjEyNS4xMDgtLjI4LjEwOC0uMjhzMTMuOTgtMTIuNDI3IDE0LjM1Mi0xMy43MzFjLjAyOS0uMTAxLS4wNzktLjE1MS0uMjI2LS4xMDctLjkyOS4zNDItMTcuMDI1IDEwLjUwNi0xOC44MDEgMTEuNjI5LS4xMDQuMDY2LS4zOTUuMDIzLS4zOTUuMDIzIi8+PC9nPjwvc3ltYm9sPjwvc3ZnPg==" + }, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Telegram", + "typeVersion": 1 + }, + { + "id": 235, + "icon": "file:wooCommerce.svg", + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpm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NSAxNC44ODEgNC45OTUxIDIwLjYwNSAzLjc0NjMgNi41NTYxIDkuMjYxOCAxMC41MTEgMTYuNjUgMTIuMDcyIDEuOTc3MiAwLjQxNjI2IDMuODUwNCAwLjYyNDM5IDUuNjE5NSAwLjYyNDM5IDEwLjA5NCAwIDE4LjIxMS01LjIwMzMgMjQuNDU1LTE1LjYxIDUuNDExNC04Ljk0OTYgOC4xMTcxLTE4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "WooCommerce Trigger", + "typeVersion": 1 + }, + { + "id": 325, + "icon": "file:x.svg", + "name": "n8n-nodes-base.twitter", + "defaults": { + "name": "X" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE4LjI0NCAyLjI1aDMuMzA4bC03LjIyNyA4LjI2IDguNTAyIDExLjI0SDE2LjE3bC01LjIxNC02LjgxN0w0Ljk5IDIxLjc1SDEuNjhsNy43My04LjgzNUwxLjI1NCAyLjI1SDguMDhsNC43MTMgNi4yMzF6bS0xLjE2MSAxNy41MmgxLjgzM0w3LjA4NCA0LjEyNkg1LjExN3oiPjwvcGF0aD48L3N2Zz4K" + }, + "categories": [ + { + "id": 1, + "name": "Marketing & Content" + } + ], + "displayName": "X (Formerly Twitter)", + "typeVersion": 2 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + }, + { + "id": 19, + "name": "Marketing & Growth" + } + ], + "image": [] + }, + { + "id": 1457, + "name": "Notify on Slack when new order is registered in WooCommerce", + "views": 178, + "recentViews": 9787, + "totalViews": 178, + "createdAt": "2022-02-17T15:01:13.489Z", + "description": "This workflow uses a WooCommerce trigger that will run when an order has been placed.\n\nIf the value of this is over 100 it will post it to a Slack channel.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Slack nodes, You will also need to pick a channel to post the message to.", + "workflow": { + "id": 81, + "name": "New WooCommerce order to Slack", + "nodes": [ + { + "name": "Order Created", + "type": "n8n-nodes-base.wooCommerceTrigger", + "position": [ + 340, + 500 + ], + "webhookId": "287b4bf4-67ec-4c97-85d9-c0d3e6f59e6b", + "parameters": { + "event": "order.created" + }, + "credentials": { + "wooCommerceApi": { + "id": "48", + "name": "WooCommerce account" + } + }, + "typeVersion": 1 + }, + { + "name": "Send to Slack", + "type": "n8n-nodes-base.slack", + "position": [ + 780, + 480 + ], + "parameters": { + "text": ":sparkles: There is a new order :sparkles:", + "channel": "woo-commerce", + "blocksUi": { + "blocksValues": [] + }, + "attachments": [ + { + "color": "#66FF00", + "fields": { + "item": [ + { + "short": true, + "title": "Order ID", + "value": "={{$json[\"id\"]}}" + }, + { + "short": true, + "title": "Status", + "value": "={{$json[\"status\"]}}" + }, + { + "short": true, + "title": "Total", + "value": "={{$json[\"currency_symbol\"]}}{{$json[\"total\"]}}" + }, + { + "short": false, + "title": "Link", + "value": "={{$node[\"Order Created\"].json[\"_links\"][\"self\"][0][\"href\"]}}" + } + ] + }, + "footer": "=*Ordered:* {{$json[\"date_created\"]}} | *Transaction ID:* {{$json[\"transaction_id\"]}}" + } + ], + "otherOptions": {} + }, + "credentials": { + "slackApi": { + "id": "53", + "name": "Slack Access Token" + } + }, + "typeVersion": 1 + }, + { + "name": "Price over 100", + "type": "n8n-nodes-base.if", + "position": [ + 540, + 500 + ], + "parameters": { + "conditions": { + "number": [ + { + "value1": "={{$json[\"total\"]}}", + "value2": 100, + "operation": "largerEqual" + } + ] + } + }, + "typeVersion": 1 + } + ], + "active": false, + "settings": { + "saveManualExecutions": true, + "saveExecutionProgress": true, + "saveDataSuccessExecution": "all" + }, + "connections": { + "Order Created": { + "main": [ + [ + { + "node": "Price over 100", + "type": "main", + "index": 0 + } + ] + ] + }, + "Price over 100": { + "main": [ + [ + { + "node": "Send to Slack", + "type": "main", + "index": 0 + } + ], + [] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 4, + "nodeTypes": { + "n8n-nodes-base.if": { + "count": 1 + }, + "n8n-nodes-base.slack": { + "count": 1 + }, + "n8n-nodes-base.wooCommerceTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "jon-n8n" + }, + "nodes": [ + { + "id": 20, + "icon": "fa:map-signs", + "name": "n8n-nodes-base.if", + "defaults": { + "name": "IF", + "color": "#408000" + }, + "iconData": { + "icon": "map-signs", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "IF", + "typeVersion": 1 + }, + { + "id": 40, + "icon": "file:slack.svg", + "name": "n8n-nodes-base.slack", + "defaults": { + "name": "Slack" + }, + "iconData": { + "type": "file", + "fileB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ODE1VjI5LjYzSDU1LjU1NmMtOC4yMDcgMC0xNC44MTUtNi42MDctMTQuODE1LTE0LjgxNVM0Ny4zNDggMCA1NS41NTYgMHMxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+" + }, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Slack", + "typeVersion": 2 + }, + { + "id": 42, + "icon": "fa:play", + "name": "n8n-nodes-base.start", + "defaults": { + "name": "Start", + "color": "#00e000" + }, + "iconData": { + "icon": "play", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "Start", + "typeVersion": 1 + }, + { + "id": 235, + "icon": "file:wooCommerce.svg", + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3Vy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TIuMDcyIDEuOTc3MiAwLjQxNjI2IDMuODUwNCAwLjYyNDM5IDUuNjE5NSAwLjYyNDM5IDEwLjA5NCAwIDE4LjIxMS01LjIwMzMgMjQuNDU1LTE1LjYxIDUuNDExNC04Ljk0OTYgOC4xMTcxLTE4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "WooCommerce Trigger", + "typeVersion": 1 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "image": [] + }, + { + "id": 1765, + "name": "Get Slack notifications when new product published on WooCommerce", + "views": 79, + "recentViews": 9577, + "totalViews": 79, + "createdAt": "2022-08-12T12:36:53.409Z", + "description": "This workflow let's a bot in Slack notify a specific channel when a new product in WooCommerce is published and live on the site. \n\n## Prerequisites\n\n[WooCommerce](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.woocommercetrigger/) account\n[Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/) and a [Slack bot](https://slack.com/help/articles/115005265703-Create-a-bot-for-your-workspace)\n\n## How it works\n\n1. Listen for WooCommerce product creation\n2. If permalink starts with https://[your-url-here].com/product/\n3. Slack bot notifies channel that a new product has been added. \n\nPlease note, you must update the URL in the IF node to match your url. If your WooCommerce doesn't use the slug /product/, that will need to be updated too. \n", + "workflow": { + "id": 1016, + "name": "Woocommerce to slack: notify new product created", + "tags": [ + { + "id": "5", + "name": "FVF", + "createdAt": "2022-07-30T07:43:44.795Z", + "updatedAt": "2022-07-30T07:43:44.795Z" + } + ], + "nodes": [ + { + "name": "If URL has /product/", + "type": "n8n-nodes-base.if", + "position": [ + 640, + 300 + ], + "parameters": { + "conditions": { + "string": [ + { + "value1": "={{$json[\"permalink\"]}}", + "value2": "https://[add-your-url-here]/product/", + "operation": "startsWith" + } + ] + } + }, + "typeVersion": 1 + }, + { + "name": "Send message to slack", + "type": "n8n-nodes-base.slack", + "position": [ + 920, + 260 + ], + "parameters": { + "text": ":new: A new product has been added! :new:", + "channel": "newproducts", + "blocksUi": { + "blocksValues": [] + }, + "attachments": [ + { + "color": "#66FF00", + "fields": { + "item": [ + { + "short": false, + "title": "Name", + "value": "={{$json[\"name\"]}}" + }, + { + "short": true, + "title": "Price", + "value": "={{$json[\"regular_price\"]}}" + }, + { + "short": true, + "title": "Sale Price", + "value": "={{$json[\"sale_price\"]}}" + }, + { + "short": false, + "title": "Link", + "value": "={{$json[\"permalink\"]}}" + } + ] + }, + "footer": "=Added: {{$json[\"date_created\"]}}" + } + ], + "otherOptions": {} + }, + "credentials": { + "slackApi": { + "id": "21", + "name": "FVF bot" + } + }, + "typeVersion": 1 + }, + { + "name": "On product creation", + "type": "n8n-nodes-base.wooCommerceTrigger", + "position": [ + 460, + 300 + ], + "webhookId": "267c4855-6227-4d33-867e-74600097473e", + "parameters": { + "event": "product.created" + }, + "credentials": { + "wooCommerceApi": { + "id": "20", + "name": "WooCommerce account FVF" + } + }, + "typeVersion": 1 + } + ], + "active": true, + "settings": {}, + "connections": { + "On product creation": { + "main": [ + [ + { + "node": "If URL has /product/", + "type": "main", + "index": 0 + } + ] + ] + }, + "If URL has /product/": { + "main": [ + [ + { + "node": "Send message to slack", + "type": "main", + "index": 0 + } + ] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 4, + "nodeTypes": { + "n8n-nodes-base.if": { + "count": 1 + }, + "n8n-nodes-base.slack": { + "count": 1 + }, + "n8n-nodes-base.wooCommerceTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "n8n-team" + }, + "nodes": [ + { + "id": 20, + "icon": "fa:map-signs", + "name": "n8n-nodes-base.if", + "defaults": { + "name": "IF", + "color": "#408000" + }, + "iconData": { + "icon": "map-signs", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "IF", + "typeVersion": 1 + }, + { + "id": 40, + "icon": "file:slack.svg", + "name": "n8n-nodes-base.slack", + "defaults": { + "name": "Slack" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTUwLjg1MiAxNTAuODUyIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIHhsaW5rOmhyZWY9IiNhIiB4PSIuOTI2IiB5PSIuOTI2Ii8+PHN5bWJvbCBpZD0iYSIgb3ZlcmZsb3c9InZpc2libGUiP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ibWl0ZXIiPjxwYXRoIGQ9Ik03Ny43NzggMTMzLjMzM2MwIDguMjA4IDYuNjA3IDE0LjgxNSAxNC44MTUgMTQuODE1czE0LjgxNS02LjYwNyAxNC44MTUtMTQuODE1LTYuNjA3LTE0LjgxNS0xNC44MTUtMTQuODE1SDc3Ljc3OHoiIGZpbGw9IiNlY2IyMmQiIHN0cm9rZT0iI2VjYjIyZCIvPjxwYXRoIGQ9Ik0xMzMuMzM0IDcwLjM3MWgtMTQuODE1VjU1LjU1NmMwLTguMjA3IDYuNjA3LTE0LjgxNSAxNC44MTUtMTQuODE1czE0LjgxNSA2LjYwNyAxNC44MTUgMTQuODE1LTYuNjA3IDE0LjgxNS0xNC44MTUgMTQuODE1eiIgZmlsbD0iIzJmYjY3YyIgc3Ryb2tlPSIjMmZiNjdjIi8+PHBhdGggZD0iTTE0LjgxNSA3Ny43NzhIMjkuNjN2MTQuODE1YzAgOC4yMDctNi42MDcgMTQuODE1LTE0LjgxNSAxNC44MTVTMCAxMDAuOCAwIDkyLjU5M3M2LjYwNy0xNC44MTUgMTQuODE1LTE0LjgxNXoiIGZpbGw9IiNlMDFlNWEiIHN0cm9rZT0iI2UwMWU1YSIvPjxwYXRoIGQ9Ik03MC4zNzEgMTQuODE1VjI5LjYzSDU1LjU1NmMtOC4yMDcgMC0xNC44MTUtNi42MDctMTQuODE1LTE0LjgxNVM0Ny4zNDggMCA1NS41NTYgMHMxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+" + }, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Slack", + "typeVersion": 2 + }, + { + "id": 42, + "icon": "fa:play", + "name": "n8n-nodes-base.start", + "defaults": { + "name": "Start", + "color": "#00e000" + }, + "iconData": { + "icon": "play", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "Start", + "typeVersion": 1 + }, + { + "id": 235, + "icon": "file:wooCommerce.svg", + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0Pgo8ZGM6dHlwZSByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIi8+CjxkYzp0aXRsZS8+CjwvY2M6V29yaz4KPC9yZGY6UkRGPgo8L21ldGFkYXRhPgo8cGF0aCBkPSJtMjMuNzU5IDBoMjA4LjM4YzEzLjE4NyAwIDIzLjg2MyAxMC42NzUgMjMuODYzIDIzLjg2M3Y3OS41NDJjMCAxMy4xODctMTAuNjc1IDIzLjg2My0yMy44NjMgMjMuODYzaC03NC43MjdsMTAuMjU3IDI1LjExOC00NS4xMDktMjUuMTE4aC05OC42OTVjLTEzLjE4NyAwLTIzLjg2My0xMC42NzUtMjMuODYzLTIzLjg2M3YtNzkuNTQyYy0wLjEwNDY2LTEz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C02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "WooCommerce Trigger", + "typeVersion": 1 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "image": [] + }, + { + "id": 1460, + "name": "Notify on Slack when refund is registered in WooCommerce", + "views": 85, + "recentViews": 9541, + "totalViews": 85, + "createdAt": "2022-02-17T15:02:58.662Z", + "description": "This workflow uses a WooCommerce trigger that will run when an order has been updated and the status is refunded.\n\nIf the value of this is over 100 it will post it to a Slack channel.\n\nTo use this workflow you will need to set the credentials to use for the WooCommerce and Slack nodes, You will also need to pick a channel to post the message to.", + "workflow": { + "id": 82, + "name": "New WooCommerce refund to Slack", + "nodes": [ + { + "name": "Order Updated", + "type": "n8n-nodes-base.wooCommerceTrigger", + "position": [ + 320, + 500 + ], + "webhookId": "f7736be3-e978-4a17-b936-7ce9f8ccdb72", + "parameters": { + "event": "order.updated" + }, + "credentials": { + "wooCommerceApi": { + "id": "48", + "name": "WooCommerce account" + } + }, + "typeVersion": 1 + }, + { + "name": "If Refund and Over 100", + "type": "n8n-nodes-base.if", + "position": [ + 540, + 500 + ], + "parameters": { + "conditions": { + "number": [ + { + "value1": "={{$json[\"total\"]}}", + "value2": 100, + "operation": "largerEqual" + } + ], + "string": [ + { + "value1": "={{$json[\"status\"]}}", + "value2": "refunded" + } + ] + } + }, + "typeVersion": 1 + }, + { + "name": "Send to Slack", + "type": "n8n-nodes-base.slack", + "position": [ + 780, + 480 + ], + "parameters": { + "text": ":x: A refund has been issued :x:", + "channel": "woo-commerce", + "blocksUi": { + "blocksValues": [] + }, + "attachments": [ + { + "color": "#FF0000", + "fields": { + "item": [ + { + "short": true, + "title": "Order ID", + "value": "={{$json[\"id\"]}}" + }, + { + "short": true, + "title": "Status", + "value": "={{$json[\"status\"]}}" + }, + { + "short": true, + "title": "Total", + "value": "={{$json[\"currency_symbol\"]}}{{$json[\"total\"]}}" + } + ] + }, + "footer": "=*Order updated:* {{$json[\"date_modified\"]}}" + } + ], + "otherOptions": {} + }, + "credentials": { + "slackApi": { + "id": "53", + "name": "Slack Access Token" + } + }, + "typeVersion": 1 + } + ], + "active": false, + "settings": { + "saveManualExecutions": true, + "saveExecutionProgress": true, + "saveDataSuccessExecution": "all" + }, + "connections": { + "Order Updated": { + "main": [ + [ + { + "node": "If Refund and Over 100", + "type": "main", + "index": 0 + } + ] + ] + }, + "If Refund and Over 100": { + "main": [ + [ + { + "node": "Send to Slack", + "type": "main", + "index": 0 + } + ], + [] + ] + } + } + }, + "workflowInfo": { + "nodeCount": 4, + "nodeTypes": { + "n8n-nodes-base.if": { + "count": 1 + }, + "n8n-nodes-base.slack": { + "count": 1 + }, + "n8n-nodes-base.wooCommerceTrigger": { + "count": 1 + } + } + }, + "user": { + "username": "jon-n8n" + }, + "nodes": [ + { + "id": 20, + "icon": "fa:map-signs", + "name": "n8n-nodes-base.if", + "defaults": { + "name": "IF", + "color": "#408000" + }, + "iconData": { + "icon": "map-signs", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "IF", + "typeVersion": 1 + }, + { + "id": 40, + "icon": "file:slack.svg", + "name": "n8n-nodes-base.slack", + "defaults": { + "name": "Slack" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTUwLjg1MiAxNTAuODUyIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIHhsaW5rOmhyZWY9IiNhIiB4PSIuOTI2IiB5PSIuOTI2Ii8+PHN5bWJvbCBpZD0iYSIgb3ZlcmZsb3c9InZpc2libGUiPjxnIHN0cm9rZS13aWR0aD0iMS44NTIiPjxwYXRoIGQ9Ik00MC43NDEgOTMuNTVjMC04LjczNSA2LjYwNy0xNS43NzIgMTQuODE1LTE1Ljc3MnMxNC44MTUgNy4wMzcgMTQuODE1IDE1Ljc3MnYzOC44MjRjMCA4LjczNy02LjYwNyAxNS43NzQtMTQuODE1IDE1Ljc3NHMtMTQuODE1LTcuMDM3LTE0LjgxNS0xNS43NzJ6IiBmaWxsPSIjZTAxZTVhIiBzdHJva2U9IiNlMDFlNWEiLz48cGF0aCBkPSJNOTMuNTUgMTA3LjQwOGMtOC43MzUgMC0xNS43NzItNi42MDctMTUuNzcyLTE0LjgxNXM3LjAzNy0xNC44MTUgMTUuNzcyLTE0LjgxNWgzOC44MjZjOC43MzUgMCAxNS43NzIgNi42MDcgMTUuNzcyIDE0LjgxNXMtNy4wMzcgMTQuODE1LTE1Ljc3MiAxNC44MTV6IiBmaWxsPSIjZWNiMjJkIiBzdHJva2U9IiNlY2IyMmQiLz48cGF0aCBkPSJNNzcuNzc4IDE1Ljc3MkM3Ny43NzggNy4wMzcgODQuMzg1IDAgOTIuNTkzIDBzMTQuODE1IDcuMDM3I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2UwMWU1YSIvPjxwYXRoIGQ9Ik03MC4zNzEgMTQuODE1VjI5LjYzSDU1LjU1NmMtOC4yMDcgMC0xNC44MTUtNi42MDctMTQuODE1LTE0LjgxNVM0Ny4zNDggMCA1NS41NTYgMHMxNC44MTUgNi42MDcgMTQuODE1IDE0LjgxNXoiIGZpbGw9IiMzNmM1ZjEiIHN0cm9rZT0iIzM2YzVmMSIvPjwvZz48L2c+PC9zeW1ib2w+PC9zdmc+" + }, + "categories": [ + { + "id": 6, + "name": "Communication" + } + ], + "displayName": "Slack", + "typeVersion": 2 + }, + { + "id": 42, + "icon": "fa:play", + "name": "n8n-nodes-base.start", + "defaults": { + "name": "Start", + "color": "#00e000" + }, + "iconData": { + "icon": "play", + "type": "icon" + }, + "categories": [ + { + "id": 9, + "name": "Core Nodes" + } + ], + "displayName": "Start", + "typeVersion": 1 + }, + { + "id": 235, + "icon": "file:wooCommerce.svg", + "name": "n8n-nodes-base.wooCommerceTrigger", + "defaults": { + "name": "WooCommerce Trigger" + }, + "iconData": { + "type": "file", + "fileBuffer": "data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIC01MCAyNTYgMjUzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KPHRpdGxlPldvb0NvbW1lcmNlIExvZ288L3RpdGxlPgo8bWV0YWRhdGE+CjxyZGY6UkRGPgo8Y2M6V29yayByZGY6YWJvdXQ9IiI+CjxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZG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0NjMgNi41NTYxIDkuMjYxOCAxMC41MTEgMTYuNjUgMTIuMDcyIDEuOTc3MiAwLjQxNjI2IDMuODUwNCAwLjYyNDM5IDUuNjE5NSAwLjYyNDM5IDEwLjA5NCAwIDE4LjIxMS01LjIwMzMgMjQuNDU1LTE1LjYxIDUuNDExNC04Ljk0OTYgOC4xMTcxLTE4LjczMiA4LjExNzEtMjkuNDUgMC04LjExNzEtMS42NjUtMTQuODgxLTQuOTk1MS0yMC41MDF6bS0xMy4yMTYgMjguODI2Yy0xLjQ1NjkgNi44NjgzLTQuMDU4NSAxMS45NjctNy45MDg5IDE1LjQwMi0zLjAxNzkgMi43MDU3LTUuODI3NiAzLjg1MDQtOC40MjkzIDMuMzMwMS0yLjQ5NzYtMC41MjAzMy00LjU3ODktMi43MDU3LTYuMTM5OC02Ljc2NDItMS4yNDg4LTMuMjI2LTEuODczMi02LjQ1Mi0xLjg3MzItOS40Njk5IDAtMi42MDE2IDAuMjA4MTMtNS4yMDMzIDAuNzI4NDYtNy41OTY3IDAuOTM2NTgtNC4yNjY3IDIuNzA1Ny04LjQyOTMgNS41MTU0LTEyLjM4NCAzLjQzNDEtNS4wOTkyIDcuMDc2NC03LjE4MDUgMTAuODIzLTYuNDUyIDIuNDk3NiAwLjUyMDMzIDQuNTc4OSAyLjcwNTcgNi4xMzk4IDYuNzY0MiAxLjI0ODggMy4yMjYgMS44NzMyIDYuNDUyIDEuODczMiA5LjQ2OTkgMC4xMDQwNiAyLjcwNTctMC4yMDgxMyA1LjMwNzMtMC43Mjg0NiA3LjcwMDh6IiBmaWxsPSIjZmZmIi8+Cjwvc3ZnPgo=" + }, + "categories": [ + { + "id": 2, + "name": "Sales" + } + ], + "displayName": "WooCommerce Trigger", + "typeVersion": 1 + } + ], + "categories": [ + { + "id": 2, + "name": "Sales" + }, + { + "id": 8, + "name": "Finance & Accounting" + } + ], + "image": [] + } + ], + "image": [] + } +} diff --git a/cypress/fixtures/Test_Template_1.json b/cypress/fixtures/Test_Template_1.json index f15970677e1d5..1995beca5291a 100644 --- a/cypress/fixtures/Test_Template_1.json +++ b/cypress/fixtures/Test_Template_1.json @@ -1,7 +1,7 @@ { "workflow": { "id": 1205, - "name": "Promote new Shopify products on Twitter and Telegram", + "name": "Promote new Shopify products", "views": 478, "recentViews": 9880, "totalViews": 478, diff --git a/cypress/fixtures/templates_search/sales_templates_search_response.json b/cypress/fixtures/templates_search/sales_templates_search_response.json index 4efbb3585b504..d4f90991b31c8 100644 --- a/cypress/fixtures/templates_search/sales_templates_search_response.json +++ b/cypress/fixtures/templates_search/sales_templates_search_response.json @@ -1202,7 +1202,7 @@ }, { "id": 1205, - "name": "Promote New Shopify Products on Social Media (Twitter and Telegram)", + "name": "Promote New Shopify Products", "totalViews": 219, "recentViews": 0, "user": { diff --git a/packages/@n8n/api-types/src/push/execution.ts b/packages/@n8n/api-types/src/push/execution.ts index 3c7459dec5715..9c723e2817f8a 100644 --- a/packages/@n8n/api-types/src/push/execution.ts +++ b/packages/@n8n/api-types/src/push/execution.ts @@ -12,6 +12,13 @@ type ExecutionStarted = { }; }; +type ExecutionWaiting = { + type: 'executionWaiting'; + data: { + executionId: string; + }; +}; + type ExecutionFinished = { type: 'executionFinished'; data: { @@ -45,6 +52,7 @@ type NodeExecuteAfter = { export type ExecutionPushMessage = | ExecutionStarted + | ExecutionWaiting | ExecutionFinished | ExecutionRecovered | NodeExecuteBefore diff --git a/packages/@n8n/config/src/configs/diagnostics.config.ts b/packages/@n8n/config/src/configs/diagnostics.config.ts new file mode 100644 index 0000000000000..58e4740b35191 --- /dev/null +++ b/packages/@n8n/config/src/configs/diagnostics.config.ts @@ -0,0 +1,30 @@ +import { Config, Env, Nested } from '../decorators'; + +@Config +class PostHogConfig { + /** API key for PostHog. */ + @Env('N8N_DIAGNOSTICS_POSTHOG_API_KEY') + apiKey: string = 'phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo'; + + /** API host for PostHog. */ + @Env('N8N_DIAGNOSTICS_POSTHOG_API_HOST') + apiHost: string = 'https://ph.n8n.io'; +} + +@Config +export class DiagnosticsConfig { + /** Whether diagnostics are enabled. */ + @Env('N8N_DIAGNOSTICS_ENABLED') + enabled: boolean = false; + + /** Diagnostics config for frontend. */ + @Env('N8N_DIAGNOSTICS_CONFIG_FRONTEND') + frontendConfig: string = '1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io'; + + /** Diagnostics config for backend. */ + @Env('N8N_DIAGNOSTICS_CONFIG_BACKEND') + backendConfig: string = '1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io'; + + @Nested + posthogConfig: PostHogConfig; +} diff --git a/packages/@n8n/config/src/configs/runners.config.ts b/packages/@n8n/config/src/configs/runners.config.ts index 5a6969ba6f28c..b7d125cf53518 100644 --- a/packages/@n8n/config/src/configs/runners.config.ts +++ b/packages/@n8n/config/src/configs/runners.config.ts @@ -53,4 +53,12 @@ export class TaskRunnersConfig { /** Should the output of deduplication be asserted for correctness */ @Env('N8N_RUNNERS_ASSERT_DEDUPLICATION_OUTPUT') assertDeduplicationOutput: boolean = false; + + /** How long (in seconds) a task is allowed to take for completion, else the task will be aborted and the runner restarted. Must be greater than 0. */ + @Env('N8N_RUNNERS_TASK_TIMEOUT') + taskTimeout: number = 60; + + /** How often (in seconds) the runner must send a heartbeat to the broker, else the task will be aborted and the runner restarted. Must be greater than 0. */ + @Env('N8N_RUNNERS_HEARTBEAT_INTERVAL') + heartbeatInterval: number = 30; } diff --git a/packages/@n8n/config/src/index.ts b/packages/@n8n/config/src/index.ts index 0a89535ee32ab..a1c0a1f43bed6 100644 --- a/packages/@n8n/config/src/index.ts +++ b/packages/@n8n/config/src/index.ts @@ -1,6 +1,7 @@ import { CacheConfig } from './configs/cache.config'; import { CredentialsConfig } from './configs/credentials.config'; import { DatabaseConfig } from './configs/database.config'; +import { DiagnosticsConfig } from './configs/diagnostics.config'; import { EndpointsConfig } from './configs/endpoints.config'; import { EventBusConfig } from './configs/event-bus.config'; import { ExternalSecretsConfig } from './configs/external-secrets.config'; @@ -117,4 +118,7 @@ export class GlobalConfig { @Nested pruning: PruningConfig; + + @Nested + diagnostics: DiagnosticsConfig; } diff --git a/packages/@n8n/config/test/config.test.ts b/packages/@n8n/config/test/config.test.ts index eeb98269dedd8..c60431e97a9b0 100644 --- a/packages/@n8n/config/test/config.test.ts +++ b/packages/@n8n/config/test/config.test.ts @@ -234,6 +234,8 @@ describe('GlobalConfig', () => { maxOldSpaceSize: '', maxConcurrency: 5, assertDeduplicationOutput: false, + taskTimeout: 60, + heartbeatInterval: 30, }, sentry: { backendDsn: '', @@ -280,6 +282,15 @@ describe('GlobalConfig', () => { hardDeleteInterval: 15, softDeleteInterval: 60, }, + diagnostics: { + enabled: false, + frontendConfig: '1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io', + backendConfig: '1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io', + posthogConfig: { + apiKey: 'phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo', + apiHost: 'https://ph.n8n.io', + }, + }, }; it('should use all default values when no env variables are defined', () => { diff --git a/packages/@n8n/nodes-langchain/credentials/AnthropicApi.credentials.ts b/packages/@n8n/nodes-langchain/credentials/AnthropicApi.credentials.ts index 2ee2aa94dc3ce..80bea68713096 100644 --- a/packages/@n8n/nodes-langchain/credentials/AnthropicApi.credentials.ts +++ b/packages/@n8n/nodes-langchain/credentials/AnthropicApi.credentials.ts @@ -35,15 +35,15 @@ export class AnthropicApi implements ICredentialType { test: ICredentialTestRequest = { request: { baseURL: 'https://api.anthropic.com', - url: '/v1/complete', + url: '/v1/messages', method: 'POST', headers: { 'anthropic-version': '2023-06-01', }, body: { - model: 'claude-2', - prompt: '\n\nHuman: Hello, world!\n\nAssistant:', - max_tokens_to_sample: 256, + model: 'claude-3-haiku-20240307', + messages: [{ role: 'user', content: 'Hey' }], + max_tokens: 1, }, }, }; diff --git a/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts b/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts index 28608524c8e1c..1dbc62b4ed56a 100644 --- a/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts +++ b/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts @@ -30,6 +30,13 @@ export class AzureOpenAiApi implements ICredentialType { required: true, default: '2023-07-01-preview', }, + { + displayName: 'Endpoint', + name: 'endpoint', + type: 'string', + default: undefined, + placeholder: 'https://westeurope.api.cognitive.microsoft.com', + }, ]; authenticate: IAuthenticateGeneric = { diff --git a/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.ts index a75a93c9f4058..bf101292f2e05 100644 --- a/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.ts @@ -87,6 +87,36 @@ export class EmbeddingsAzureOpenAi implements INodeType { 'Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.', type: 'number', }, + { + displayName: 'Dimensions', + name: 'dimensions', + default: undefined, + description: + 'The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.', + type: 'options', + options: [ + { + name: '256', + value: 256, + }, + { + name: '512', + value: 512, + }, + { + name: '1024', + value: 1024, + }, + { + name: '1536', + value: 1536, + }, + { + name: '3072', + value: 3072, + }, + ], + }, ], }, ], @@ -98,6 +128,7 @@ export class EmbeddingsAzureOpenAi implements INodeType { apiKey: string; resourceName: string; apiVersion: string; + endpoint?: string; }>('azureOpenAiApi'); const modelName = this.getNodeParameter('model', itemIndex) as string; @@ -105,6 +136,7 @@ export class EmbeddingsAzureOpenAi implements INodeType { batchSize?: number; stripNewLines?: boolean; timeout?: number; + dimensions?: number | undefined; }; if (options.timeout === -1) { @@ -113,9 +145,15 @@ export class EmbeddingsAzureOpenAi implements INodeType { const embeddings = new OpenAIEmbeddings({ azureOpenAIApiDeploymentName: modelName, - azureOpenAIApiInstanceName: credentials.resourceName, + // instance name only needed to set base url + azureOpenAIApiInstanceName: !credentials.endpoint ? credentials.resourceName : undefined, azureOpenAIApiKey: credentials.apiKey, azureOpenAIApiVersion: credentials.apiVersion, + // azureOpenAIEndpoint and configuration.baseURL are both ignored here + // only setting azureOpenAIBasePath worked + azureOpenAIBasePath: credentials.endpoint + ? `${credentials.endpoint}/openai/deployments` + : undefined, ...options, }); diff --git a/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.ts index 167581ed2ec37..aececc09aed74 100644 --- a/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.ts @@ -135,6 +135,36 @@ export class EmbeddingsOpenAi implements INodeType { type: 'collection', default: {}, options: [ + { + displayName: 'Dimensions', + name: 'dimensions', + default: undefined, + description: + 'The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.', + type: 'options', + options: [ + { + name: '256', + value: 256, + }, + { + name: '512', + value: 512, + }, + { + name: '1024', + value: 1024, + }, + { + name: '1536', + value: 1536, + }, + { + name: '3072', + value: 3072, + }, + ], + }, { displayName: 'Base URL', name: 'baseURL', @@ -179,6 +209,7 @@ export class EmbeddingsOpenAi implements INodeType { batchSize?: number; stripNewLines?: boolean; timeout?: number; + dimensions?: number | undefined; }; if (options.timeout === -1) { diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts index ffa7f4d58ff35..e2292abc772aa 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts @@ -168,6 +168,7 @@ export class LmChatAzureOpenAi implements INodeType { apiKey: string; resourceName: string; apiVersion: string; + endpoint?: string; }>('azureOpenAiApi'); const modelName = this.getNodeParameter('model', itemIndex) as string; @@ -184,9 +185,11 @@ export class LmChatAzureOpenAi implements INodeType { const model = new ChatOpenAI({ azureOpenAIApiDeploymentName: modelName, - azureOpenAIApiInstanceName: credentials.resourceName, + // instance name only needed to set base url + azureOpenAIApiInstanceName: !credentials.endpoint ? credentials.resourceName : undefined, azureOpenAIApiKey: credentials.apiKey, azureOpenAIApiVersion: credentials.apiVersion, + azureOpenAIEndpoint: credentials.endpoint, ...options, timeout: options.timeout ?? 60000, maxRetries: options.maxRetries ?? 2, diff --git a/packages/@n8n/task-runner/src/config/base-runner-config.ts b/packages/@n8n/task-runner/src/config/base-runner-config.ts index 01e00c177acb1..e7949d9704214 100644 --- a/packages/@n8n/task-runner/src/config/base-runner-config.ts +++ b/packages/@n8n/task-runner/src/config/base-runner-config.ts @@ -1,4 +1,16 @@ -import { Config, Env } from '@n8n/config'; +import { Config, Env, Nested } from '@n8n/config'; + +@Config +class HealthcheckServerConfig { + @Env('N8N_RUNNERS_SERVER_ENABLED') + enabled: boolean = false; + + @Env('N8N_RUNNERS_SERVER_HOST') + host: string = '127.0.0.1'; + + @Env('N8N_RUNNERS_SERVER_PORT') + port: number = 5680; +} @Config export class BaseRunnerConfig { @@ -13,4 +25,7 @@ export class BaseRunnerConfig { @Env('N8N_RUNNERS_MAX_CONCURRENCY') maxConcurrency: number = 5; + + @Nested + healthcheckServer!: HealthcheckServerConfig; } diff --git a/packages/@n8n/task-runner/src/healthcheck-server.ts b/packages/@n8n/task-runner/src/healthcheck-server.ts new file mode 100644 index 0000000000000..c6d8965a86b94 --- /dev/null +++ b/packages/@n8n/task-runner/src/healthcheck-server.ts @@ -0,0 +1,38 @@ +import { ApplicationError } from 'n8n-workflow'; +import { createServer } from 'node:http'; + +export class HealthcheckServer { + private server = createServer((_, res) => { + res.writeHead(200); + res.end('OK'); + }); + + async start(host: string, port: number) { + return await new Promise((resolve, reject) => { + const portInUseErrorHandler = (error: NodeJS.ErrnoException) => { + if (error.code === 'EADDRINUSE') { + reject(new ApplicationError(`Port ${port} is already in use`)); + } else { + reject(error); + } + }; + + this.server.on('error', portInUseErrorHandler); + + this.server.listen(port, host, () => { + this.server.removeListener('error', portInUseErrorHandler); + console.log(`Healthcheck server listening on ${host}, port ${port}`); + resolve(); + }); + }); + } + + async stop() { + return await new Promise((resolve, reject) => { + this.server.close((error) => { + if (error) reject(error); + else resolve(); + }); + }); + } +} diff --git a/packages/@n8n/task-runner/src/start.ts b/packages/@n8n/task-runner/src/start.ts index c6e8cb314cdc3..e09ddf33321df 100644 --- a/packages/@n8n/task-runner/src/start.ts +++ b/packages/@n8n/task-runner/src/start.ts @@ -3,8 +3,10 @@ import Container from 'typedi'; import { MainConfig } from './config/main-config'; import type { ErrorReporter } from './error-reporter'; +import type { HealthcheckServer } from './healthcheck-server'; import { JsTaskRunner } from './js-task-runner/js-task-runner'; +let healthcheckServer: HealthcheckServer | undefined; let runner: JsTaskRunner | undefined; let isShuttingDown = false; let errorReporter: ErrorReporter | undefined; @@ -22,6 +24,7 @@ function createSignalHandler(signal: string) { if (runner) { await runner.stop(); runner = undefined; + void healthcheckServer?.stop(); } if (errorReporter) { @@ -49,6 +52,14 @@ void (async function start() { runner = new JsTaskRunner(config); + const { enabled, host, port } = config.baseRunnerConfig.healthcheckServer; + + if (enabled) { + const { HealthcheckServer } = await import('./healthcheck-server'); + healthcheckServer = new HealthcheckServer(); + await healthcheckServer.start(host, port); + } + process.on('SIGINT', createSignalHandler('SIGINT')); process.on('SIGTERM', createSignalHandler('SIGTERM')); })().catch((e) => { diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index 9f8bc452320e3..54fa07e7f5dcb 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -296,43 +296,6 @@ export const schema = { }, }, - diagnostics: { - enabled: { - doc: 'Whether diagnostic mode is enabled.', - format: Boolean, - default: true, - env: 'N8N_DIAGNOSTICS_ENABLED', - }, - config: { - posthog: { - apiKey: { - doc: 'API key for PostHog', - format: String, - default: 'phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo', - env: 'N8N_DIAGNOSTICS_POSTHOG_API_KEY', - }, - apiHost: { - doc: 'API host for PostHog', - format: String, - default: 'https://ph.n8n.io', - env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST', - }, - }, - frontend: { - doc: 'Diagnostics config for frontend.', - format: String, - default: '1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io', - env: 'N8N_DIAGNOSTICS_CONFIG_FRONTEND', - }, - backend: { - doc: 'Diagnostics config for backend.', - format: String, - default: '1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io', - env: 'N8N_DIAGNOSTICS_CONFIG_BACKEND', - }, - }, - }, - defaultLocale: { doc: 'Default locale for the UI', format: String, diff --git a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts index 7e98877dc7360..58d694e5560ec 100644 --- a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts +++ b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts @@ -2,7 +2,6 @@ import type { GlobalConfig } from '@n8n/config'; import { mock } from 'jest-mock-extended'; import type { IWorkflowBase } from 'n8n-workflow'; -import config from '@/config'; import { N8N_VERSION } from '@/constants'; import type { WorkflowEntity } from '@/databases/entities/workflow-entity'; import type { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; @@ -66,7 +65,7 @@ describe('TelemetryEventRelay', () => { }); beforeEach(() => { - config.set('diagnostics.enabled', true); + globalConfig.diagnostics.enabled = true; }); afterEach(() => { @@ -75,7 +74,7 @@ describe('TelemetryEventRelay', () => { describe('init', () => { it('with diagnostics enabled, should init telemetry and register listeners', async () => { - config.set('diagnostics.enabled', true); + globalConfig.diagnostics.enabled = true; const telemetryEventRelay = new TelemetryEventRelay( eventService, telemetry, @@ -96,7 +95,7 @@ describe('TelemetryEventRelay', () => { }); it('with diagnostics disabled, should neither init telemetry nor register listeners', async () => { - config.set('diagnostics.enabled', false); + globalConfig.diagnostics.enabled = false; const telemetryEventRelay = new TelemetryEventRelay( eventService, telemetry, diff --git a/packages/cli/src/events/relays/telemetry.event-relay.ts b/packages/cli/src/events/relays/telemetry.event-relay.ts index 88f954ab93225..9e7b02659743b 100644 --- a/packages/cli/src/events/relays/telemetry.event-relay.ts +++ b/packages/cli/src/events/relays/telemetry.event-relay.ts @@ -37,7 +37,7 @@ export class TelemetryEventRelay extends EventRelay { } async init() { - if (!config.getEnv('diagnostics.enabled')) return; + if (!this.globalConfig.diagnostics.enabled) return; await this.telemetry.init(); diff --git a/packages/cli/src/execution-lifecycle-hooks/__tests__/save-execution-progress.test.ts b/packages/cli/src/execution-lifecycle-hooks/__tests__/save-execution-progress.test.ts index b0db5becac714..d89f2fb734d2f 100644 --- a/packages/cli/src/execution-lifecycle-hooks/__tests__/save-execution-progress.test.ts +++ b/packages/cli/src/execution-lifecycle-hooks/__tests__/save-execution-progress.test.ts @@ -1,5 +1,4 @@ import { - deepCopy, ErrorReporterProxy, type IRunExecutionData, type ITaskData, @@ -87,37 +86,6 @@ test('should update execution when saving progress is enabled', async () => { expect(reporterSpy).not.toHaveBeenCalled(); }); -test('should update execution when saving progress is disabled, but waitTill is defined', async () => { - jest.spyOn(fnModule, 'toSaveSettings').mockReturnValue({ - ...commonSettings, - progress: false, - }); - - const reporterSpy = jest.spyOn(ErrorReporterProxy, 'error'); - - executionRepository.findSingleExecution.mockResolvedValue({} as IExecutionResponse); - - const args = deepCopy(commonArgs); - args[4].waitTill = new Date(); - await saveExecutionProgress(...args); - - expect(executionRepository.updateExistingExecution).toHaveBeenCalledWith('some-execution-id', { - data: { - executionData: undefined, - resultData: { - lastNodeExecuted: 'My Node', - runData: { - 'My Node': [{}], - }, - }, - startData: {}, - }, - status: 'running', - }); - - expect(reporterSpy).not.toHaveBeenCalled(); -}); - test('should report error on failure', async () => { jest.spyOn(fnModule, 'toSaveSettings').mockReturnValue({ ...commonSettings, diff --git a/packages/cli/src/execution-lifecycle-hooks/save-execution-progress.ts b/packages/cli/src/execution-lifecycle-hooks/save-execution-progress.ts index 6cd1cfd08f78c..ca9899e1ec1a2 100644 --- a/packages/cli/src/execution-lifecycle-hooks/save-execution-progress.ts +++ b/packages/cli/src/execution-lifecycle-hooks/save-execution-progress.ts @@ -16,7 +16,7 @@ export async function saveExecutionProgress( ) { const saveSettings = toSaveSettings(workflowData.settings); - if (!saveSettings.progress && !executionData.waitTill) return; + if (!saveSettings.progress) return; const logger = Container.get(Logger); diff --git a/packages/cli/src/execution-lifecycle-hooks/to-save-settings.ts b/packages/cli/src/execution-lifecycle-hooks/to-save-settings.ts index 7a25adaeba912..a7af8f3ddc233 100644 --- a/packages/cli/src/execution-lifecycle-hooks/to-save-settings.ts +++ b/packages/cli/src/execution-lifecycle-hooks/to-save-settings.ts @@ -18,20 +18,20 @@ export function toSaveSettings(workflowSettings: IWorkflowSettings = {}) { PROGRESS: config.getEnv('executions.saveExecutionProgress'), }; + const { + saveDataErrorExecution = DEFAULTS.ERROR, + saveDataSuccessExecution = DEFAULTS.SUCCESS, + saveManualExecutions = DEFAULTS.MANUAL, + saveExecutionProgress = DEFAULTS.PROGRESS, + } = workflowSettings; + return { - error: workflowSettings.saveDataErrorExecution - ? workflowSettings.saveDataErrorExecution !== 'none' - : DEFAULTS.ERROR !== 'none', - success: workflowSettings.saveDataSuccessExecution - ? workflowSettings.saveDataSuccessExecution !== 'none' - : DEFAULTS.SUCCESS !== 'none', - manual: - workflowSettings === undefined || workflowSettings.saveManualExecutions === 'DEFAULT' - ? DEFAULTS.MANUAL - : (workflowSettings.saveManualExecutions ?? DEFAULTS.MANUAL), - progress: - workflowSettings === undefined || workflowSettings.saveExecutionProgress === 'DEFAULT' - ? DEFAULTS.PROGRESS - : (workflowSettings.saveExecutionProgress ?? DEFAULTS.PROGRESS), + error: saveDataErrorExecution === 'DEFAULT' ? DEFAULTS.ERROR : saveDataErrorExecution === 'all', + success: + saveDataSuccessExecution === 'DEFAULT' + ? DEFAULTS.SUCCESS + : saveDataSuccessExecution === 'all', + manual: saveManualExecutions === 'DEFAULT' ? DEFAULTS.MANUAL : saveManualExecutions, + progress: saveExecutionProgress === 'DEFAULT' ? DEFAULTS.PROGRESS : saveExecutionProgress, }; } diff --git a/packages/cli/src/posthog/__tests__/posthog.test.ts b/packages/cli/src/posthog/__tests__/posthog.test.ts index 5c8fe282bfcbf..5e11d247733a8 100644 --- a/packages/cli/src/posthog/__tests__/posthog.test.ts +++ b/packages/cli/src/posthog/__tests__/posthog.test.ts @@ -3,7 +3,6 @@ import { mock } from 'jest-mock-extended'; import { InstanceSettings } from 'n8n-core'; import { PostHog } from 'posthog-node'; -import config from '@/config'; import { PostHogClient } from '@/posthog'; import { mockInstance } from '@test/mocking'; @@ -20,12 +19,11 @@ describe('PostHog', () => { const globalConfig = mock({ logging: { level: 'debug' } }); beforeAll(() => { - config.set('diagnostics.config.posthog.apiKey', apiKey); - config.set('diagnostics.config.posthog.apiHost', apiHost); + globalConfig.diagnostics.posthogConfig = { apiKey, apiHost }; }); beforeEach(() => { - config.set('diagnostics.enabled', true); + globalConfig.diagnostics.enabled = true; jest.resetAllMocks(); }); @@ -37,7 +35,7 @@ describe('PostHog', () => { }); it('does not initialize or track if diagnostics are not enabled', async () => { - config.set('diagnostics.enabled', false); + globalConfig.diagnostics.enabled = false; const ph = new PostHogClient(instanceSettings, globalConfig); await ph.init(); diff --git a/packages/cli/src/posthog/index.ts b/packages/cli/src/posthog/index.ts index 8dec9755b38bb..be025c8a85050 100644 --- a/packages/cli/src/posthog/index.ts +++ b/packages/cli/src/posthog/index.ts @@ -4,7 +4,6 @@ import type { FeatureFlags, ITelemetryTrackProperties } from 'n8n-workflow'; import type { PostHog } from 'posthog-node'; import { Service } from 'typedi'; -import config from '@/config'; import type { PublicUser } from '@/interfaces'; @Service() @@ -17,14 +16,14 @@ export class PostHogClient { ) {} async init() { - const enabled = config.getEnv('diagnostics.enabled'); + const { enabled, posthogConfig } = this.globalConfig.diagnostics; if (!enabled) { return; } const { PostHog } = await import('posthog-node'); - this.postHog = new PostHog(config.getEnv('diagnostics.config.posthog.apiKey'), { - host: config.getEnv('diagnostics.config.posthog.apiHost'), + this.postHog = new PostHog(posthogConfig.apiKey, { + host: posthogConfig.apiHost, }); const logLevel = this.globalConfig.logging.level; diff --git a/packages/cli/src/runners/__tests__/task-broker.test.ts b/packages/cli/src/runners/__tests__/task-broker.test.ts index 614d04c3b5dd2..4cbc4ebfc0d85 100644 --- a/packages/cli/src/runners/__tests__/task-broker.test.ts +++ b/packages/cli/src/runners/__tests__/task-broker.test.ts @@ -1,8 +1,12 @@ +import type { TaskRunnersConfig } from '@n8n/config'; import type { RunnerMessage, TaskResultData } from '@n8n/task-runner'; import { mock } from 'jest-mock-extended'; -import type { INodeTypeBaseDescription } from 'n8n-workflow'; +import { ApplicationError, type INodeTypeBaseDescription } from 'n8n-workflow'; + +import { Time } from '@/constants'; import { TaskRejectError } from '../errors'; +import type { RunnerLifecycleEvents } from '../runner-lifecycle-events'; import { TaskBroker } from '../task-broker.service'; import type { TaskOffer, TaskRequest, TaskRunner } from '../task-broker.service'; @@ -12,7 +16,7 @@ describe('TaskBroker', () => { let taskBroker: TaskBroker; beforeEach(() => { - taskBroker = new TaskBroker(mock()); + taskBroker = new TaskBroker(mock(), mock(), mock()); jest.restoreAllMocks(); }); @@ -618,4 +622,131 @@ describe('TaskBroker', () => { }); }); }); + + describe('task timeouts', () => { + let taskBroker: TaskBroker; + let config: TaskRunnersConfig; + let runnerLifecycleEvents = mock(); + + beforeAll(() => { + jest.useFakeTimers(); + config = mock({ taskTimeout: 30 }); + taskBroker = new TaskBroker(mock(), config, runnerLifecycleEvents); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + it('on sending task, we should set up task timeout', async () => { + jest.spyOn(global, 'setTimeout'); + + const taskId = 'task1'; + const runnerId = 'runner1'; + const runner = mock({ id: runnerId }); + const runnerMessageCallback = jest.fn(); + + taskBroker.registerRunner(runner, runnerMessageCallback); + taskBroker.setTasks({ + [taskId]: { id: taskId, runnerId, requesterId: 'requester1', taskType: 'test' }, + }); + + await taskBroker.sendTaskSettings(taskId, {}); + + expect(setTimeout).toHaveBeenCalledWith( + expect.any(Function), + config.taskTimeout * Time.seconds.toMilliseconds, + ); + }); + + it('on task completion, we should clear timeout', async () => { + jest.spyOn(global, 'clearTimeout'); + + const taskId = 'task1'; + const runnerId = 'runner1'; + const requesterId = 'requester1'; + const requesterCallback = jest.fn(); + + taskBroker.registerRequester(requesterId, requesterCallback); + taskBroker.setTasks({ + [taskId]: { + id: taskId, + runnerId, + requesterId, + taskType: 'test', + timeout: setTimeout(() => {}, config.taskTimeout * Time.seconds.toMilliseconds), + }, + }); + + await taskBroker.taskDoneHandler(taskId, { result: [] }); + + expect(clearTimeout).toHaveBeenCalled(); + expect(taskBroker.getTasks().get(taskId)).toBeUndefined(); + }); + + it('on task error, we should clear timeout', async () => { + jest.spyOn(global, 'clearTimeout'); + + const taskId = 'task1'; + const runnerId = 'runner1'; + const requesterId = 'requester1'; + const requesterCallback = jest.fn(); + + taskBroker.registerRequester(requesterId, requesterCallback); + taskBroker.setTasks({ + [taskId]: { + id: taskId, + runnerId, + requesterId, + taskType: 'test', + timeout: setTimeout(() => {}, config.taskTimeout * Time.seconds.toMilliseconds), + }, + }); + + await taskBroker.taskErrorHandler(taskId, new Error('Test error')); + + expect(clearTimeout).toHaveBeenCalled(); + expect(taskBroker.getTasks().get(taskId)).toBeUndefined(); + }); + + it('on timeout, we should emit `runner:timed-out-during-task` event and send error to requester', async () => { + jest.spyOn(global, 'clearTimeout'); + + const taskId = 'task1'; + const runnerId = 'runner1'; + const requesterId = 'requester1'; + const runner = mock({ id: runnerId }); + const runnerCallback = jest.fn(); + const requesterCallback = jest.fn(); + + taskBroker.registerRunner(runner, runnerCallback); + taskBroker.registerRequester(requesterId, requesterCallback); + + taskBroker.setTasks({ + [taskId]: { id: taskId, runnerId, requesterId, taskType: 'test' }, + }); + + await taskBroker.sendTaskSettings(taskId, {}); + + jest.runAllTimers(); + + await Promise.resolve(); + + expect(runnerLifecycleEvents.emit).toHaveBeenCalledWith('runner:timed-out-during-task'); + + await Promise.resolve(); + + expect(clearTimeout).toHaveBeenCalled(); + + expect(requesterCallback).toHaveBeenCalledWith({ + type: 'broker:taskerror', + taskId, + error: new ApplicationError(`Task execution timed out after ${config.taskTimeout} seconds`), + }); + + await Promise.resolve(); + + expect(taskBroker.getTasks().get(taskId)).toBeUndefined(); + }); + }); }); diff --git a/packages/cli/src/runners/__tests__/task-runner-process.test.ts b/packages/cli/src/runners/__tests__/task-runner-process.test.ts index 92e8483d03e32..9eeb8d69fc6d5 100644 --- a/packages/cli/src/runners/__tests__/task-runner-process.test.ts +++ b/packages/cli/src/runners/__tests__/task-runner-process.test.ts @@ -7,6 +7,8 @@ import type { TaskRunnerAuthService } from '@/runners/auth/task-runner-auth.serv import { TaskRunnerProcess } from '@/runners/task-runner-process'; import { mockInstance } from '@test/mocking'; +import type { RunnerLifecycleEvents } from '../runner-lifecycle-events'; + const spawnMock = jest.fn(() => mock({ stdout: { @@ -25,7 +27,7 @@ describe('TaskRunnerProcess', () => { runnerConfig.enabled = true; runnerConfig.mode = 'internal_childprocess'; const authService = mock(); - let taskRunnerProcess = new TaskRunnerProcess(logger, runnerConfig, authService); + let taskRunnerProcess = new TaskRunnerProcess(logger, runnerConfig, authService, mock()); afterEach(async () => { spawnMock.mockClear(); @@ -35,15 +37,35 @@ describe('TaskRunnerProcess', () => { it('should throw if runner mode is external', () => { runnerConfig.mode = 'external'; - expect(() => new TaskRunnerProcess(logger, runnerConfig, authService)).toThrow(); + expect(() => new TaskRunnerProcess(logger, runnerConfig, authService, mock())).toThrow(); runnerConfig.mode = 'internal_childprocess'; }); + + it('should register listener for `runner:failed-heartbeat-check` event', () => { + const runnerLifecycleEvents = mock(); + new TaskRunnerProcess(logger, runnerConfig, authService, runnerLifecycleEvents); + + expect(runnerLifecycleEvents.on).toHaveBeenCalledWith( + 'runner:failed-heartbeat-check', + expect.any(Function), + ); + }); + + it('should register listener for `runner:timed-out-during-task` event', () => { + const runnerLifecycleEvents = mock(); + new TaskRunnerProcess(logger, runnerConfig, authService, runnerLifecycleEvents); + + expect(runnerLifecycleEvents.on).toHaveBeenCalledWith( + 'runner:timed-out-during-task', + expect.any(Function), + ); + }); }); describe('start', () => { beforeEach(() => { - taskRunnerProcess = new TaskRunnerProcess(logger, runnerConfig, authService); + taskRunnerProcess = new TaskRunnerProcess(logger, runnerConfig, authService, mock()); }); test.each([ diff --git a/packages/cli/src/runners/__tests__/task-runner-ws-server.test.ts b/packages/cli/src/runners/__tests__/task-runner-ws-server.test.ts new file mode 100644 index 0000000000000..223cdbdc544fe --- /dev/null +++ b/packages/cli/src/runners/__tests__/task-runner-ws-server.test.ts @@ -0,0 +1,45 @@ +import type { TaskRunnersConfig } from '@n8n/config'; +import { mock } from 'jest-mock-extended'; + +import { Time } from '@/constants'; +import { TaskRunnerWsServer } from '@/runners/runner-ws-server'; + +describe('TaskRunnerWsServer', () => { + describe('heartbeat timer', () => { + it('should set up heartbeat timer on server start', async () => { + const setIntervalSpy = jest.spyOn(global, 'setInterval'); + + const server = new TaskRunnerWsServer( + mock(), + mock(), + mock(), + mock({ path: '/runners', heartbeatInterval: 30 }), + mock(), + ); + + expect(setIntervalSpy).toHaveBeenCalledWith( + expect.any(Function), + 30 * Time.seconds.toMilliseconds, + ); + + await server.shutdown(); + }); + + it('should clear heartbeat timer on server stop', async () => { + jest.spyOn(global, 'setInterval'); + const clearIntervalSpy = jest.spyOn(global, 'clearInterval'); + + const server = new TaskRunnerWsServer( + mock(), + mock(), + mock(), + mock({ path: '/runners', heartbeatInterval: 30 }), + mock(), + ); + + await server.shutdown(); + + expect(clearIntervalSpy).toHaveBeenCalled(); + }); + }); +}); diff --git a/packages/cli/src/runners/default-task-runner-disconnect-analyzer.ts b/packages/cli/src/runners/default-task-runner-disconnect-analyzer.ts index e101c65e28163..d61179372b89c 100644 --- a/packages/cli/src/runners/default-task-runner-disconnect-analyzer.ts +++ b/packages/cli/src/runners/default-task-runner-disconnect-analyzer.ts @@ -1,8 +1,10 @@ import { Service } from 'typedi'; +import config from '@/config'; + import { TaskRunnerDisconnectedError } from './errors/task-runner-disconnected-error'; -import type { DisconnectAnalyzer } from './runner-types'; -import type { TaskRunner } from './task-broker.service'; +import { TaskRunnerFailedHeartbeatError } from './errors/task-runner-failed-heartbeat.error'; +import type { DisconnectAnalyzer, DisconnectErrorOptions } from './runner-types'; /** * Analyzes the disconnect reason of a task runner to provide a more @@ -10,7 +12,16 @@ import type { TaskRunner } from './task-broker.service'; */ @Service() export class DefaultTaskRunnerDisconnectAnalyzer implements DisconnectAnalyzer { - async determineDisconnectReason(runnerId: TaskRunner['id']): Promise { - return new TaskRunnerDisconnectedError(runnerId); + async toDisconnectError(opts: DisconnectErrorOptions): Promise { + const { reason, heartbeatInterval } = opts; + + if (reason === 'failed-heartbeat-check' && heartbeatInterval) { + return new TaskRunnerFailedHeartbeatError( + heartbeatInterval, + config.get('deployment.type') !== 'cloud', + ); + } + + return new TaskRunnerDisconnectedError(opts.runnerId ?? 'Unknown runner ID'); } } diff --git a/packages/cli/src/runners/errors/missing-auth-token.error.ts b/packages/cli/src/runners/errors/missing-auth-token.error.ts new file mode 100644 index 0000000000000..3c99a09edb54d --- /dev/null +++ b/packages/cli/src/runners/errors/missing-auth-token.error.ts @@ -0,0 +1,7 @@ +export class MissingAuthTokenError extends Error { + constructor() { + super( + 'Missing auth token. When `N8N_RUNNERS_MODE` is `external`, it is required to set `N8N_RUNNERS_AUTH_TOKEN`. Its value should be a shared secret between the main instance and the launcher.', + ); + } +} diff --git a/packages/cli/src/runners/errors/task-runner-failed-heartbeat.error.ts b/packages/cli/src/runners/errors/task-runner-failed-heartbeat.error.ts new file mode 100644 index 0000000000000..55b94485740ff --- /dev/null +++ b/packages/cli/src/runners/errors/task-runner-failed-heartbeat.error.ts @@ -0,0 +1,32 @@ +import { ApplicationError } from 'n8n-workflow'; + +export class TaskRunnerFailedHeartbeatError extends ApplicationError { + description: string; + + constructor(heartbeatInterval: number, isSelfHosted: boolean) { + super('Task execution aborted because runner became unresponsive'); + + const subtitle = + 'The task runner failed to respond as expected, so it was considered unresponsive, and the task was aborted. You can try the following:'; + + const fixes = { + optimizeScript: + 'Optimize your script to prevent CPU-intensive operations, e.g. by breaking them down into smaller chunks or batch processing.', + ensureTermination: + 'Ensure that all paths in your script are able to terminate, i.e. no infinite loops.', + increaseInterval: `If your task can reasonably keep the task runner busy for more than ${heartbeatInterval} ${heartbeatInterval === 1 ? 'second' : 'seconds'}, increase the heartbeat interval using the N8N_RUNNERS_HEARTBEAT_INTERVAL environment variable.`, + }; + + const suggestions = [fixes.optimizeScript, fixes.ensureTermination]; + + if (isSelfHosted) suggestions.push(fixes.increaseInterval); + + const suggestionsText = suggestions + .map((suggestion, index) => `${index + 1}. ${suggestion}`) + .join('
'); + + const description = `${subtitle}

${suggestionsText}`; + + this.description = description; + } +} diff --git a/packages/cli/src/runners/errors/task-runner-timeout.error.ts b/packages/cli/src/runners/errors/task-runner-timeout.error.ts new file mode 100644 index 0000000000000..88f3533028725 --- /dev/null +++ b/packages/cli/src/runners/errors/task-runner-timeout.error.ts @@ -0,0 +1,34 @@ +import { ApplicationError } from 'n8n-workflow'; + +export class TaskRunnerTimeoutError extends ApplicationError { + description: string; + + constructor(taskTimeout: number, isSelfHosted: boolean) { + super( + `Task execution timed out after ${taskTimeout} ${taskTimeout === 1 ? 'second' : 'seconds'}`, + ); + + const subtitle = + 'The task runner was taking too long on this task, so it was suspected of being unresponsive and restarted, and the task was aborted. You can try the following:'; + + const fixes = { + optimizeScript: + 'Optimize your script to prevent long-running tasks, e.g. by processing data in smaller batches.', + ensureTermination: + 'Ensure that all paths in your script are able to terminate, i.e. no infinite loops.', + increaseTimeout: `If your task can reasonably take more than ${taskTimeout} ${taskTimeout === 1 ? 'second' : 'seconds'}, increase the timeout using the N8N_RUNNERS_TASK_TIMEOUT environment variable.`, + }; + + const suggestions = [fixes.optimizeScript, fixes.ensureTermination]; + + if (isSelfHosted) suggestions.push(fixes.increaseTimeout); + + const suggestionsText = suggestions + .map((suggestion, index) => `${index + 1}. ${suggestion}`) + .join('
'); + + const description = `${subtitle}

${suggestionsText}`; + + this.description = description; + } +} diff --git a/packages/cli/src/runners/internal-task-runner-disconnect-analyzer.ts b/packages/cli/src/runners/internal-task-runner-disconnect-analyzer.ts index e3b9520f776eb..e27f76b628967 100644 --- a/packages/cli/src/runners/internal-task-runner-disconnect-analyzer.ts +++ b/packages/cli/src/runners/internal-task-runner-disconnect-analyzer.ts @@ -5,8 +5,8 @@ import config from '@/config'; import { DefaultTaskRunnerDisconnectAnalyzer } from './default-task-runner-disconnect-analyzer'; import { TaskRunnerOomError } from './errors/task-runner-oom-error'; +import type { DisconnectErrorOptions } from './runner-types'; import { SlidingWindowSignal } from './sliding-window-signal'; -import type { TaskRunner } from './task-broker.service'; import type { ExitReason, TaskRunnerProcessEventMap } from './task-runner-process'; import { TaskRunnerProcess } from './task-runner-process'; @@ -38,13 +38,13 @@ export class InternalTaskRunnerDisconnectAnalyzer extends DefaultTaskRunnerDisco }); } - async determineDisconnectReason(runnerId: TaskRunner['id']): Promise { + async toDisconnectError(opts: DisconnectErrorOptions): Promise { const exitCode = await this.awaitExitSignal(); if (exitCode === 'oom') { - return new TaskRunnerOomError(runnerId, this.isCloudDeployment); + return new TaskRunnerOomError(opts.runnerId ?? 'Unknown runner ID', this.isCloudDeployment); } - return await super.determineDisconnectReason(runnerId); + return await super.toDisconnectError(opts); } private async awaitExitSignal(): Promise { diff --git a/packages/cli/src/runners/runner-lifecycle-events.ts b/packages/cli/src/runners/runner-lifecycle-events.ts new file mode 100644 index 0000000000000..8ea2da38b183d --- /dev/null +++ b/packages/cli/src/runners/runner-lifecycle-events.ts @@ -0,0 +1,11 @@ +import { Service } from 'typedi'; + +import { TypedEmitter } from '@/typed-emitter'; + +type RunnerLifecycleEventMap = { + 'runner:failed-heartbeat-check': never; + 'runner:timed-out-during-task': never; +}; + +@Service() +export class RunnerLifecycleEvents extends TypedEmitter {} diff --git a/packages/cli/src/runners/runner-types.ts b/packages/cli/src/runners/runner-types.ts index b373d3051e5a9..132d688e98a04 100644 --- a/packages/cli/src/runners/runner-types.ts +++ b/packages/cli/src/runners/runner-types.ts @@ -6,7 +6,7 @@ import type { TaskRunner } from './task-broker.service'; import type { AuthlessRequest } from '../requests'; export interface DisconnectAnalyzer { - determineDisconnectReason(runnerId: TaskRunner['id']): Promise; + toDisconnectError(opts: DisconnectErrorOptions): Promise; } export type DataRequestType = 'input' | 'node' | 'all'; @@ -22,3 +22,11 @@ export interface TaskRunnerServerInitRequest } export type TaskRunnerServerInitResponse = Response & { req: TaskRunnerServerInitRequest }; + +export type DisconnectReason = 'shutting-down' | 'failed-heartbeat-check' | 'unknown'; + +export type DisconnectErrorOptions = { + runnerId?: TaskRunner['id']; + reason?: DisconnectReason; + heartbeatInterval?: number; +}; diff --git a/packages/cli/src/runners/runner-ws-server.ts b/packages/cli/src/runners/runner-ws-server.ts index c6914625589a5..27a0d779e7f95 100644 --- a/packages/cli/src/runners/runner-ws-server.ts +++ b/packages/cli/src/runners/runner-ws-server.ts @@ -1,12 +1,17 @@ +import { TaskRunnersConfig } from '@n8n/config'; import type { BrokerMessage, RunnerMessage } from '@n8n/task-runner'; +import { ApplicationError } from 'n8n-workflow'; import { Service } from 'typedi'; import type WebSocket from 'ws'; +import { Time } from '@/constants'; import { Logger } from '@/logging/logger.service'; import { DefaultTaskRunnerDisconnectAnalyzer } from './default-task-runner-disconnect-analyzer'; +import { RunnerLifecycleEvents } from './runner-lifecycle-events'; import type { DisconnectAnalyzer, + DisconnectReason, TaskRunnerServerInitRequest, TaskRunnerServerInitResponse, } from './runner-types'; @@ -20,11 +25,50 @@ function heartbeat(this: WebSocket) { export class TaskRunnerWsServer { runnerConnections: Map = new Map(); + private heartbeatTimer: NodeJS.Timer | undefined; + constructor( private readonly logger: Logger, private readonly taskBroker: TaskBroker, private disconnectAnalyzer: DefaultTaskRunnerDisconnectAnalyzer, - ) {} + private readonly taskTunnersConfig: TaskRunnersConfig, + private readonly runnerLifecycleEvents: RunnerLifecycleEvents, + ) { + this.startHeartbeatChecks(); + } + + private startHeartbeatChecks() { + const { heartbeatInterval } = this.taskTunnersConfig; + + if (heartbeatInterval <= 0) { + throw new ApplicationError('Heartbeat interval must be greater than 0'); + } + + this.heartbeatTimer = setInterval(() => { + for (const [runnerId, connection] of this.runnerConnections.entries()) { + if (!connection.isAlive) { + void this.removeConnection(runnerId, 'failed-heartbeat-check'); + this.runnerLifecycleEvents.emit('runner:failed-heartbeat-check'); + return; + } + connection.isAlive = false; + connection.ping(); + } + }, heartbeatInterval * Time.seconds.toMilliseconds); + } + + async shutdown() { + if (this.heartbeatTimer) { + clearInterval(this.heartbeatTimer); + this.heartbeatTimer = undefined; + } + + await Promise.all( + Array.from(this.runnerConnections.keys()).map( + async (id) => await this.removeConnection(id, 'shutting-down'), + ), + ); + } setDisconnectAnalyzer(disconnectAnalyzer: DisconnectAnalyzer) { this.disconnectAnalyzer = disconnectAnalyzer; @@ -97,11 +141,15 @@ export class TaskRunnerWsServer { ); } - async removeConnection(id: TaskRunner['id']) { + async removeConnection(id: TaskRunner['id'], reason: DisconnectReason = 'unknown') { const connection = this.runnerConnections.get(id); if (connection) { - const disconnectReason = await this.disconnectAnalyzer.determineDisconnectReason(id); - this.taskBroker.deregisterRunner(id, disconnectReason); + const disconnectError = await this.disconnectAnalyzer.toDisconnectError({ + runnerId: id, + reason, + heartbeatInterval: this.taskTunnersConfig.heartbeatInterval, + }); + this.taskBroker.deregisterRunner(id, disconnectError); connection.close(); this.runnerConnections.delete(id); } diff --git a/packages/cli/src/runners/task-broker.service.ts b/packages/cli/src/runners/task-broker.service.ts index daa5b48c07f07..9af7b19f55862 100644 --- a/packages/cli/src/runners/task-broker.service.ts +++ b/packages/cli/src/runners/task-broker.service.ts @@ -1,3 +1,4 @@ +import { TaskRunnersConfig } from '@n8n/config'; import type { BrokerMessage, RequesterMessage, @@ -8,9 +9,13 @@ import { ApplicationError } from 'n8n-workflow'; import { nanoid } from 'nanoid'; import { Service } from 'typedi'; +import config from '@/config'; +import { Time } from '@/constants'; import { Logger } from '@/logging/logger.service'; import { TaskRejectError } from './errors'; +import { TaskRunnerTimeoutError } from './errors/task-runner-timeout.error'; +import { RunnerLifecycleEvents } from './runner-lifecycle-events'; export interface TaskRunner { id: string; @@ -24,6 +29,7 @@ export interface Task { runnerId: TaskRunner['id']; requesterId: string; taskType: string; + timeout?: NodeJS.Timeout; } export interface TaskOffer { @@ -78,7 +84,15 @@ export class TaskBroker { private pendingTaskRequests: TaskRequest[] = []; - constructor(private readonly logger: Logger) {} + constructor( + private readonly logger: Logger, + private readonly taskRunnersConfig: TaskRunnersConfig, + private readonly runnerLifecycleEvents: RunnerLifecycleEvents, + ) { + if (this.taskRunnersConfig.taskTimeout <= 0) { + throw new ApplicationError('Task timeout must be greater than 0'); + } + } expireTasks() { const now = process.hrtime.bigint(); @@ -408,6 +422,14 @@ export class TaskBroker { async sendTaskSettings(taskId: Task['id'], settings: unknown) { const runner = await this.getRunnerOrFailTask(taskId); + + const task = this.tasks.get(taskId); + if (!task) return; + + task.timeout = setTimeout(async () => { + await this.handleTaskTimeout(taskId); + }, this.taskRunnersConfig.taskTimeout * Time.seconds.toMilliseconds); + await this.messageRunner(runner.id, { type: 'broker:tasksettings', taskId, @@ -415,11 +437,27 @@ export class TaskBroker { }); } + private async handleTaskTimeout(taskId: Task['id']) { + const task = this.tasks.get(taskId); + if (!task) return; + + this.runnerLifecycleEvents.emit('runner:timed-out-during-task'); + + await this.taskErrorHandler( + taskId, + new TaskRunnerTimeoutError( + this.taskRunnersConfig.taskTimeout, + config.getEnv('deployment.type') !== 'cloud', + ), + ); + } + async taskDoneHandler(taskId: Task['id'], data: TaskResultData) { const task = this.tasks.get(taskId); - if (!task) { - return; - } + if (!task) return; + + clearTimeout(task.timeout); + await this.requesters.get(task.requesterId)?.({ type: 'broker:taskdone', taskId: task.id, @@ -430,9 +468,10 @@ export class TaskBroker { async taskErrorHandler(taskId: Task['id'], error: unknown) { const task = this.tasks.get(taskId); - if (!task) { - return; - } + if (!task) return; + + clearTimeout(task.timeout); + await this.requesters.get(task.requesterId)?.({ type: 'broker:taskerror', taskId: task.id, diff --git a/packages/cli/src/runners/task-runner-module.ts b/packages/cli/src/runners/task-runner-module.ts index fe476ad3415c6..612f3d4fc1c4c 100644 --- a/packages/cli/src/runners/task-runner-module.ts +++ b/packages/cli/src/runners/task-runner-module.ts @@ -4,6 +4,7 @@ import Container, { Service } from 'typedi'; import type { TaskRunnerProcess } from '@/runners/task-runner-process'; +import { MissingAuthTokenError } from './errors/missing-auth-token.error'; import { TaskRunnerWsServer } from './runner-ws-server'; import type { LocalTaskManager } from './task-managers/local-task-manager'; import type { TaskRunnerServer } from './task-runner-server'; @@ -28,13 +29,14 @@ export class TaskRunnerModule { async start() { a.ok(this.runnerConfig.enabled, 'Task runner is disabled'); + const { mode, authToken } = this.runnerConfig; + + if (mode === 'external' && !authToken) throw new MissingAuthTokenError(); + await this.loadTaskManager(); await this.loadTaskRunnerServer(); - if ( - this.runnerConfig.mode === 'internal_childprocess' || - this.runnerConfig.mode === 'internal_launcher' - ) { + if (mode === 'internal_childprocess' || mode === 'internal_launcher') { await this.startInternalTaskRunner(); } } diff --git a/packages/cli/src/runners/task-runner-process.ts b/packages/cli/src/runners/task-runner-process.ts index ba63cbe9e7661..3129fcb524845 100644 --- a/packages/cli/src/runners/task-runner-process.ts +++ b/packages/cli/src/runners/task-runner-process.ts @@ -10,6 +10,7 @@ import { Logger } from '@/logging/logger.service'; import { TaskRunnerAuthService } from './auth/task-runner-auth.service'; import { forwardToLogger } from './forward-to-logger'; import { NodeProcessOomDetector } from './node-process-oom-detector'; +import { RunnerLifecycleEvents } from './runner-lifecycle-events'; import { TypedEmitter } from '../typed-emitter'; type ChildProcess = ReturnType; @@ -70,6 +71,7 @@ export class TaskRunnerProcess extends TypedEmitter { logger: Logger, private readonly runnerConfig: TaskRunnersConfig, private readonly authService: TaskRunnerAuthService, + private readonly runnerLifecycleEvents: RunnerLifecycleEvents, ) { super(); @@ -79,6 +81,16 @@ export class TaskRunnerProcess extends TypedEmitter { ); this.logger = logger.scoped('task-runner'); + + this.runnerLifecycleEvents.on('runner:failed-heartbeat-check', () => { + this.logger.warn('Task runner failed heartbeat check, restarting...'); + void this.forceRestart(); + }); + + this.runnerLifecycleEvents.on('runner:timed-out-during-task', () => { + this.logger.warn('Task runner timed out during task, restarting...'); + void this.forceRestart(); + }); } async start() { @@ -116,9 +128,7 @@ export class TaskRunnerProcess extends TypedEmitter { @OnShutdown() async stop() { - if (!this.process) { - return; - } + if (!this.process) return; this.isShuttingDown = true; @@ -133,10 +143,22 @@ export class TaskRunnerProcess extends TypedEmitter { this.isShuttingDown = false; } - killNode() { - if (!this.process) { - return; + /** Force-restart a runner suspected of being unresponsive. */ + async forceRestart() { + if (!this.process) return; + + if (this.useLauncher) { + await this.killLauncher(); // @TODO: Implement SIGKILL in launcher + } else { + this.process.kill('SIGKILL'); } + + await this._runPromise; + } + + killNode() { + if (!this.process) return; + this.process.kill(); } @@ -173,7 +195,6 @@ export class TaskRunnerProcess extends TypedEmitter { this.emit('exit', { reason: this.oomDetector?.didProcessOom ? 'oom' : 'unknown' }); resolveFn(); - // If we are not shutting down, restart the process if (!this.isShuttingDown) { setImmediate(async () => await this.start()); } diff --git a/packages/cli/src/runners/task-runner-server.ts b/packages/cli/src/runners/task-runner-server.ts index 56c56e02aec88..eb428b52fa8cf 100644 --- a/packages/cli/src/runners/task-runner-server.ts +++ b/packages/cli/src/runners/task-runner-server.ts @@ -44,7 +44,7 @@ export class TaskRunnerServer { private readonly logger: Logger, private readonly globalConfig: GlobalConfig, private readonly taskRunnerAuthController: TaskRunnerAuthController, - private readonly taskRunnerService: TaskRunnerWsServer, + private readonly taskRunnerWsServer: TaskRunnerWsServer, ) { this.app = express(); this.app.disable('x-powered-by'); @@ -148,7 +148,7 @@ export class TaskRunnerServer { // eslint-disable-next-line @typescript-eslint/unbound-method this.taskRunnerAuthController.authMiddleware, (req: TaskRunnerServerInitRequest, res: TaskRunnerServerInitResponse) => - this.taskRunnerService.handleRequest(req, res), + this.taskRunnerWsServer.handleRequest(req, res), ); const authEndpoint = `${this.getEndpointBasePath()}/auth`; @@ -181,7 +181,10 @@ export class TaskRunnerServer { const response = new ServerResponse(request); response.writeHead = (statusCode) => { - if (statusCode > 200) ws.close(); + if (statusCode > 200) { + this.logger.error(`Task runner connection attempt failed with status code ${statusCode}`); + ws.close(); + } return response; }; diff --git a/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts b/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts index b0d6ccfad345c..fafad308ad662 100644 --- a/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts +++ b/packages/cli/src/security-audit/risk-reporters/instance-risk-reporter.ts @@ -103,7 +103,7 @@ export class InstanceRiskReporter implements RiskReporter { }; settings.telemetry = { - diagnosticsEnabled: config.getEnv('diagnostics.enabled'), + diagnosticsEnabled: this.globalConfig.diagnostics.enabled, }; return settings; diff --git a/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts b/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts index fdecb7ae5abb0..6d28dbe563485 100644 --- a/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts +++ b/packages/cli/src/services/__tests__/workflow-statistics.service.test.ts @@ -39,7 +39,7 @@ describe('WorkflowStatisticsService', () => { }); Object.assign(entityManager, { connection: dataSource }); - config.set('diagnostics.enabled', true); + globalConfig.diagnostics.enabled = true; config.set('deployment.type', 'n8n-testing'); mocked(ownershipService.getWorkflowProjectCached).mockResolvedValue(fakeProject); mocked(ownershipService.getPersonalProjectOwnerCached).mockResolvedValue(fakeUser); diff --git a/packages/cli/src/services/frontend.service.ts b/packages/cli/src/services/frontend.service.ts index 081ef5fd4a820..db77bd418d3f1 100644 --- a/packages/cli/src/services/frontend.service.ts +++ b/packages/cli/src/services/frontend.service.ts @@ -66,11 +66,11 @@ export class FrontendService { const restEndpoint = this.globalConfig.endpoints.rest; const telemetrySettings: ITelemetrySettings = { - enabled: config.getEnv('diagnostics.enabled'), + enabled: this.globalConfig.diagnostics.enabled, }; if (telemetrySettings.enabled) { - const conf = config.getEnv('diagnostics.config.frontend'); + const conf = this.globalConfig.diagnostics.frontendConfig; const [key, url] = conf.split(';'); if (!key || !url) { @@ -122,15 +122,15 @@ export class FrontendService { instanceId: this.instanceSettings.instanceId, telemetry: telemetrySettings, posthog: { - enabled: config.getEnv('diagnostics.enabled'), - apiHost: config.getEnv('diagnostics.config.posthog.apiHost'), - apiKey: config.getEnv('diagnostics.config.posthog.apiKey'), + enabled: this.globalConfig.diagnostics.enabled, + apiHost: this.globalConfig.diagnostics.posthogConfig.apiHost, + apiKey: this.globalConfig.diagnostics.posthogConfig.apiKey, autocapture: false, disableSessionRecording: config.getEnv('deployment.type') !== 'cloud', debug: this.globalConfig.logging.level === 'debug', }, personalizationSurveyEnabled: - config.getEnv('personalization.enabled') && config.getEnv('diagnostics.enabled'), + config.getEnv('personalization.enabled') && this.globalConfig.diagnostics.enabled, defaultLocale: config.getEnv('defaultLocale'), userManagement: { quota: this.license.getUsersLimit(), diff --git a/packages/cli/src/telemetry/__tests__/telemetry.test.ts b/packages/cli/src/telemetry/__tests__/telemetry.test.ts index 04a6cecfcada7..d0f9fae3cdf1c 100644 --- a/packages/cli/src/telemetry/__tests__/telemetry.test.ts +++ b/packages/cli/src/telemetry/__tests__/telemetry.test.ts @@ -21,6 +21,10 @@ describe('Telemetry', () => { const instanceId = 'Telemetry unit test'; const testDateTime = new Date('2022-01-01 00:00:00'); const instanceSettings = mockInstance(InstanceSettings, { instanceId }); + const globalConfig = mock({ + diagnostics: { enabled: true }, + logging: { level: 'info', outputs: ['console'] }, + }); beforeAll(() => { // @ts-expect-error Spying on private method @@ -28,7 +32,6 @@ describe('Telemetry', () => { jest.useFakeTimers(); jest.setSystemTime(testDateTime); - config.set('diagnostics.enabled', true); config.set('deployment.type', 'n8n-testing'); }); @@ -45,14 +48,7 @@ describe('Telemetry', () => { const postHog = new PostHogClient(instanceSettings, mock()); await postHog.init(); - telemetry = new Telemetry( - mock(), - postHog, - mock(), - instanceSettings, - mock(), - mock({ logging: { level: 'info', outputs: ['console'] } }), - ); + telemetry = new Telemetry(mock(), postHog, mock(), instanceSettings, mock(), globalConfig); // @ts-expect-error Assigning to private property telemetry.rudderStack = mockRudderStack; }); diff --git a/packages/cli/src/telemetry/index.ts b/packages/cli/src/telemetry/index.ts index d9a8e590f4fb3..a8d39d898ee8a 100644 --- a/packages/cli/src/telemetry/index.ts +++ b/packages/cli/src/telemetry/index.ts @@ -5,7 +5,6 @@ import { InstanceSettings } from 'n8n-core'; import type { ITelemetryTrackProperties } from 'n8n-workflow'; import { Container, Service } from 'typedi'; -import config from '@/config'; import { LOWEST_SHUTDOWN_PRIORITY, N8N_VERSION } from '@/constants'; import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository'; import { ProjectRepository } from '@/databases/repositories/project.repository'; @@ -54,10 +53,9 @@ export class Telemetry { ) {} async init() { - const enabled = config.getEnv('diagnostics.enabled'); + const { enabled, backendConfig } = this.globalConfig.diagnostics; if (enabled) { - const conf = config.getEnv('diagnostics.config.backend'); - const [key, dataPlaneUrl] = conf.split(';'); + const [key, dataPlaneUrl] = backendConfig.split(';'); if (!key || !dataPlaneUrl) { this.logger.warn('Diagnostics backend config is invalid'); diff --git a/packages/cli/src/webhooks/webhook-helpers.ts b/packages/cli/src/webhooks/webhook-helpers.ts index 72628b8351695..6110584f7e555 100644 --- a/packages/cli/src/webhooks/webhook-helpers.ts +++ b/packages/cli/src/webhooks/webhook-helpers.ts @@ -464,6 +464,11 @@ export async function executeWebhook( projectId: project?.id, }; + // When resuming from a wait node, copy over the pushRef from the execution-data + if (!runData.pushRef) { + runData.pushRef = runExecutionData.pushRef; + } + let responsePromise: IDeferredPromise | undefined; if (responseMode === 'responseNode') { responsePromise = createDeferredPromise(); diff --git a/packages/cli/src/workflow-execute-additional-data.ts b/packages/cli/src/workflow-execute-additional-data.ts index 08d6ba09e41a6..97322f4fe0230 100644 --- a/packages/cli/src/workflow-execute-additional-data.ts +++ b/packages/cli/src/workflow-execute-additional-data.ts @@ -307,7 +307,7 @@ function hookFunctionsPush(): IWorkflowExecuteHooks { }, ], workflowExecuteAfter: [ - async function (this: WorkflowHooks): Promise { + async function (this: WorkflowHooks, fullRunData: IRun): Promise { const { pushRef, executionId } = this; if (pushRef === undefined) return; @@ -318,7 +318,9 @@ function hookFunctionsPush(): IWorkflowExecuteHooks { workflowId, }); - pushInstance.send('executionFinished', { executionId }, pushRef); + const pushType = + fullRunData.status === 'waiting' ? 'executionWaiting' : 'executionFinished'; + pushInstance.send(pushType, { executionId }, pushRef); }, ], }; @@ -430,22 +432,21 @@ function hookFunctionsSave(): IWorkflowExecuteHooks { (executionStatus === 'success' && !saveSettings.success) || (executionStatus !== 'success' && !saveSettings.error); - if (shouldNotSave && !fullRunData.waitTill) { - if (!fullRunData.waitTill && !isManualMode) { - executeErrorWorkflow( - this.workflowData, - fullRunData, - this.mode, - this.executionId, - this.retryOf, - ); - await Container.get(ExecutionRepository).hardDelete({ - workflowId: this.workflowData.id, - executionId: this.executionId, - }); + if (shouldNotSave && !fullRunData.waitTill && !isManualMode) { + executeErrorWorkflow( + this.workflowData, + fullRunData, + this.mode, + this.executionId, + this.retryOf, + ); - return; - } + await Container.get(ExecutionRepository).hardDelete({ + workflowId: this.workflowData.id, + executionId: this.executionId, + }); + + return; } // Although it is treated as IWorkflowBase here, it's being instantiated elsewhere with properties that may be sensitive @@ -1110,6 +1111,9 @@ export function getWorkflowHooksWorkerMain( hookFunctions.nodeExecuteAfter = []; hookFunctions.workflowExecuteAfter = [ async function (this: WorkflowHooks, fullRunData: IRun): Promise { + // Don't delete executions before they are finished + if (!fullRunData.finished) return; + const executionStatus = determineFinalExecutionStatus(fullRunData); const saveSettings = toSaveSettings(this.workflowData.settings); diff --git a/packages/cli/templates/form-trigger.handlebars b/packages/cli/templates/form-trigger.handlebars index 57d93cb29144b..02611f5b5b285 100644 --- a/packages/cli/templates/form-trigger.handlebars +++ b/packages/cli/templates/form-trigger.handlebars @@ -740,14 +740,6 @@ } return; - }).then(() => { - window.addEventListener('storage', function(event) { - if (event.key === 'n8n_redirect_to_next_form_test_page' && event.newValue) { - const newUrl = event.newValue; - localStorage.removeItem('n8n_redirect_to_next_form_test_page'); - window.location.replace(newUrl); - } - }); }) .catch(function (error) { console.error('Error:', error); diff --git a/packages/cli/test/integration/runners/task-runner-module.external.test.ts b/packages/cli/test/integration/runners/task-runner-module.external.test.ts index 4974abfb3972f..bdabdf56aea55 100644 --- a/packages/cli/test/integration/runners/task-runner-module.external.test.ts +++ b/packages/cli/test/integration/runners/task-runner-module.external.test.ts @@ -1,6 +1,7 @@ import { TaskRunnersConfig } from '@n8n/config'; import Container from 'typedi'; +import { MissingAuthTokenError } from '@/runners/errors/missing-auth-token.error'; import { TaskRunnerModule } from '@/runners/task-runner-module'; import { DefaultTaskRunnerDisconnectAnalyzer } from '../../../src/runners/default-task-runner-disconnect-analyzer'; @@ -10,6 +11,7 @@ describe('TaskRunnerModule in external mode', () => { const runnerConfig = Container.get(TaskRunnersConfig); runnerConfig.mode = 'external'; runnerConfig.port = 0; + runnerConfig.authToken = 'test'; const module = Container.get(TaskRunnerModule); afterEach(async () => { @@ -24,6 +26,17 @@ describe('TaskRunnerModule in external mode', () => { await expect(module.start()).rejects.toThrow('Task runner is disabled'); }); + it('should throw if auth token is missing', async () => { + const runnerConfig = new TaskRunnersConfig(); + runnerConfig.mode = 'external'; + runnerConfig.enabled = true; + runnerConfig.authToken = ''; + + const module = new TaskRunnerModule(runnerConfig); + + await expect(module.start()).rejects.toThrowError(MissingAuthTokenError); + }); + it('should start the task runner', async () => { runnerConfig.enabled = true; diff --git a/packages/cli/test/integration/security-audit/instance-risk-reporter.test.ts b/packages/cli/test/integration/security-audit/instance-risk-reporter.test.ts index 928667b518d77..58a2a2c9a8793 100644 --- a/packages/cli/test/integration/security-audit/instance-risk-reporter.test.ts +++ b/packages/cli/test/integration/security-audit/instance-risk-reporter.test.ts @@ -1,9 +1,9 @@ +import { GlobalConfig } from '@n8n/config'; import { mock } from 'jest-mock-extended'; import { NodeConnectionType } from 'n8n-workflow'; import Container from 'typedi'; import { v4 as uuid } from 'uuid'; -import config from '@/config'; import { WorkflowRepository } from '@/databases/repositories/workflow.repository'; import { generateNanoId } from '@/databases/utils/generators'; import { INSTANCE_REPORT, WEBHOOK_VALIDATOR_NODE_TYPES } from '@/security-audit/constants'; @@ -239,8 +239,7 @@ test('should not report outdated instance when up to date', async () => { }); test('should report security settings', async () => { - config.set('diagnostics.enabled', true); - + Container.get(GlobalConfig).diagnostics.enabled = true; const testAudit = await securityAuditService.run(['instance']); const section = getRiskSection( diff --git a/packages/core/src/BinaryData/FileSystem.manager.ts b/packages/core/src/BinaryData/FileSystem.manager.ts index f49e6e5c02a86..66eecd626a778 100644 --- a/packages/core/src/BinaryData/FileSystem.manager.ts +++ b/packages/core/src/BinaryData/FileSystem.manager.ts @@ -93,7 +93,7 @@ export class FileSystemManager implements BinaryData.Manager { // binary files stored in nested dirs - `filesystem-v2` const binaryDataDirs = ids.map(({ workflowId, executionId }) => - this.resolvePath(`workflows/${workflowId}/executions/${executionId}/binary_data/`), + this.resolvePath(`workflows/${workflowId}/executions/${executionId}`), ); await Promise.all( diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index 2ae12908aca69..c6e0316038cc7 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -916,7 +916,6 @@ export class WorkflowExecute { let nodeSuccessData: INodeExecutionData[][] | null | undefined; let runIndex: number; let startTime: number; - let taskData: ITaskData; if (this.runExecutionData.startData === undefined) { this.runExecutionData.startData = {}; @@ -1446,13 +1445,13 @@ export class WorkflowExecute { this.runExecutionData.resultData.runData[executionNode.name] = []; } - taskData = { + const taskData: ITaskData = { hints: executionHints, startTime, executionTime: new Date().getTime() - startTime, source: !executionData.source ? [] : executionData.source.main, metadata: executionData.metadata, - executionStatus: 'success', + executionStatus: this.runExecutionData.waitTill ? 'waiting' : 'success', }; if (executionError !== undefined) { diff --git a/packages/core/test/FileSystem.manager.test.ts b/packages/core/test/FileSystem.manager.test.ts index 581974c0e9093..edb6bd5e77f7c 100644 --- a/packages/core/test/FileSystem.manager.test.ts +++ b/packages/core/test/FileSystem.manager.test.ts @@ -147,6 +147,11 @@ describe('copyByFilePath()', () => { }); describe('deleteMany()', () => { + const rmOptions = { + force: true, + recursive: true, + }; + it('should delete many files by workflow ID and execution ID', async () => { const ids = [ { workflowId, executionId }, @@ -160,6 +165,16 @@ describe('deleteMany()', () => { await expect(promise).resolves.not.toThrow(); expect(fsp.rm).toHaveBeenCalledTimes(2); + expect(fsp.rm).toHaveBeenNthCalledWith( + 1, + `${storagePath}/workflows/${workflowId}/executions/${executionId}`, + rmOptions, + ); + expect(fsp.rm).toHaveBeenNthCalledWith( + 2, + `${storagePath}/workflows/${otherWorkflowId}/executions/${otherExecutionId}`, + rmOptions, + ); }); it('should suppress error on non-existing filepath', async () => { diff --git a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue index 3cd62205f680a..7e7dc3a77401a 100644 --- a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue +++ b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue @@ -344,6 +344,8 @@ async function onCopyButtonClick(content: string, e: MouseEvent) { .container { height: 100%; position: relative; + display: grid; + grid-template-rows: auto 1fr auto; } p { @@ -373,10 +375,6 @@ p { background-color: var(--color-background-light); border: var(--border-base); border-top: 0; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - padding-bottom: 250px; // make scrollable at the end position: relative; pre, @@ -390,7 +388,13 @@ p { } .messages { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; padding: var(--spacing-xs); + overflow-y: auto; & + & { padding-top: 0; diff --git a/packages/editor-ui/src/App.vue b/packages/editor-ui/src/App.vue index c9d23632de90c..dbcbb2a1c4bff 100644 --- a/packages/editor-ui/src/App.vue +++ b/packages/editor-ui/src/App.vue @@ -128,7 +128,8 @@ watch(defaultLocale, (newLocale) => { .container { height: 100vh; overflow: hidden; - display: flex; + display: grid; + grid-template-columns: 1fr auto; } // App grid is the main app layout including modals and other absolute positioned elements @@ -136,13 +137,12 @@ watch(defaultLocale, (newLocale) => { position: relative; display: grid; height: 100vh; - flex-basis: 100%; grid-template-areas: 'banners banners' 'sidebar header' 'sidebar content'; - grid-auto-columns: minmax(0, max-content) 1fr; - grid-template-rows: auto fit-content($header-height) 1fr; + grid-template-columns: auto 1fr; + grid-template-rows: auto auto 1fr; } .banners { diff --git a/packages/editor-ui/src/__tests__/render.ts b/packages/editor-ui/src/__tests__/render.ts index e46b615993499..3bc310f7908db 100644 --- a/packages/editor-ui/src/__tests__/render.ts +++ b/packages/editor-ui/src/__tests__/render.ts @@ -1,6 +1,6 @@ import type { Plugin } from 'vue'; import { render } from '@testing-library/vue'; -import { i18nInstance, I18nPlugin } from '@/plugins/i18n'; +import { i18nInstance } from '@/plugins/i18n'; import { GlobalComponentsPlugin } from '@/plugins/components'; import { GlobalDirectivesPlugin } from '@/plugins/directives'; import { FontAwesomePlugin } from '@/plugins/icons'; @@ -32,7 +32,6 @@ const defaultOptions = { 'vue-json-pretty': vueJsonPretty, }, plugins: [ - I18nPlugin, i18nInstance, PiniaVuePlugin, FontAwesomePlugin, diff --git a/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue b/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue index db4d8ee1057c9..d83193815b165 100644 --- a/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue +++ b/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue @@ -103,12 +103,6 @@ function onClose() { @@ -836,6 +842,7 @@ $--header-spacing: 20px; width: 100%; display: flex; align-items: center; + flex-wrap: wrap; } .group { diff --git a/packages/editor-ui/src/components/MainSidebar.vue b/packages/editor-ui/src/components/MainSidebar.vue index eefde16b1d455..3ae4dc147e868 100644 --- a/packages/editor-ui/src/components/MainSidebar.vue +++ b/packages/editor-ui/src/components/MainSidebar.vue @@ -35,7 +35,7 @@ const workflowsStore = useWorkflowsStore(); const { callDebounced } = useDebounce(); const externalHooks = useExternalHooks(); -const locale = useI18n(); +const i18n = useI18n(); const route = useRoute(); const router = useRouter(); const telemetry = useTelemetry(); @@ -53,11 +53,11 @@ const fullyExpanded = ref(false); const userMenuItems = ref([ { id: 'settings', - label: locale.baseText('settings'), + label: i18n.baseText('settings'), }, { id: 'logout', - label: locale.baseText('auth.signout'), + label: i18n.baseText('auth.signout'), }, ]); @@ -73,7 +73,7 @@ const mainMenuItems = computed(() => [ // Link to in-app templates, available if custom templates are enabled id: 'templates', icon: 'box-open', - label: locale.baseText('mainSidebar.templates'), + label: i18n.baseText('mainSidebar.templates'), position: 'bottom', available: settingsStore.isTemplatesEnabled && templatesStore.hasCustomTemplatesHost, route: { to: { name: VIEWS.TEMPLATES } }, @@ -82,7 +82,7 @@ const mainMenuItems = computed(() => [ // Link to website templates, available if custom templates are not enabled id: 'templates', icon: 'box-open', - label: locale.baseText('mainSidebar.templates'), + label: i18n.baseText('mainSidebar.templates'), position: 'bottom', available: settingsStore.isTemplatesEnabled && !templatesStore.hasCustomTemplatesHost, link: { @@ -93,7 +93,7 @@ const mainMenuItems = computed(() => [ { id: 'variables', icon: 'variable', - label: locale.baseText('mainSidebar.variables'), + label: i18n.baseText('mainSidebar.variables'), customIconSize: 'medium', position: 'bottom', route: { to: { name: VIEWS.VARIABLES } }, @@ -101,13 +101,13 @@ const mainMenuItems = computed(() => [ { id: 'help', icon: 'question', - label: locale.baseText('mainSidebar.help'), + label: i18n.baseText('mainSidebar.help'), position: 'bottom', children: [ { id: 'quickstart', icon: 'video', - label: locale.baseText('mainSidebar.helpMenuItems.quickstart'), + label: i18n.baseText('mainSidebar.helpMenuItems.quickstart'), link: { href: 'https://www.youtube.com/watch?v=1MwSoB0gnM4', target: '_blank', @@ -116,7 +116,7 @@ const mainMenuItems = computed(() => [ { id: 'docs', icon: 'book', - label: locale.baseText('mainSidebar.helpMenuItems.documentation'), + label: i18n.baseText('mainSidebar.helpMenuItems.documentation'), link: { href: 'https://docs.n8n.io?utm_source=n8n_app&utm_medium=app_sidebar', target: '_blank', @@ -125,7 +125,7 @@ const mainMenuItems = computed(() => [ { id: 'forum', icon: 'users', - label: locale.baseText('mainSidebar.helpMenuItems.forum'), + label: i18n.baseText('mainSidebar.helpMenuItems.forum'), link: { href: 'https://community.n8n.io?utm_source=n8n_app&utm_medium=app_sidebar', target: '_blank', @@ -134,7 +134,7 @@ const mainMenuItems = computed(() => [ { id: 'examples', icon: 'graduation-cap', - label: locale.baseText('mainSidebar.helpMenuItems.course'), + label: i18n.baseText('mainSidebar.helpMenuItems.course'), link: { href: 'https://docs.n8n.io/courses/', target: '_blank', @@ -143,7 +143,7 @@ const mainMenuItems = computed(() => [ { id: 'report-bug', icon: 'bug', - label: locale.baseText('mainSidebar.helpMenuItems.reportBug'), + label: i18n.baseText('mainSidebar.helpMenuItems.reportBug'), link: { href: getReportingURL(), target: '_blank', @@ -152,7 +152,7 @@ const mainMenuItems = computed(() => [ { id: 'about', icon: 'info', - label: locale.baseText('mainSidebar.aboutN8n'), + label: i18n.baseText('mainSidebar.aboutN8n'), position: 'bottom', }, ], @@ -357,10 +357,10 @@ const checkWidthAndAdjustSidebar = async (width: number) => { diff --git a/packages/editor-ui/src/components/MfaSetupModal.vue b/packages/editor-ui/src/components/MfaSetupModal.vue index 663108ffed03f..9f292124c36bc 100644 --- a/packages/editor-ui/src/components/MfaSetupModal.vue +++ b/packages/editor-ui/src/components/MfaSetupModal.vue @@ -39,7 +39,7 @@ const loadingQrCode = ref(true); const clipboard = useClipboard(); const userStore = useUsersStore(); -const i18 = useI18n(); +const i18n = useI18n(); const toast = useToast(); // #endregion @@ -64,15 +64,15 @@ const onInput = (value: string) => { authenticatorCode.value = value; }) .catch(() => { - infoTextErrorMessage.value = i18.baseText('mfa.setup.invalidCode'); + infoTextErrorMessage.value = i18n.baseText('mfa.setup.invalidCode'); }); }; const onCopySecretToClipboard = () => { void clipboard.copy(secret.value); toast.showToast({ - title: i18.baseText('mfa.setup.step1.toast.copyToClipboard.title'), - message: i18.baseText('mfa.setup.step1.toast.copyToClipboard.message'), + title: i18n.baseText('mfa.setup.step1.toast.copyToClipboard.title'), + message: i18n.baseText('mfa.setup.step1.toast.copyToClipboard.message'), type: 'success', }); }; @@ -102,20 +102,20 @@ const onSetupClick = async () => { closeDialog(); toast.showMessage({ type: 'success', - title: i18.baseText('mfa.setup.step2.toast.setupFinished.message'), + title: i18n.baseText('mfa.setup.step2.toast.setupFinished.message'), }); } catch (e) { if (e.errorCode === MFA_AUTHENTICATION_TOKEN_WINDOW_EXPIRED) { toast.showMessage({ type: 'error', - title: i18.baseText('mfa.setup.step2.toast.tokenExpired.error.message'), + title: i18n.baseText('mfa.setup.step2.toast.tokenExpired.error.message'), }); return; } toast.showMessage({ type: 'error', - title: i18.baseText('mfa.setup.step2.toast.setupFinished.error.message'), + title: i18n.baseText('mfa.setup.step2.toast.setupFinished.error.message'), }); } }; @@ -127,7 +127,7 @@ const getMfaQR = async () => { secret.value = response.secret; recoveryCodes.value = response.recoveryCodes; } catch (error) { - toast.showError(error, i18.baseText('settings.api.view.error')); + toast.showError(error, i18n.baseText('settings.api.view.error')); } finally { loadingQrCode.value = false; } @@ -153,8 +153,8 @@ onMounted(async () => { max-height="640px" :title=" !showRecoveryCodes - ? i18.baseText('mfa.setup.step1.title') - : i18.baseText('mfa.setup.step2.title') + ? i18n.baseText('mfa.setup.step1.title') + : i18n.baseText('mfa.setup.step2.title') " :event-bus="modalBus" :name="MFA_SETUP_MODAL_KEY_NAME" @@ -165,21 +165,21 @@ onMounted(async () => {
{{ - i18.baseText('mfa.setup.step1.instruction1.title') + i18n.baseText('mfa.setup.step1.instruction1.title') }}
@@ -190,7 +190,7 @@ onMounted(async () => {
{{ - i18.baseText('mfa.setup.step1.instruction2.title') + i18n.baseText('mfa.setup.step1.instruction2.title') }}
@@ -198,13 +198,13 @@ onMounted(async () => { size="medium" :bold="false" :class="$style.labelTooltip" - :label="i18.baseText('mfa.setup.step1.input.label')" + :label="i18n.baseText('mfa.setup.step1.input.label')" > {
{{ - i18.baseText('mfa.setup.step2.description') + i18n.baseText('mfa.setup.step2.description') }}
@@ -227,23 +227,23 @@ onMounted(async () => {
- + - +
@@ -256,7 +256,7 @@ onMounted(async () => { {
(); const workflowsStore = useWorkflowsStore(); const nodeTypesStore = useNodeTypesStore(); const nodeHelpers = useNodeHelpers(); +const i18n = useI18n(); const { debounce } = useDebounce(); const emit = defineEmits<{ switchSelectedNode: [nodeName: string]; @@ -245,7 +247,7 @@ defineExpose({ Add {{ connection.displayName }} @@ -285,7 +287,7 @@ defineExpose({ {{ node.node.name }} diff --git a/packages/editor-ui/src/components/Node/NodeCreation.vue b/packages/editor-ui/src/components/Node/NodeCreation.vue index dd00098932b1a..216a038e3a6e0 100644 --- a/packages/editor-ui/src/components/Node/NodeCreation.vue +++ b/packages/editor-ui/src/components/Node/NodeCreation.vue @@ -13,6 +13,7 @@ import type { AddedNodesAndConnections, ToggleNodeCreatorOptions } from '@/Inter import { useActions } from './NodeCreator/composables/useActions'; import { useThrottleFn } from '@vueuse/core'; import KeyboardShortcutTooltip from '@/components/KeyboardShortcutTooltip.vue'; +import { useI18n } from '@/composables/useI18n'; type Props = { nodeViewScale: number; @@ -34,6 +35,7 @@ const emit = defineEmits<{ }>(); const uiStore = useUIStore(); +const i18n = useI18n(); const { getAddedNodesAndConnections } = useActions(); @@ -101,7 +103,7 @@ onBeforeUnmount(() => {
@@ -119,7 +121,7 @@ onBeforeUnmount(() => { @click="addStickyNote" > diff --git a/packages/editor-ui/src/components/Node/NodeCreator/Modes/NodesMode.vue b/packages/editor-ui/src/components/Node/NodeCreator/Modes/NodesMode.vue index ce833afa17662..b577669169143 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/Modes/NodesMode.vue +++ b/packages/editor-ui/src/components/Node/NodeCreator/Modes/NodesMode.vue @@ -245,7 +245,7 @@ registerKeyHook('MainViewArrowLeft', { diff --git a/packages/editor-ui/src/components/Node/NodeCreator/Panel/NoResults.vue b/packages/editor-ui/src/components/Node/NodeCreator/Panel/NoResults.vue index e6dce65be3aac..e8d5977613aeb 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/Panel/NoResults.vue +++ b/packages/editor-ui/src/components/Node/NodeCreator/Panel/NoResults.vue @@ -7,6 +7,7 @@ import { import type { NodeFilterType } from '@/Interface'; import NoResultsIcon from './NoResultsIcon.vue'; +import { useI18n } from '@/composables/useI18n'; export interface Props { showIcon?: boolean; @@ -15,6 +16,7 @@ export interface Props { } defineProps(); +const i18n = useI18n(); diff --git a/packages/editor-ui/src/components/NodeExecuteButton.vue b/packages/editor-ui/src/components/NodeExecuteButton.vue index 43b4dfa7dcfd4..f801f0701c45e 100644 --- a/packages/editor-ui/src/components/NodeExecuteButton.vue +++ b/packages/editor-ui/src/components/NodeExecuteButton.vue @@ -65,7 +65,7 @@ const lastPopupCountUpdate = ref(0); const codeGenerationInProgress = ref(false); const router = useRouter(); -const { runWorkflow, runWorkflowResolvePending, stopCurrentExecution } = useRunWorkflow({ router }); +const { runWorkflow, stopCurrentExecution } = useRunWorkflow({ router }); const workflowsStore = useWorkflowsStore(); const externalHooks = useExternalHooks(); @@ -353,17 +353,10 @@ async function onClick() { telemetry.track('User clicked execute node button', telemetryPayload); await externalHooks.run('nodeExecuteButton.onClick', telemetryPayload); - if (workflowsStore.isWaitingExecution) { - await runWorkflowResolvePending({ - destinationNode: props.nodeName, - source: 'RunData.ExecuteNodeButton', - }); - } else { - await runWorkflow({ - destinationNode: props.nodeName, - source: 'RunData.ExecuteNodeButton', - }); - } + await runWorkflow({ + destinationNode: props.nodeName, + source: 'RunData.ExecuteNodeButton', + }); emit('execute'); } diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 1d7eb03885230..5256f41983a34 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -981,7 +981,7 @@ onBeforeUnmount(() => {

- {{ $locale.baseText('nodeSettings.communityNodeUnknown.title') }} + {{ i18n.baseText('nodeSettings.communityNodeUnknown.title') }}
@@ -1004,7 +1004,7 @@ onBeforeUnmount(() => { :to="COMMUNITY_NODES_INSTALLATION_DOCS_URL" @click="onMissingNodeLearnMoreLinkClick" > - {{ $locale.baseText('nodeSettings.communityNodeUnknown.installLink.text') }} + {{ i18n.baseText('nodeSettings.communityNodeUnknown.installLink.text') }}
@@ -1012,7 +1012,7 @@ onBeforeUnmount(() => { @@ -1021,7 +1021,7 @@ onBeforeUnmount(() => { {
- {{ $locale.baseText('nodeSettings.thisNodeDoesNotHaveAnyParameters') }} + {{ i18n.baseText('nodeSettings.thisNodeDoesNotHaveAnyParameters') }}
@@ -1064,7 +1064,7 @@ onBeforeUnmount(() => { > { />
{{ - $locale.baseText('nodeSettings.nodeVersion', { + i18n.baseText('nodeSettings.nodeVersion', { interpolate: { node: nodeType?.displayName as string, version: (node.typeVersion ?? latestVersion).toString(), diff --git a/packages/editor-ui/src/components/NodeTitle.vue b/packages/editor-ui/src/components/NodeTitle.vue index d0fd1b5c05a5c..8445f8832fb62 100644 --- a/packages/editor-ui/src/components/NodeTitle.vue +++ b/packages/editor-ui/src/components/NodeTitle.vue @@ -1,5 +1,6 @@