diff --git a/packages/frontend/@n8n/rest-api-client/src/api/templates.ts b/packages/frontend/@n8n/rest-api-client/src/api/templates.ts index a02fd697b8..035a270ee2 100644 --- a/packages/frontend/@n8n/rest-api-client/src/api/templates.ts +++ b/packages/frontend/@n8n/rest-api-client/src/api/templates.ts @@ -114,6 +114,7 @@ export interface ITemplatesQuery { categories: string[]; search: string; apps?: string[]; + nodes?: string[]; sort?: string; combineWith?: string; } @@ -160,6 +161,7 @@ export async function getWorkflows( search: string; sort?: string; apps?: string[]; + nodes?: string[]; combineWith?: string; }, headers?: RawAxiosRequestHeaders, @@ -168,11 +170,12 @@ export async function getWorkflows( workflows: ITemplatesWorkflow[]; filters: TemplateSearchFacet[]; }> { - const { apps, sort, combineWith, categories, ...restQuery } = query; + const { apps, sort, combineWith, categories, nodes, ...restQuery } = query; const finalQuery = { ...restQuery, category: stringifyArray(categories), - ...(apps && { app: stringifyArray(apps) }), + ...(apps && { apps: stringifyArray(apps) }), + ...(nodes && { nodes: stringifyArray(nodes) }), ...(sort && { sort }), ...(combineWith && { combineWith }), }; diff --git a/packages/frontend/editor-ui/src/experiments/personalizedTemplates/stores/personalizedTemplates.store.ts b/packages/frontend/editor-ui/src/experiments/personalizedTemplates/stores/personalizedTemplates.store.ts index 145e6c2286..bc9b5101c7 100644 --- a/packages/frontend/editor-ui/src/experiments/personalizedTemplates/stores/personalizedTemplates.store.ts +++ b/packages/frontend/editor-ui/src/experiments/personalizedTemplates/stores/personalizedTemplates.store.ts @@ -17,14 +17,14 @@ import { computed, ref, watch } from 'vue'; const SIMPLE_TEMPLATES = [6270, 5271, 2178]; const PREDEFINED_TEMPLATES_BY_NODE = { - gmail: [5678, 4722, 5694], - googleSheets: [5694, 5690, 5906], - telegram: [5626, 2114, 4875], - openAi: [2462, 2722, 2178], - googleGemini: [5993, 6270, 5677], - googleCalendar: [2328, 3393, 2110], - youTube: [3188, 4846, 4506], - airtable: [3053, 2700, 2579], + 'n8n-nodes-base.gmail': [5678, 4722, 5694], + 'n8n-nodes-base.googleSheets': [5694, 5690, 5906], + 'n8n-nodes-base.telegram': [5626, 2114, 4875], + '@n8n/n8n-nodes-langchain.openAi': [2462, 2722, 2178], + '@n8n/n8n-nodes-langchain.googleGemini': [5993, 6270, 5677], + 'n8n-nodes-base.googleCalendar': [2328, 3393, 2110], + 'n8n-nodes-base.youTube': [3188, 4846, 4506], + 'n8n-nodes-base.airtable': [3053, 2700, 2579], }; function getPredefinedFromSelected(selectedApps: string[]) { @@ -139,7 +139,7 @@ export const usePersonalizedTemplatesStore = defineStore(STORES.PERSONALIZED_TEM categories: [], search: '', sort: 'rank:desc', - apps: selectedApps.length > 0 ? selectedApps : undefined, + nodes: selectedApps.length > 0 ? selectedApps : undefined, combineWith: 'or', });