Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions components/airweave/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Airweave Integration for Pipedream

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.

## What is Airweave?

Airweave serves as a bridge between your data sources and agents, transforming raw data into queryable knowledge. It can extract and process data from:

- API endpoints (REST)
- Productivity and collaboration tools
- Relational databases
- Document stores
- File systems and storage services

## Available Actions

### Collections
- **Search Collection** - Search across all data sources within a collection (semantic + keyword search)
- **List Collections** - Get all collections in your organization
- **Create Collection** - Create a new collection to group data sources
- **Get Collection** - Retrieve details of a specific collection
- **Delete Collection** - Permanently remove a collection and all associated data

### Sources
- **List Sources** - Get all available data source connectors
- **Trigger Sync** - Manually trigger a data sync for a source connection

## Setup

1. Sign up for an Airweave account at [airweave.ai](https://airweave.ai)
2. Get your API key from the Airweave dashboard (Settings → API Keys)
3. Connect your Airweave account in Pipedream by entering your API key

## Example Workflows

### Slack Q&A Bot
Slash command → Search Airweave collection → Reply with relevant information

### Support Automation
Form submission → Search documentation → Create support ticket with context

### Daily Digest
Cron schedule → Search recent updates → Send email summary

### GitHub Integration
New issue → Search codebase → Auto-comment with relevant code references

## Authentication

This integration uses API key authentication. You can find your API key in your Airweave dashboard under Settings → API Keys.

Optionally, you can specify a custom base URL if you're using a self-hosted Airweave instance.

## Links

- [Airweave Documentation](https://docs.airweave.ai)
- [Airweave GitHub](https://github.com/airweave-ai/airweave)
- [API Reference](https://docs.airweave.ai/api-reference)
- [Airweave TypeScript SDK](https://github.com/airweave-ai/typescript-sdk)

## Support

For issues or questions:
- Airweave Community: [GitHub Discussions](https://github.com/airweave-ai/airweave/discussions)
- Pipedream Support: [pipedream.com/support](https://pipedream.com/support)

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-create-collection",
name: "Create Collection",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
name: {
type: "string",
label: "Name",
description: "Display name for the collection (e.g., 'Customer Support Data')",
},
readableId: {
type: "string",
label: "Readable ID",
description: "URL-friendly identifier for the collection (lowercase, hyphens allowed, e.g., 'customer-support-data'). This cannot be changed after creation.",
},
description: {
type: "string",
label: "Description",
description: "Optional description of what this collection contains and its purpose",
optional: true,
},
},
async run({ $ }) {
const response = await this.airweave.createCollection({
name: this.name,
readable_id: this.readableId,
description: this.description,
});

$.export("$summary", `Successfully created collection: ${response.name} (${response.readable_id})`);

return response;
},
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-delete-collection",
name: "Delete Collection",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
collectionId: {
propDefinition: [
airweave,
"collectionId",
],
},
confirmation: {
type: "string",
label: "Confirmation",
description: "Type 'DELETE' to confirm deletion. This action cannot be undone.",
},
},
async run({ $ }) {
if (this.confirmation !== "DELETE") {
throw new Error("Please type 'DELETE' to confirm deletion. This action cannot be undone.");
}

const response = await this.airweave.deleteCollection(this.collectionId);

$.export("$summary", `Successfully deleted collection: ${response.name} (${response.readable_id})`);

return response;
},
};

26 changes: 26 additions & 0 deletions components/airweave/actions/get-collection/get-collection.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-get-collection",
name: "Get Collection",
description: "Retrieve details of a specific collection by its readable ID. [See the documentation](https://docs.airweave.ai/api-reference/collections/get)",
version: "0.0.1",
type: "action",
props: {
airweave,
collectionId: {
propDefinition: [
airweave,
"collectionId",
],
},
},
async run({ $ }) {
const response = await this.airweave.getCollection(this.collectionId);

$.export("$summary", `Successfully retrieved collection: ${response.name} (${response.readable_id})`);

return response;
},
};

41 changes: 41 additions & 0 deletions components/airweave/actions/list-collections/list-collections.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-list-collections",
name: "List Collections",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
skip: {
type: "integer",
label: "Skip",
description: "Number of collections to skip for pagination",
optional: true,
default: 0,
min: 0,
},
limit: {
type: "integer",
label: "Limit",
description: "Maximum number of collections to return",
optional: true,
default: 50,
min: 1,
max: 100,
},
},
async run({ $ }) {
const response = await this.airweave.listCollections({
skip: this.skip,
limit: this.limit,
});

const count = response.length;
$.export("$summary", `Successfully retrieved ${count} collection(s)`);

return response;
},
};

21 changes: 21 additions & 0 deletions components/airweave/actions/list-sources/list-sources.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-list-sources",
name: "List Available Sources",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
},
async run({ $ }) {
const response = await this.airweave.listSources();

const count = response.length;
$.export("$summary", `Successfully retrieved ${count} available source connector(s)`);

return response;
},
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-search-collection",
name: "Search Collection",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
collectionId: {
propDefinition: [
airweave,
"collectionId",
],
},
searchQuery: {
propDefinition: [
airweave,
"searchQuery",
],
},
searchLimit: {
propDefinition: [
airweave,
"searchLimit",
],
},
responseType: {
propDefinition: [
airweave,
"responseType",
],
},
offset: {
type: "integer",
label: "Offset",
description: "Number of results to skip for pagination",
optional: true,
default: 0,
min: 0,
},
recencyBias: {
type: "string",
label: "Recency Bias",
description: "How much to weigh recency vs similarity (0-1). 0 = no recency effect; 1 = rank by recency only",
optional: true,
},
},
async run({ $ }) {
const params = {
query: this.searchQuery,
limit: this.searchLimit,
offset: this.offset,
};

if (this.responseType) {
params.response_type = this.responseType;
}

if (this.recencyBias !== undefined) {
params.recency_bias = parseFloat(this.recencyBias);
}

const response = await this.airweave.searchCollection(
this.collectionId,
params,
);

const resultCount = response.results?.length || 0;
$.export("$summary", `Successfully searched collection "${this.collectionId}" and found ${resultCount} result(s)`);

return response;
},
};

38 changes: 38 additions & 0 deletions components/airweave/actions/trigger-sync/trigger-sync.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import airweave from "../../airweave.app.mjs";

export default {
key: "airweave-trigger-sync",
name: "Trigger Source Connection Sync",
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)",
version: "0.0.1",
type: "action",
props: {
airweave,
collectionId: {
propDefinition: [
airweave,
"collectionId",
],
description: "The collection that contains the source connection",
},
sourceConnectionId: {
propDefinition: [
airweave,
"sourceConnectionId",
(c) => ({
collectionId: c.collectionId,
}),
],
},
},
async run({ $ }) {
const response = await this.airweave.runSourceConnection(
this.sourceConnectionId,
);

$.export("$summary", `Successfully triggered sync job: ${response.id} (Status: ${response.status})`);

return response;
},
};

Loading
Loading