Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ describe('executionFinished', () => {
expect(trackExecuteAiWorkflow).toHaveBeenCalledWith('error');
});

it('should track execution of ready-to-run-ai-workflow-v1', async () => {
it('should track execution of ready-to-run-ai-workflow-v5', async () => {
const pinia = createTestingPinia();
setActivePinia(pinia);

Expand All @@ -347,7 +347,7 @@ describe('executionFinished', () => {
vi.spyOn(workflowsStore, 'getWorkflowById').mockReturnValue({
id: '1',
name: 'Test Workflow',
meta: { templateId: 'ready-to-run-ai-workflow-v1' },
meta: { templateId: 'ready-to-run-ai-workflow-v5' },
} as IWorkflowDb);

const trackExecuteAiWorkflowSuccess = vi.spyOn(
Expand Down Expand Up @@ -379,7 +379,7 @@ describe('executionFinished', () => {
expect(trackExecuteAiWorkflowSuccess).toHaveBeenCalled();
});

it('should track execution of ready-to-run-ai-workflow-v4', async () => {
it('should track execution of ready-to-run-ai-workflow-v6', async () => {
const pinia = createTestingPinia();
setActivePinia(pinia);

Expand All @@ -390,7 +390,7 @@ describe('executionFinished', () => {
vi.spyOn(workflowsStore, 'getWorkflowById').mockReturnValue({
id: '1',
name: 'Test Workflow',
meta: { templateId: 'ready-to-run-ai-workflow-v4' },
meta: { templateId: 'ready-to-run-ai-workflow-v6' },
} as IWorkflowDb);

const trackExecuteAiWorkflow = vi.spyOn(readyToRunStore, 'trackExecuteAiWorkflow');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ export async function executionFinished(
);
} else if (
templateId === 'ready-to-run-ai-workflow' ||
templateId === 'ready-to-run-ai-workflow-v1' ||
templateId === 'ready-to-run-ai-workflow-v2' ||
templateId === 'ready-to-run-ai-workflow-v3' ||
templateId === 'ready-to-run-ai-workflow-v4'
templateId === 'ready-to-run-ai-workflow-v5' ||
templateId === 'ready-to-run-ai-workflow-v6'
) {
if (data.status === 'success') {
readyToRunStore.trackExecuteAiWorkflowSuccess();
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/editor-ui/src/app/constants/experiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ export const READY_TO_RUN_V2_EXPERIMENT = {
variant2: 'variant-2-twoboxes',
};

export const READY_TO_RUN_V2_PART2_EXPERIMENT = {
name: '045_ready-to-run-worfklow_v2-2',
export const READY_TO_RUN_V2_P3_EXPERIMENT = {
name: '059_ready-to-run-worfklow_v2-3',
control: 'control',
variant3: 'variant-3',
variant4: 'variant-4',
variant5: 'variant-5',
variant6: 'variant-6',
};

export const PERSONALIZED_TEMPLATES_V3 = {
Expand Down Expand Up @@ -108,7 +108,7 @@ export const EXPERIMENTS_TO_TRACK = [
PRE_BUILT_AGENTS_EXPERIMENT.name,
TEMPLATE_RECO_V2.name,
TEMPLATES_DATA_QUALITY_EXPERIMENT.name,
READY_TO_RUN_V2_PART2_EXPERIMENT.name,
READY_TO_RUN_V2_P3_EXPERIMENT.name,
UPGRADE_PLAN_CTA_EXPERIMENT.name,
AI_BUILDER_TEMPLATE_EXAMPLES_EXPERIMENT.name,
AI_BUILDER_MULTI_AGENT_EXPERIMENT.name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { READY_TO_RUN_V2_PART2_EXPERIMENT } from '@/app/constants';
import { READY_TO_RUN_V2_P3_EXPERIMENT } from '@/app/constants';
import { useCloudPlanStore } from '@/app/stores/cloudPlan.store';
import { usePostHog } from '@/app/stores/posthog.store';
import type { WorkflowDataCreate } from '@n8n/rest-api-client';
import { STORES } from '@n8n/stores';
import { defineStore } from 'pinia';
import { computed } from 'vue';
import { READY_TO_RUN_WORKFLOW_V3 } from '../workflows/ai-workflow-v3';
import { READY_TO_RUN_WORKFLOW_V4 } from '../workflows/ai-workflow-v4';
import { READY_TO_RUN_WORKFLOW_V5 } from '../workflows/ai-workflow-v5';
import { READY_TO_RUN_WORKFLOW_V6 } from '../workflows/ai-workflow-v6';

export const useReadyToRunWorkflowsV2Store = defineStore(
STORES.EXPERIMENT_READY_TO_RUN_WORKFLOWS_V2,
Expand All @@ -15,31 +15,31 @@ export const useReadyToRunWorkflowsV2Store = defineStore(
const cloudPlanStore = useCloudPlanStore();

const currentVariant = computed(() =>
posthogStore.getVariant(READY_TO_RUN_V2_PART2_EXPERIMENT.name),
posthogStore.getVariant(READY_TO_RUN_V2_P3_EXPERIMENT.name),
);

const isVariant3 = computed(
() => currentVariant.value === READY_TO_RUN_V2_PART2_EXPERIMENT.variant3,
const isVariant5 = computed(
() => currentVariant.value === READY_TO_RUN_V2_P3_EXPERIMENT.variant5,
);
const isVariant4 = computed(
() => currentVariant.value === READY_TO_RUN_V2_PART2_EXPERIMENT.variant4,
const isVariant6 = computed(
() => currentVariant.value === READY_TO_RUN_V2_P3_EXPERIMENT.variant6,
);

const isFeatureEnabled = computed(
() => cloudPlanStore.userIsTrialing && (isVariant3.value || isVariant4.value),
() => cloudPlanStore.userIsTrialing && (isVariant5.value || isVariant6.value),
);

const getWorkflowForVariant = (): WorkflowDataCreate | undefined => {
if (!isFeatureEnabled.value) {
return;
}

if (isVariant3.value) {
return READY_TO_RUN_WORKFLOW_V3;
if (isVariant5.value) {
return READY_TO_RUN_WORKFLOW_V5;
}

if (isVariant4.value) {
return READY_TO_RUN_WORKFLOW_V4;
if (isVariant6.value) {
return READY_TO_RUN_WORKFLOW_V6;
}

return;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
import type { WorkflowDataCreate } from '@n8n/rest-api-client';

export const READY_TO_RUN_WORKFLOW_V5: WorkflowDataCreate = {
name: 'Chat with the news',
meta: { templateId: 'ready-to-run-ai-workflow-v5' },
settings: {
executionOrder: 'v1',
},
nodes: [
{
parameters: {
options: {},
},
type: '@n8n/n8n-nodes-langchain.chatTrigger',
typeVersion: 1.4,
position: [288, 0],
id: '261ee04a-4695-4d1a-bec3-9f86b5efd5eb',
name: 'When chat message received',
webhookId: 'b567d98b-aabb-4963-b0f8-6b1e8b5f8959',
},
{
parameters: {
model: {
__rl: true,
mode: 'list',
value: 'gpt-4.1-mini',
},
responsesApiEnabled: false,
options: {},
},
type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',
typeVersion: 1.3,
position: [400, 288],
id: '201ee441-da46-49fc-befa-312ad4b60479',
name: 'OpenAI Model',
credentials: {},
},
{
parameters: {},
type: '@n8n/n8n-nodes-langchain.memoryBufferWindow',
typeVersion: 1.3,
position: [576, 288],
id: 'aa874554-17b1-41a1-9e1f-8c6c197e7e2f',
name: 'Simple Memory',
},
{
parameters: {
url: 'https://hnrss.org/frontpage',
options: {},
},
type: 'n8n-nodes-base.rssFeedReadTool',
typeVersion: 1.2,
position: [1120, 288],
id: '5788980c-2a63-40ed-a375-c68ca7a3b9c0',
name: 'Hackernews',
},
{
parameters: {
url: 'https://www.theverge.com/rss/index.xml',
options: {},
},
type: 'n8n-nodes-base.rssFeedReadTool',
typeVersion: 1.2,
position: [960, 288],
id: 'f250ef18-d913-4a76-a607-b1eeebcbab23',
name: 'TheVerge',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: 'TheVerge',
name: 'The Verge',

},
{
parameters: {
url: 'https://feeds.bbci.co.uk/news/rss.xml',
options: {},
},
type: 'n8n-nodes-base.rssFeedReadTool',
typeVersion: 1.2,
position: [800, 288],
id: '0c375d2e-4b2d-4fa6-8b3e-31ac931117cb',
name: 'BBC News',
},
{
parameters: {
content:
'✅ This AI News agent is ready to use. Chat with it! \n✨ We gave you free OpenAI credits\n💡 Learn [how to build](https://n8n.io/workflows/6270-build-your-first-ai-agent/) your own agent ',
height: 80,
width: 448,
color: 4,
},
type: 'n8n-nodes-base.stickyNote',
typeVersion: 1,
position: [0, -176],
id: '052068ba-ea50-4521-9946-63ded13b23b0',
name: 'Sticky Note2',
},
{
parameters: {
options: {
systemMessage:
"=News Agent\n\n# Role\n\nYou are a concise, factual news assistant with access to these RSS tools:\n\n* BBC (Global news)\n* TheVerge (Consumer tech)\n* Hacker News (Tech discussions)\n\nYou always keep replies **short and focused (maximum 100 words total)**.\n\n# Behavior\n\n* On the first message only, greet the user and say you can search recent news.\n* When the user asks for news, always check all RSS tools and combine results from multiple feeds if relevant, but surface only the **top 1 to 5 most relevant items**.\n* Never invent information. Only use content found in the tools.\n\n# Answer Format\n\n* **Maximum 100 words per reply** (including any follow-up sentence).\n* Start with **one short intro sentence**.\n* Then provide **3–5 bullet points**, each a **single short sentence**.\n* Use short, clear sentences.\n* Add a link to the original article or source in at least one bullet.\n* Include a section **“Sources checked:”** listing the feeds used (e.g., “Sources checked: BBC, TheVerge”).\n\n# Edge Cases\n\n* If you find too little information, say so and suggest adding more news sources to the agent.\n* If the user asks you to build workflows or do non-news tasks, say you are only a news agent and point them to n8n’s AI Workflow Builder (✨ icon) and the docs: [https://docs.n8n.io/advanced-ai/ai-workflow-builder/](https://docs.n8n.io/advanced-ai/ai-workflow-builder/)\n* If the user asks for opinions or predictions, stay neutral and summarize facts only.\n* After sharing news results with the user for the first time, mention that they can also get AI-summarized news by email using this template: https://n8n.io/workflows/6270-build-your-first-ai-agent/. Only make this suggestion once in the entire chat history, not after every question (check your previous responses to make sure you don't repeat the suggestion).\n\n# Date\n\nToday is {{ $today }}\n",
},
},
type: '@n8n/n8n-nodes-langchain.agent',
typeVersion: 3,
position: [608, 0],
id: 'e481d1a1-3a3d-4583-98ae-87a9b39471a8',
name: 'AI Agent',
},
],
pinData: {},
connections: {
'When chat message received': {
main: [
[
{
node: 'AI Agent',
type: 'main',
index: 0,
},
],
],
},
'OpenAI Model': {
ai_languageModel: [
[
{
node: 'AI Agent',
type: 'ai_languageModel',
index: 0,
},
],
],
},
'Simple Memory': {
ai_memory: [
[
{
node: 'AI Agent',
type: 'ai_memory',
index: 0,
},
],
],
},
Hackernews: {
ai_tool: [
[
{
node: 'AI Agent',
type: 'ai_tool',
index: 0,
},
],
],
},
TheVerge: {
ai_tool: [
[
{
node: 'AI Agent',
type: 'ai_tool',
index: 0,
},
],
],
},
'BBC News': {
ai_tool: [
[
{
node: 'AI Agent',
type: 'ai_tool',
index: 0,
},
],
],
},
},
};
Loading
Loading