Skip to content

Commit 491f2fa

Browse files
authored
fix(editor): Search by node name (no-changelog) (#17831)
1 parent c2c3e08 commit 491f2fa

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

packages/frontend/@n8n/rest-api-client/src/api/templates.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export interface ITemplatesQuery {
114114
categories: string[];
115115
search: string;
116116
apps?: string[];
117+
nodes?: string[];
117118
sort?: string;
118119
combineWith?: string;
119120
}
@@ -160,6 +161,7 @@ export async function getWorkflows(
160161
search: string;
161162
sort?: string;
162163
apps?: string[];
164+
nodes?: string[];
163165
combineWith?: string;
164166
},
165167
headers?: RawAxiosRequestHeaders,
@@ -168,11 +170,12 @@ export async function getWorkflows(
168170
workflows: ITemplatesWorkflow[];
169171
filters: TemplateSearchFacet[];
170172
}> {
171-
const { apps, sort, combineWith, categories, ...restQuery } = query;
173+
const { apps, sort, combineWith, categories, nodes, ...restQuery } = query;
172174
const finalQuery = {
173175
...restQuery,
174176
category: stringifyArray(categories),
175-
...(apps && { app: stringifyArray(apps) }),
177+
...(apps && { apps: stringifyArray(apps) }),
178+
...(nodes && { nodes: stringifyArray(nodes) }),
176179
...(sort && { sort }),
177180
...(combineWith && { combineWith }),
178181
};

packages/frontend/editor-ui/src/experiments/personalizedTemplates/stores/personalizedTemplates.store.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import { computed, ref, watch } from 'vue';
1717
const SIMPLE_TEMPLATES = [6270, 5271, 2178];
1818

1919
const PREDEFINED_TEMPLATES_BY_NODE = {
20-
gmail: [5678, 4722, 5694],
21-
googleSheets: [5694, 5690, 5906],
22-
telegram: [5626, 2114, 4875],
23-
openAi: [2462, 2722, 2178],
24-
googleGemini: [5993, 6270, 5677],
25-
googleCalendar: [2328, 3393, 2110],
26-
youTube: [3188, 4846, 4506],
27-
airtable: [3053, 2700, 2579],
20+
'n8n-nodes-base.gmail': [5678, 4722, 5694],
21+
'n8n-nodes-base.googleSheets': [5694, 5690, 5906],
22+
'n8n-nodes-base.telegram': [5626, 2114, 4875],
23+
'@n8n/n8n-nodes-langchain.openAi': [2462, 2722, 2178],
24+
'@n8n/n8n-nodes-langchain.googleGemini': [5993, 6270, 5677],
25+
'n8n-nodes-base.googleCalendar': [2328, 3393, 2110],
26+
'n8n-nodes-base.youTube': [3188, 4846, 4506],
27+
'n8n-nodes-base.airtable': [3053, 2700, 2579],
2828
};
2929

3030
function getPredefinedFromSelected(selectedApps: string[]) {
@@ -139,7 +139,7 @@ export const usePersonalizedTemplatesStore = defineStore(STORES.PERSONALIZED_TEM
139139
categories: [],
140140
search: '',
141141
sort: 'rank:desc',
142-
apps: selectedApps.length > 0 ? selectedApps : undefined,
142+
nodes: selectedApps.length > 0 ? selectedApps : undefined,
143143
combineWith: 'or',
144144
});
145145

0 commit comments

Comments
 (0)