Skip to content

Commit 2504c16

Browse files
Merge branch 'master' into danny/connect-react/adding-pagination
2 parents ea8a408 + 9403ec1 commit 2504c16

File tree

197 files changed

+6672
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+6672
-199
lines changed

components/airweave/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Airweave Integration for Pipedream
2+
3+
Airweave is an open-source platform that makes **any app searchable for your agent** by syncing data from various sources with minimal configuration for agentic search.
4+
5+
## What is Airweave?
6+
7+
Airweave serves as a bridge between your data sources and agents, transforming raw data into queryable knowledge. It can extract and process data from:
8+
9+
- API endpoints (REST)
10+
- Productivity and collaboration tools
11+
- Relational databases
12+
- Document stores
13+
- File systems and storage services
14+
15+
## Available Actions
16+
17+
### Collections
18+
- **Search Collection** - Search across all data sources within a collection (semantic + keyword search)
19+
- **List Collections** - Get all collections in your organization
20+
- **Create Collection** - Create a new collection to group data sources
21+
- **Get Collection** - Retrieve details of a specific collection
22+
- **Delete Collection** - Permanently remove a collection and all associated data
23+
24+
### Sources
25+
- **List Sources** - Get all available data source connectors
26+
- **Trigger Sync** - Manually trigger a data sync for a source connection
27+
28+
## Setup
29+
30+
1. Sign up for an Airweave account at [airweave.ai](https://airweave.ai)
31+
2. Get your API key from the Airweave dashboard (Settings → API Keys)
32+
3. Connect your Airweave account in Pipedream by entering your API key
33+
34+
## Example Workflows
35+
36+
### Slack Q&A Bot
37+
Slash command → Search Airweave collection → Reply with relevant information
38+
39+
### Support Automation
40+
Form submission → Search documentation → Create support ticket with context
41+
42+
### Daily Digest
43+
Cron schedule → Search recent updates → Send email summary
44+
45+
### GitHub Integration
46+
New issue → Search codebase → Auto-comment with relevant code references
47+
48+
## Authentication
49+
50+
This integration uses API key authentication. You can find your API key in your Airweave dashboard under Settings → API Keys.
51+
52+
Optionally, you can specify a custom base URL if you're using a self-hosted Airweave instance.
53+
54+
## Links
55+
56+
- [Airweave Documentation](https://docs.airweave.ai)
57+
- [Airweave GitHub](https://github.com/airweave-ai/airweave)
58+
- [API Reference](https://docs.airweave.ai/api-reference)
59+
- [Airweave TypeScript SDK](https://github.com/airweave-ai/typescript-sdk)
60+
61+
## Support
62+
63+
For issues or questions:
64+
- Airweave Community: [GitHub Discussions](https://github.com/airweave-ai/airweave/discussions)
65+
- Pipedream Support: [pipedream.com/support](https://pipedream.com/support)
66+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-create-collection",
5+
name: "Create Collection",
6+
description: "Create a new Airweave collection. Collections are logical groups of data sources that provide unified search capabilities. The newly created collection is initially empty until you add source connections to it. [See the documentation](https://docs.airweave.ai/api-reference/collections/create)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: false,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
name: {
17+
type: "string",
18+
label: "Name",
19+
description: "Display name for the collection (e.g., 'Customer Support Data')",
20+
},
21+
readableId: {
22+
type: "string",
23+
label: "Readable ID",
24+
description: "URL-friendly identifier for the collection (lowercase, hyphens allowed, e.g., 'customer-support-data'). This cannot be changed after creation.",
25+
},
26+
description: {
27+
type: "string",
28+
label: "Description",
29+
description: "Optional description of what this collection contains and its purpose",
30+
optional: true,
31+
},
32+
},
33+
async run({ $ }) {
34+
const response = await this.airweave.createCollection({
35+
name: this.name,
36+
readable_id: this.readableId,
37+
description: this.description,
38+
});
39+
40+
$.export("$summary", `Successfully created collection: ${response.name} (${response.readable_id})`);
41+
42+
return response;
43+
},
44+
};
45+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-delete-collection",
5+
name: "Delete Collection",
6+
description: "Delete a collection and all associated data. This permanently removes the collection including all synced data and source connections. This action cannot be undone. [See the documentation](https://docs.airweave.ai/api-reference/collections/delete)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: true,
10+
openWorldHint: true,
11+
readOnlyHint: false,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
collectionId: {
17+
propDefinition: [
18+
airweave,
19+
"collectionId",
20+
],
21+
},
22+
confirmation: {
23+
type: "string",
24+
label: "Confirmation",
25+
description: "Type 'DELETE' to confirm deletion. This action cannot be undone.",
26+
},
27+
},
28+
async run({ $ }) {
29+
if (this.confirmation !== "DELETE") {
30+
throw new Error("Please type 'DELETE' to confirm deletion. This action cannot be undone.");
31+
}
32+
33+
const response = await this.airweave.deleteCollection(this.collectionId);
34+
35+
$.export("$summary", `Successfully deleted collection: ${response.name} (${response.readable_id})`);
36+
37+
return response;
38+
},
39+
};
40+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-get-collection",
5+
name: "Get Collection",
6+
description: "Retrieve details of a specific collection by its readable ID. [See the documentation](https://docs.airweave.ai/api-reference/collections/get)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: true,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
collectionId: {
17+
propDefinition: [
18+
airweave,
19+
"collectionId",
20+
],
21+
},
22+
},
23+
async run({ $ }) {
24+
const response = await this.airweave.getCollection(this.collectionId);
25+
26+
$.export("$summary", `Successfully retrieved collection: ${response.name} (${response.readable_id})`);
27+
28+
return response;
29+
},
30+
};
31+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-list-collections",
5+
name: "List Collections",
6+
description: "List all collections in your organization. Collections are logical groups of data sources that provide unified search capabilities. [See the documentation](https://docs.airweave.ai/api-reference/collections/list)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: true,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
skip: {
17+
type: "integer",
18+
label: "Skip",
19+
description: "Number of collections to skip for pagination",
20+
optional: true,
21+
default: 0,
22+
min: 0,
23+
},
24+
limit: {
25+
type: "integer",
26+
label: "Limit",
27+
description: "Maximum number of collections to return",
28+
optional: true,
29+
default: 50,
30+
min: 1,
31+
max: 100,
32+
},
33+
},
34+
async run({ $ }) {
35+
const response = await this.airweave.listCollections({
36+
skip: this.skip,
37+
limit: this.limit,
38+
});
39+
40+
const count = response.length;
41+
$.export("$summary", `Successfully retrieved ${count} collection(s)`);
42+
43+
return response;
44+
},
45+
};
46+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-list-sources",
5+
name: "List Available Sources",
6+
description: "List all available data source connectors. These are the types of integrations Airweave can connect to (e.g., GitHub, Slack, Google Drive, PostgreSQL, etc.). [See the documentation](https://docs.airweave.ai/api-reference/sources/list)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: true,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
},
17+
async run({ $ }) {
18+
const response = await this.airweave.listSources();
19+
20+
const count = response.length;
21+
$.export("$summary", `Successfully retrieved ${count} available source connector(s)`);
22+
23+
return response;
24+
},
25+
};
26+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-search-collection",
5+
name: "Search Collection",
6+
description: "Search across all data sources within a collection using semantic and keyword search. [See the documentation](https://docs.airweave.ai/api-reference/collections/search)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: true,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
collectionId: {
17+
propDefinition: [
18+
airweave,
19+
"collectionId",
20+
],
21+
},
22+
searchQuery: {
23+
propDefinition: [
24+
airweave,
25+
"searchQuery",
26+
],
27+
},
28+
searchLimit: {
29+
propDefinition: [
30+
airweave,
31+
"searchLimit",
32+
],
33+
},
34+
responseType: {
35+
propDefinition: [
36+
airweave,
37+
"responseType",
38+
],
39+
},
40+
offset: {
41+
type: "integer",
42+
label: "Offset",
43+
description: "Number of results to skip for pagination",
44+
optional: true,
45+
default: 0,
46+
min: 0,
47+
},
48+
recencyBias: {
49+
type: "string",
50+
label: "Recency Bias",
51+
description: "How much to weigh recency vs similarity (0-1). 0 = no recency effect; 1 = rank by recency only",
52+
optional: true,
53+
},
54+
},
55+
async run({ $ }) {
56+
const params = {
57+
query: this.searchQuery,
58+
limit: this.searchLimit,
59+
offset: this.offset,
60+
};
61+
62+
if (this.responseType) {
63+
params.response_type = this.responseType;
64+
}
65+
66+
if (this.recencyBias !== undefined) {
67+
params.recency_bias = parseFloat(this.recencyBias);
68+
}
69+
70+
const response = await this.airweave.searchCollection(
71+
this.collectionId,
72+
params,
73+
);
74+
75+
const resultCount = response.results?.length || 0;
76+
$.export("$summary", `Successfully searched collection "${this.collectionId}" and found ${resultCount} result(s)`);
77+
78+
return response;
79+
},
80+
};
81+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import airweave from "../../airweave.app.mjs";
2+
3+
export default {
4+
key: "airweave-trigger-sync",
5+
name: "Trigger Source Connection Sync",
6+
description: "Manually trigger a data sync for a source connection. The sync job runs asynchronously in the background and returns immediately with job details. [See the documentation](https://docs.airweave.ai/api-reference/source-connections/run)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: false,
12+
},
13+
type: "action",
14+
props: {
15+
airweave,
16+
collectionId: {
17+
propDefinition: [
18+
airweave,
19+
"collectionId",
20+
],
21+
description: "The collection that contains the source connection",
22+
},
23+
sourceConnectionId: {
24+
propDefinition: [
25+
airweave,
26+
"sourceConnectionId",
27+
(c) => ({
28+
collectionId: c.collectionId,
29+
}),
30+
],
31+
},
32+
},
33+
async run({ $ }) {
34+
const response = await this.airweave.runSourceConnection(
35+
this.sourceConnectionId,
36+
);
37+
38+
$.export("$summary", `Successfully triggered sync job: ${response.id} (Status: ${response.status})`);
39+
40+
return response;
41+
},
42+
};
43+

0 commit comments

Comments
 (0)