Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
48 changes: 48 additions & 0 deletions components/brainbase_labs/README.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README is your call - I don't think it's useful to have individual components listed here, but rather a general description of the app and its use cases

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Brainbase

Brainbase is a platform for building and deploying AI voice agents. Create intelligent workers that can handle phone calls, automate customer interactions, and integrate with your existing communication infrastructure.

## What You Can Do

With the Brainbase integration on Pipedream, you can:

- **Automate Voice Agent Deployments** - Programmatically create and configure AI voice agents that can make or receive phone calls
- **Monitor Call Activity** - Track voice deployment logs, analyze sentiment, and retrieve call records for quality assurance
- **Manage Phone Numbers** - Register and configure phone numbers for your voice agents through Twilio integration
- **Build Dynamic Workflows** - Create AI workers with custom flows that adapt based on triggers from other apps in your Pipedream workflows
- **Scale Communications** - Make batch calls to multiple recipients with personalized AI interactions

## Use Cases

### Customer Support Automation

Automatically deploy voice agents when support tickets are created in Zendesk or when specific keywords are detected in emails. Route calls based on customer data and log interactions back to your CRM.

### Appointment Reminders

Trigger AI voice calls to remind customers of upcoming appointments when calendar events approach. Collect confirmations and automatically update your scheduling system.

### Lead Qualification

Deploy voice agents to call leads from your sales pipeline, ask qualification questions, and route hot leads to human sales reps based on responses and sentiment analysis.

### Outbound Notifications

Send voice notifications for order updates, delivery alerts, or account changes by triggering calls when status changes occur in your e-commerce or SaaS platform.

## Getting Started

1. Connect your Brainbase account using your API key
2. Create a worker to define your AI agent's purpose
3. Build a flow to script your agent's conversation logic
4. Deploy your voice agent with a phone number
5. Integrate with other Pipedream apps to trigger or respond to voice interactions

## Authentication

This integration uses API Key authentication. You'll need to provide your Brainbase API key when connecting the app in Pipedream.

## Links

- [Brainbase Documentation](https://docs.usebrainbase.com)
- [Pipedream Community](https://pipedream.com/community)
68 changes: 68 additions & 0 deletions components/brainbase_labs/actions/create-flow/create-flow.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import app from "../../brainbase_labs.app.mjs";

export default {
key: "brainbase-create-flow",
name: "Create Flow",
description: "Create a new flow for a worker. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
workerId: {
propDefinition: [
app,
"workerId",
],
},
name: {
type: "string",
label: "Name",
description: "The name of the flow",
},
code: {
type: "string",
label: "Code",
description: "The flow code/definition",
},
label: {
type: "string",
label: "Label",
description: "Optional label for the flow",
optional: true,
},
variables: {
type: "string",
label: "Variables",
description: "Flow variables (optional)",
optional: true,
},
validate: {
type: "boolean",
label: "Validate",
description: "Whether to validate the flow",
optional: true,
},
},
async run({ $ }) {
const response = await this.app.createFlow({
$,
workerId: this.workerId,
data: {
name: this.name,
code: this.code,
label: this.label,
variables: this.variables,
validate: this.validate,
},
});

$.export("$summary", `Successfully created flow "${this.name}"`);
return response;
},
};

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

export default {
key: "brainbase-create-twilio-integration",
name: "Create Twilio Integration",
description: "Create a new Twilio integration for the authenticated team. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
accountSid: {
type: "string",
label: "Account SID",
description: "Twilio account SID",
},
authToken: {
type: "string",
label: "Auth Token",
description: "Twilio auth token (will be encrypted before being stored)",
secret: true,
},
},
async run({ $ }) {
const response = await this.app.createTwilioIntegration({
$,
data: {
accountSid: this.accountSid,
authToken: this.authToken,
},
});

$.export("$summary", "Successfully created Twilio integration");
return response;
},
};

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

export default {
key: "brainbase-create-voice-deployment",
name: "Create Voice Deployment",
description: "Create a new voice deployment. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
workerId: {
propDefinition: [
app,
"workerId",
],
},
name: {
type: "string",
label: "Name",
description: "Deployment name",
},
phoneNumber: {
type: "string",
label: "Phone Number",
description: "Phone number for deployment (e.g., +1234567890)",
},
flowId: {
propDefinition: [
app,
"flowId",
(c) => ({
workerId: c.workerId,
}),
],
},
enableVoiceSentiment: {
type: "boolean",
label: "Enable Voice Sentiment",
description: "Enable voice sentiment analysis",
default: false,
},
externalConfig: {
type: "object",
label: "External Config",
description: "External configuration object with voice settings, language, voiceId, etc. Example: `{\"voice\": \"alloy\", \"language\": \"en\"}`",
optional: true,
},
extractions: {
type: "object",
label: "Extractions",
description: "Custom data extraction configurations (optional)",
optional: true,
},
successCriteria: {
type: "string[]",
label: "Success Criteria",
description: "Deployment success measurement criteria (optional)",
optional: true,
},
},
async run({ $ }) {
const response = await this.app.createVoiceDeployment({
$,
workerId: this.workerId,
data: {
name: this.name,
phoneNumber: this.phoneNumber,
flowId: this.flowId,
enableVoiceSentiment: this.enableVoiceSentiment,
...(this.externalConfig && { externalConfig: this.externalConfig }),
...(this.extractions && { extractions: this.extractions }),
...(this.successCriteria && { successCriteria: this.successCriteria }),
},
});

$.export("$summary", `Successfully created voice deployment "${this.name}"`);
return response;
},
};

53 changes: 53 additions & 0 deletions components/brainbase_labs/actions/create-worker/create-worker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import app from "../../brainbase_labs.app.mjs";

export default {
key: "brainbase-create-worker",
name: "Create Worker",
description: "Create a new worker for the team. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
name: {
type: "string",
label: "Name",
description: "The name of the worker",
},
description: {
type: "string",
label: "Description",
description: "Worker description",
optional: true,
},
status: {
type: "string",
label: "Status",
description: "Worker status",
optional: true,
options: [
"active",
"inactive",
"archived",
],
},
},
async run({ $ }) {
const response = await this.app.createWorker({
$,
data: {
name: this.name,
description: this.description,
status: this.status,
},
});

$.export("$summary", `Successfully created worker "${this.name}"`);
return response;
},
};

43 changes: 43 additions & 0 deletions components/brainbase_labs/actions/delete-flow/delete-flow.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import app from "../../brainbase_labs.app.mjs";

export default {
key: "brainbase-delete-flow",
name: "Delete Flow",
description: "Delete a flow. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
workerId: {
propDefinition: [
app,
"workerId",
],
},
flowId: {
propDefinition: [
app,
"flowId",
(c) => ({
workerId: c.workerId,
}),
],
},
},
async run({ $ }) {
const response = await this.app.deleteFlow({
$,
workerId: this.workerId,
flowId: this.flowId,
});

$.export("$summary", `Successfully deleted flow with ID ${this.flowId}`);
return response;
},
};

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

export default {
key: "brainbase-delete-integration",
name: "Delete Integration",
description: "Delete an existing Twilio integration. [See the documentation](https://docs.usebrainbase.com)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
integrationId: {
propDefinition: [
app,
"integrationId",
],
},
},
async run({ $ }) {
const response = await this.app.deleteIntegration({
$,
integrationId: this.integrationId,
});

$.export("$summary", `Successfully deleted integration with ID ${this.integrationId}`);
return response;
},
};

Loading