@algolia/n8n-nodes-algolia 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -13
- package/dist/credentials/AlgoliaApi.credentials.js +1 -41
- package/dist/nodes/Algolia/Algolia.node.js +852 -17921
- package/package.json +10 -11
- package/dist/nodes/Algolia/specs/abtesting-v3.json +0 -1589
- package/dist/nodes/Algolia/specs/abtesting.json +0 -1493
- package/dist/nodes/Algolia/specs/advanced-personalization.json +0 -1493
- package/dist/nodes/Algolia/specs/analytics.json +0 -2879
- package/dist/nodes/Algolia/specs/composition.json +0 -3714
- package/dist/nodes/Algolia/specs/crawler.json +0 -2999
- package/dist/nodes/Algolia/specs/ingestion.json +0 -5621
- package/dist/nodes/Algolia/specs/insights.json +0 -1677
- package/dist/nodes/Algolia/specs/monitoring.json +0 -1223
- package/dist/nodes/Algolia/specs/personalization.json +0 -666
- package/dist/nodes/Algolia/specs/query-suggestions.json +0 -1090
- package/dist/nodes/Algolia/specs/recommend.json +0 -3212
- package/dist/nodes/Algolia/specs/search.json +0 -8489
- /package/dist/{nodes/Algolia/algolia.svg → algolia.svg} +0 -0
package/README.md
CHANGED
|
@@ -16,6 +16,26 @@ Algolia is a hosted search API that provides search-as-a-service solutions. It o
|
|
|
16
16
|
|
|
17
17
|
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
18
18
|
|
|
19
|
+
## Credentials
|
|
20
|
+
|
|
21
|
+
To use this node, you need to authenticate with Algolia using API credentials.
|
|
22
|
+
|
|
23
|
+
### Prerequisites
|
|
24
|
+
|
|
25
|
+
1. [Sign up](https://dashboard.algolia.com/users/sign_up) or [log into](https://dashboard.algolia.com/users/sign_in) your Algolia account
|
|
26
|
+
2. In your Algolia dashboard, go to [Settings](https://dashboard.algolia.com/account/overview) > [API Keys](https://dashboard.algolia.com/account/api-keys/all)
|
|
27
|
+
3. Copy your Application ID
|
|
28
|
+
4. Copy your Admin API Key
|
|
29
|
+
- Required for if you want to manage your API keys from n8n - otherwise the Write API Key should be enough)
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
5. In n8n, create new Algolia API credentials with:
|
|
34
|
+
- **Application ID**: Your Algolia Application ID
|
|
35
|
+
- **Admin API Key**: Your Algolia Admin API Key
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
19
39
|
## Operations
|
|
20
40
|
|
|
21
41
|
This node supports the following operations:
|
|
@@ -112,23 +132,64 @@ This node supports the following operations:
|
|
|
112
132
|
- **Delete a source** - Deletes a source from the list of allowed sources.
|
|
113
133
|
<!-- OPERATIONS END -->
|
|
114
134
|
|
|
115
|
-
##
|
|
135
|
+
## Usage examples
|
|
116
136
|
|
|
117
|
-
|
|
137
|
+
### Batch insert into an Algolia Index
|
|
118
138
|
|
|
119
|
-
|
|
139
|
+
This section demonstrates how to efficiently perform batch inserts into an Algolia index using n8n.
|
|
120
140
|
|
|
121
|
-
|
|
122
|
-
2. Create an application in your Algolia dashboard
|
|
141
|
+
Batch operations are ideal for processing large datasets, as they reduce latency and improve data consistency.
|
|
123
142
|
|
|
124
|
-
|
|
143
|
+
<div align="center">
|
|
125
144
|
|
|
126
|
-
1.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
145
|
+

|
|
146
|
+
<i>Example of a Batch indexing operation workflow</i>
|
|
147
|
+
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
**Step-by-step guide:**
|
|
151
|
+
|
|
152
|
+
1. Add a **webhook node** or a third-party webhook trigger node to initiate your workflow.
|
|
153
|
+
|
|
154
|
+
2. Utilize a **Code node** (JavaScript or Python) to format your data for the Algolia batch insert operation.
|
|
155
|
+
- If your items already have unique identifiers, assign them to the `objectID` property.
|
|
156
|
+
- If not, Algolia will automatically generate a unique `objectID` when using the `addObject` or `partialUpdateObject` actions.
|
|
157
|
+
- To remove a record, use the `deleteObject` action.
|
|
158
|
+
- For a complete overview of available actions, refer to the [official documentation](https://www.algolia.com/doc/rest-api/search/batch#body-requests).
|
|
159
|
+
|
|
160
|
+

|
|
161
|
+
|
|
162
|
+
3. Add the Algolia node for **Batch indexing operations on one index** and connect it to your data list. As a best practice, ensure that only one item at a time enters this node.
|
|
163
|
+
|
|
164
|
+

|
|
165
|
+
|
|
166
|
+
4. Activate the workflow to begin automated batch indexing.
|
|
167
|
+
|
|
168
|
+
Now, when items are added/deleted from your 3pr-party software, this workflow will make sure your index stays fresh and up to date!
|
|
169
|
+
|
|
170
|
+
_API Rate limitations apply. See https://www.algolia.com/doc/guides/scaling/algolia-service-limits for more details._
|
|
171
|
+
|
|
172
|
+
### Scheduled Cleanup of Deprecated Synonyms
|
|
173
|
+
|
|
174
|
+
Over time, synonyms in your Algolia index might become outdated or no longer needed. With n8n, you can automate the removal of deprecated or unused synonyms to keep your index clean and relevant.
|
|
175
|
+
|
|
176
|
+
<div align="center">
|
|
177
|
+
|
|
178
|
+

|
|
179
|
+
<i>Example of a Batch indexing operation workflow</i>
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
**Step-by-step guide:**
|
|
184
|
+
|
|
185
|
+
1. Use the **Schedule trigger** node to schedule the cleanup to run regularly (daily, weekly, etc.).
|
|
186
|
+
2. Add the Algolia node to **"Search for synonyms"** in your target index.
|
|
187
|
+
3. Use a code node to filter synonyms that match your criteria for deprecation or removal (for example, a custom `deprecated` tag or certain naming patterns).
|
|
188
|
+
4. For each deprecated synonym, add an Algolia node to **"Delete a synonym"** by its ID.
|
|
189
|
+
|
|
190
|
+
This workflow helps ensure your Algolia synonyms stay accurate and up to date.
|
|
191
|
+
|
|
192
|
+
_API Rate limitations apply. See https://www.algolia.com/doc/guides/scaling/algolia-service-limits for more details._
|
|
132
193
|
|
|
133
194
|
## Compatibility
|
|
134
195
|
|
|
@@ -137,5 +198,5 @@ This node requires n8n version 1.0.0 or higher and Node.js 20.15 or higher.
|
|
|
137
198
|
## Resources
|
|
138
199
|
|
|
139
200
|
- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
140
|
-
- [Algolia API documentation](https://www.algolia.com/doc/api
|
|
201
|
+
- [Algolia API documentation](https://www.algolia.com/doc/rest-api/search)
|
|
141
202
|
- [Algolia dashboard](https://www.algolia.com/apps)
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
class AlgoliaApi {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.name = "algoliaApi";
|
|
8
|
-
this.displayName = "Algolia API";
|
|
9
|
-
this.documentationUrl = "https://www.algolia.com";
|
|
10
|
-
this.properties = [
|
|
11
|
-
{
|
|
12
|
-
displayName: "Application ID",
|
|
13
|
-
name: "appId",
|
|
14
|
-
type: "string",
|
|
15
|
-
required: true,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
displayName: "Admin API Key",
|
|
20
|
-
name: "adminApiKey",
|
|
21
|
-
type: "string",
|
|
22
|
-
typeOptions: {
|
|
23
|
-
password: true
|
|
24
|
-
},
|
|
25
|
-
required: true,
|
|
26
|
-
default: ""
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
this.authenticate = {
|
|
30
|
-
type: "generic",
|
|
31
|
-
properties: {
|
|
32
|
-
headers: {
|
|
33
|
-
"X-Algolia-Application-Id": "={{ $credentials.appId }}",
|
|
34
|
-
"X-Algolia-API-Key": "={{ $credentials.adminApiKey }}"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
exports.AlgoliaApi = AlgoliaApi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e{constructor(){this.name="algoliaApi",this.displayName="Algolia API",this.documentationUrl="https://www.algolia.com",this.icon="file:./algolia.svg",this.properties=[{displayName:"Application ID",name:"appId",type:"string",required:!0,default:""},{displayName:"Admin API Key",name:"adminApiKey",type:"string",typeOptions:{password:!0},required:!0,default:""}],this.authenticate={type:"generic",properties:{headers:{"X-Algolia-Application-Id":"={{ $credentials.appId }}","X-Algolia-API-Key":"={{ $credentials.adminApiKey }}"}}}}}exports.AlgoliaApi=e;
|