Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-aianswer
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-aianswer` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-aianswer",
|
||||
"version": "0.0.9"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-aianswer",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/aianswer/src",
|
||||
"projectType": "library",
|
||||
"release": {
|
||||
"version": {
|
||||
"currentVersionResolver": "git-tag",
|
||||
"preserveLocalDependencyProtocols": false,
|
||||
"manifestRootsToUpdate": [
|
||||
"dist/{projectRoot}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/aianswer",
|
||||
"tsConfig": "packages/pieces/community/aianswer/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/aianswer/package.json",
|
||||
"main": "packages/pieces/community/aianswer/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/aianswer/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/aianswer/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"nx-release-publish": {
|
||||
"options": {
|
||||
"packageRoot": "dist/{projectRoot}"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/aianswer",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n Um dein AiAnswer API Zugangs-Token zu erhalten, folgen Sie den folgenden Schritten:\n 1. Melden Sie sich bei Ihrem AiAnswer-Konto unter https://app.aianswer.us an.\n 2. Navigieren Sie zu Einstellungen < API Key.\n 3. Klicken Sie auf das Symbol kopieren, um Ihren vorhandenen Schlüssel zu kopieren oder klicken Sie auf den neuen API-Schlüssel, um einen neuen zu erstellen.\n Kopieren Sie den API-Schlüssel und fügen Sie ihn unten in \"AiAnswer API Key\" ein.\n ",
|
||||
"Gmail get list of Agents": "Gmail get Liste der Agenten",
|
||||
"Create Phone Call": "Anruf erstellen",
|
||||
"Get Call Details": "Anrufdetails abrufen",
|
||||
"Schedule Call Agent": "Anruf-Agent planen",
|
||||
"Get Call Transcript": "Anrufprotokoll erhalten",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"get the lists of agents with Gmail": "erhalte die Listen von Agenten mit Google Mail",
|
||||
"Create a phone call to customer from Agent": "Anruf an Kunden vom Agenten erstellen",
|
||||
"Fetch Call details by Call ID": "Rufdetails per Anrufnummer abrufen",
|
||||
"Schedule a call with an agent": "Einen Anruf mit einem Agenten planen",
|
||||
"Fetch the transcript of a call by Call ID": "Abrufen des Transkripts eines Anruf-ID",
|
||||
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
||||
"Agent ID": "Agenten-ID",
|
||||
"To Phone Number": "An Telefonnummer",
|
||||
"Details": "Details",
|
||||
"Call ID": "Anruf-ID",
|
||||
"Phone Number": "Telefonnummer",
|
||||
"Execution Time": "Ausführungszeit",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Details prüfen",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopfzeilen",
|
||||
"Query Parameters": "Abfrageparameter",
|
||||
"Body": "Körper",
|
||||
"Response is Binary ?": "Antwort ist binär?",
|
||||
"No Error on Failure": "Kein Fehler bei Fehler",
|
||||
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Geben Sie die Telefonnummer zusammen mit Landesvorwahl im Format ein (z.B. +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Optionale Details mit Schlüssel-Wert-Paaren (z.B. customer_id, Priorität)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Zeit, den Aufruf im Format JJJJJ-MM-TT HH:MM:SS zu planen.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Zeitzone des geplanten Anrufs (z. B. Asien/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Optionale Details mit Schlüsselwert-Paaren (z.B. customer_id, priority)",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
|
||||
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
|
||||
"GET": "ERHALTEN",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "LÖSCHEN",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail obtener lista de agentes",
|
||||
"Create Phone Call": "Crear llamada telefónica",
|
||||
"Get Call Details": "Detalles de llamada",
|
||||
"Schedule Call Agent": "Agente de llamada programada",
|
||||
"Get Call Transcript": "Obtener transcripción de llamada",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"get the lists of agents with Gmail": "obtener las listas de agentes con Gmail",
|
||||
"Create a phone call to customer from Agent": "Crear una llamada telefónica al cliente desde el agente",
|
||||
"Fetch Call details by Call ID": "Obtener detalles de la llamada por ID",
|
||||
"Schedule a call with an agent": "Programar una llamada con un agente",
|
||||
"Fetch the transcript of a call by Call ID": "Obtener la transcripción de una llamada por ID de llamada",
|
||||
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
||||
"Agent ID": "ID del agente",
|
||||
"To Phone Number": "A número de teléfono",
|
||||
"Details": "Detalles",
|
||||
"Call ID": "ID de llamada",
|
||||
"Phone Number": "Número de teléfono",
|
||||
"Execution Time": "Tiempo de ejecución",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Detalles del candidato",
|
||||
"Method": "Método",
|
||||
"Headers": "Encabezados",
|
||||
"Query Parameters": "Parámetros de consulta",
|
||||
"Body": "Cuerpo",
|
||||
"Response is Binary ?": "¿Respuesta es binaria?",
|
||||
"No Error on Failure": "No hay ningún error en fallo",
|
||||
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Introduzca el número de teléfono, junto con el código del país, en formato (por ejemplo, +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Detalles opcionales con pares clave-valor (por ejemplo, customer_id, prioridad)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Hora de programar la llamada en formato AAA-MM-DD HH:MM:SS.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Zona horaria de la llamada programada (por ejemplo, Asia/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Detalles opcionales de perspectiva con pares clave-valor (por ejemplo, customer_id, prioridad)",
|
||||
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
|
||||
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDFs, imágenes, etc.",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n Pour obtenir votre jeton d'accès API pour AiAnswer, suivez les étapes suivantes :\n 1. Connectez-vous à votre compte AiAnswer sur https://app.aianswer.us .\n 2. Allez dans Paramètres < Clé API.\n 3. Cliquez sur l'icône Copier pour copier votre clé existante ou cliquez sur Nouvelle Clé API pour en créer une nouvelle.\n 4. Copiez la Clé API et collez-la en-dessous dans \"Clé API AiAnswer\".\n ",
|
||||
"Gmail get list of Agents": "Gmail récupère la liste des agents",
|
||||
"Create Phone Call": "Créer un appel téléphonique",
|
||||
"Get Call Details": "Obtenir les détails de l’appel",
|
||||
"Schedule Call Agent": "Planifier un agent d'appel",
|
||||
"Get Call Transcript": "Obtenir la transcription d'appel",
|
||||
"Custom API Call": "Appel d'API personnalisé",
|
||||
"get the lists of agents with Gmail": "obtenir les listes d'agents avec Gmail",
|
||||
"Create a phone call to customer from Agent": "Créer un appel téléphonique vers le client à partir de l'Agent",
|
||||
"Fetch Call details by Call ID": "Récupérer les détails de l'appel par ID d'appel",
|
||||
"Schedule a call with an agent": "Planifier un appel avec un agent",
|
||||
"Fetch the transcript of a call by Call ID": "Récupérer la transcription d'un appel par ID d'appel",
|
||||
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
||||
"Agent ID": "ID de l'agent",
|
||||
"To Phone Number": "Vers le numéro de téléphone",
|
||||
"Details": "Détails du produit",
|
||||
"Call ID": "ID de l'appel",
|
||||
"Phone Number": "Numéro de téléphone",
|
||||
"Execution Time": "Temps d'Exécution",
|
||||
"Timezone": "Fuseau horaire",
|
||||
"Prospect Details": "Détails du prospect",
|
||||
"Method": "Méthode",
|
||||
"Headers": "En-têtes",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"Body": "Corps",
|
||||
"Response is Binary ?": "La réponse est Binaire ?",
|
||||
"No Error on Failure": "Aucune erreur en cas d'échec",
|
||||
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Entrez le numéro de téléphone, ainsi que l'indicatif du pays, au format (par exemple, +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Détails optionnels avec des paires clé-valeur (ex : customer_id, priorité)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Heure pour programmer l'appel au format AAAA-MM-JJ HH:MM:SS.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Fuseau horaire de l'appel programmé (par exemple, Asie/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Détails du prospect optionnels avec des paires clé-valeur (ex : customer_id, priorité)",
|
||||
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
||||
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDF, les images, etc.",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail のエージェント一覧",
|
||||
"Create Phone Call": "電話番号を作成",
|
||||
"Get Call Details": "通話の詳細を取得",
|
||||
"Schedule Call Agent": "通話エージェントをスケジュールする",
|
||||
"Get Call Transcript": "通話のトランスクリプトを取得",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"get the lists of agents with Gmail": "Gmail のエージェントリストを取得する",
|
||||
"Create a phone call to customer from Agent": "エージェントからお客様に電話をかけます",
|
||||
"Fetch Call details by Call ID": "通話IDで通話の詳細を取得",
|
||||
"Schedule a call with an agent": "エージェントとの通話のスケジュール",
|
||||
"Fetch the transcript of a call by Call ID": "Call IDによる通話記録を取得",
|
||||
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
||||
"Agent ID": "エージェントID",
|
||||
"To Phone Number": "電話番号へ",
|
||||
"Details": "詳細",
|
||||
"Call ID": "通話ID",
|
||||
"Phone Number": "電話番号",
|
||||
"Execution Time": "実行時間",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "見込み客の詳細",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "電話番号と国コードを入力してください(例:+919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "キーと値のペアを持つオプションの詳細 (例: customer_id, priority)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "YYYY-MM-DD HH:MM:SS 形式で通話をスケジュールする時間です。",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "スケジュールされた通話のタイムゾーン(例:アジア/カルカッタ)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "キーと値のペアを持つオプションの見込み客の詳細 (例: customer_id, priority)",
|
||||
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
||||
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
||||
"GET": "取得",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "削除",
|
||||
"HEAD": "頭"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n Om je AiAnswer API-toegangstoken te verkrijgen, volg deze stappen hieronder:\n 1. Log in op je AiAnswer account op https://app.aianswer.us .\n 2. Navigeer naar Instellingen < API Key.\n 3. Klik op het pictogram kopiëren van uw bestaande sleutel of klik op de Nieuwe API-sleutel om een nieuwe te maken.\n 4. Kopieer de API-sleutel en plak deze hieronder in \"AiAnswer API-sleutel\".\n ",
|
||||
"Gmail get list of Agents": "Gmail krijgt lijst van agenten",
|
||||
"Create Phone Call": "Telefoongesprek aanmaken",
|
||||
"Get Call Details": "Oproepgegevens ophalen",
|
||||
"Schedule Call Agent": "Oproep agent inplannen",
|
||||
"Get Call Transcript": "Oproep versturen",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"get the lists of agents with Gmail": "de lijsten van agenten ophalen met Gmail",
|
||||
"Create a phone call to customer from Agent": "Maak een telefoongesprek naar klant van Agent",
|
||||
"Fetch Call details by Call ID": "Oproepgegevens ophalen door oproep-ID",
|
||||
"Schedule a call with an agent": "Plan een gesprek met een medewerker",
|
||||
"Fetch the transcript of a call by Call ID": "Ophalen van de transcript van een oproep met oproep-ID",
|
||||
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
||||
"Agent ID": "Agent ID",
|
||||
"To Phone Number": "Naar telefoonnummer",
|
||||
"Details": "Beschrijving",
|
||||
"Call ID": "Oproep ID",
|
||||
"Phone Number": "Telefoon nummer",
|
||||
"Execution Time": "Execution Time",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Details prospect",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopteksten",
|
||||
"Query Parameters": "Query parameters",
|
||||
"Body": "Lichaam",
|
||||
"Response is Binary ?": "Antwoord is binair?",
|
||||
"No Error on Failure": "Geen fout bij fout",
|
||||
"Timeout (in seconds)": "Time-out (in seconden)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Voer het telefoonnummer in, samen met de landcode, in formaat (bijv. +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Optionele details met sleutelwaarde paren (bijv. customer_id, prioriteit)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Tijd om de oproep te plannen in YYYY-MM-DD HH:MM:SS formaat.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Tijdzone van de geplande oproep (bijv. Azië/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Optionele prospect details met sleutelwaarde paren (bijv. klant_id, prioriteit)",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
|
||||
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
|
||||
"GET": "KRIJG",
|
||||
"POST": "POSTE",
|
||||
"PATCH": "BEKIJK",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "VERWIJDEREN",
|
||||
"HEAD": "HOOFD"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "Para obter seu \"Access Token\" do AiAnswer API siga as instruções abaixo:\n1. Faça o Login na sua conta AiAnswer pelo link https://app.aianswer.us .\n2. Navegue até Configurações > Chaves API\n3. Clique no ícone \"Copiar\" para copiar sua chave API existente ou clique em \"Nova Chave API\" para criar uma nova chave.\n4. Copie sua nova chave API, vá até seu integrador e cole no campo \"AiAnswer API Key\".",
|
||||
"Gmail get list of Agents": "Gmail obter lista de agentes",
|
||||
"Create Phone Call": "Criar chamada telefônica",
|
||||
"Get Call Details": "Obter detalhes da chamada",
|
||||
"Schedule Call Agent": "Agendar Agente de Chamada",
|
||||
"Get Call Transcript": "Obter transcrição de chamada",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"get the lists of agents with Gmail": "obter as listas de agentes com o Gmail",
|
||||
"Create a phone call to customer from Agent": "Crie uma chamada telefônica para o cliente a partir do Agente",
|
||||
"Fetch Call details by Call ID": "Obter detalhes da chamada pelo ID da chamada",
|
||||
"Schedule a call with an agent": "Agende uma chamada com um agente",
|
||||
"Fetch the transcript of a call by Call ID": "Obter a transcrição de uma chamada pela ID de Chamada",
|
||||
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
||||
"Agent ID": "ID representante",
|
||||
"To Phone Number": "Para número de telefone",
|
||||
"Details": "detalhes",
|
||||
"Call ID": "ID da chamada",
|
||||
"Phone Number": "Número de telefone",
|
||||
"Execution Time": "Tempo de execução",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Detalhes do Prospecto",
|
||||
"Method": "Método",
|
||||
"Headers": "Cabeçalhos",
|
||||
"Query Parameters": "Parâmetros da consulta",
|
||||
"Body": "Conteúdo",
|
||||
"Response is Binary ?": "A resposta é binária ?",
|
||||
"No Error on Failure": "Nenhum erro no Failure",
|
||||
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Digite o número de telefone, juntamente com o código do país, no formato (por exemplo, +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Detalhes opcionais com pares de chave-valor (por exemplo, customer_id, prioridade)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Hora de agendar a chamada no formato YYYY-MM-DD HH:MM:SS.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Fuso horário da chamada agendada (por exemplo, Ásia/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Detalhes opcionais de perspectiva com pares de chave-valor (por exemplo, customer_id, prioridade)",
|
||||
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
|
||||
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
|
||||
"GET": "OBTER",
|
||||
"POST": "POSTAR",
|
||||
"PATCH": "COMPRAR",
|
||||
"PUT": "COLOCAR",
|
||||
"DELETE": "EXCLUIR",
|
||||
"HEAD": "CABEÇA"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"AI Answer": "AI Ответ",
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n Для получения токена доступа к AiAnswer API, выполните следующие шаги:\n 1. Войдите в свой аккаунт AiAnswer на https://app.aianswer.us .\n 2. Перейдите в Настройки < API Key.\n 3. Нажмите на значок \"Копировать\", чтобы скопировать существующий ключ или нажмите на Новый ключ API для создания нового.\n 4. Скопируйте ключ API и вставьте его ниже в \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail получает список агентов",
|
||||
"Create Phone Call": "Создать звонок",
|
||||
"Get Call Details": "Получить подробности звонка",
|
||||
"Schedule Call Agent": "Запланировать звонок Агента",
|
||||
"Get Call Transcript": "Получить субтитры вызова",
|
||||
"Custom API Call": "Пользовательский вызов API",
|
||||
"get the lists of agents with Gmail": "получить списки агентов с помощью Gmail",
|
||||
"Create a phone call to customer from Agent": "Создать телефонный звонок клиенту от Агента",
|
||||
"Fetch Call details by Call ID": "Получить детали звонка по коду",
|
||||
"Schedule a call with an agent": "Запланировать звонок агентом",
|
||||
"Fetch the transcript of a call by Call ID": "Получить субтитры звонка по номеру вызова",
|
||||
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
|
||||
"Agent ID": "ID Агента",
|
||||
"To Phone Number": "На номер телефона",
|
||||
"Details": "Детали",
|
||||
"Call ID": "ID звонка",
|
||||
"Phone Number": "Номер телефона",
|
||||
"Execution Time": "Время выполнения",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Детали аспекта",
|
||||
"Method": "Метод",
|
||||
"Headers": "Заголовки",
|
||||
"Query Parameters": "Параметры запроса",
|
||||
"Body": "Тело",
|
||||
"No Error on Failure": "Нет ошибок при ошибке",
|
||||
"Timeout (in seconds)": "Таймаут (в секундах)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Введите номер телефона вместе с кодом страны в формате (например, +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Необязательные детали с парами ключевого значения (например, customer_id, приоритет)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Время запланировать вызов в формате YYYY-MM-DD HH:MM:SS.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Часовой пояс запланированного вызова (например, Азия/Калькутта)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Необязательная проверка деталей с парами ключевого значения (например, customer_id, приоритет)",
|
||||
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
|
||||
"GET": "ПОЛУЧИТЬ",
|
||||
"POST": "ПОСТ",
|
||||
"PATCH": "ПАТЧ",
|
||||
"PUT": "ПОКУПИТЬ",
|
||||
"DELETE": "УДАЛИТЬ",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail get list of Agents",
|
||||
"Create Phone Call": "Create Phone Call",
|
||||
"Get Call Details": "Get Call Details",
|
||||
"Schedule Call Agent": "Schedule Call Agent",
|
||||
"Get Call Transcript": "Get Call Transcript",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"get the lists of agents with Gmail": "get the lists of agents with Gmail",
|
||||
"Create a phone call to customer from Agent": "Create a phone call to customer from Agent",
|
||||
"Fetch Call details by Call ID": "Fetch Call details by Call ID",
|
||||
"Schedule a call with an agent": "Schedule a call with an agent",
|
||||
"Fetch the transcript of a call by Call ID": "Fetch the transcript of a call by Call ID",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Agent ID": "Agent ID",
|
||||
"To Phone Number": "To Phone Number",
|
||||
"Details": "Details",
|
||||
"Call ID": "Call ID",
|
||||
"Phone Number": "Phone Number",
|
||||
"Execution Time": "Execution Time",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Prospect Details",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Enter the phone number, along with country code, in format (e.g., +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Optional details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Time to schedule the call in YYYY-MM-DD HH:MM:SS format.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Timezone of the scheduled call (e.g., Asia/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Optional prospect details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"AI Answer": "AI Answer",
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail get list of Agents",
|
||||
"Create Phone Call": "Create Phone Call",
|
||||
"Get Call Details": "Get Call Details",
|
||||
"Schedule Call Agent": "Schedule Call Agent",
|
||||
"Get Call Transcript": "Get Call Transcript",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"get the lists of agents with Gmail": "get the lists of agents with Gmail",
|
||||
"Create a phone call to customer from Agent": "Create a phone call to customer from Agent",
|
||||
"Fetch Call details by Call ID": "Fetch Call details by Call ID",
|
||||
"Schedule a call with an agent": "Schedule a call with an agent",
|
||||
"Fetch the transcript of a call by Call ID": "Fetch the transcript of a call by Call ID",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Agent ID": "Agent ID",
|
||||
"To Phone Number": "To Phone Number",
|
||||
"Details": "Details",
|
||||
"Call ID": "Call ID",
|
||||
"Phone Number": "Phone Number",
|
||||
"Execution Time": "Execution Time",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Prospect Details",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Body": "Body",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Enter the phone number, along with country code, in format (e.g., +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Optional details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Time to schedule the call in YYYY-MM-DD HH:MM:SS format.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Timezone of the scheduled call (e.g., Asia/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Optional prospect details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ": "\n To obtain your AiAnswer API access token, follow these steps below:\n 1. Log in to your AiAnswer account at https://app.aianswer.us .\n 2. Navigate to Settings < API Key.\n 3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.\n 4. Copy the API Key and paste it below in \"AiAnswer API Key\".\n ",
|
||||
"Gmail get list of Agents": "Gmail get list of Agents",
|
||||
"Create Phone Call": "Create Phone Call",
|
||||
"Get Call Details": "Get Call Details",
|
||||
"Schedule Call Agent": "Schedule Call Agent",
|
||||
"Get Call Transcript": "Get Call Transcript",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"get the lists of agents with Gmail": "get the lists of agents with Gmail",
|
||||
"Create a phone call to customer from Agent": "Create a phone call to customer from Agent",
|
||||
"Fetch Call details by Call ID": "Fetch Call details by Call ID",
|
||||
"Schedule a call with an agent": "Schedule a call with an agent",
|
||||
"Fetch the transcript of a call by Call ID": "Fetch the transcript of a call by Call ID",
|
||||
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
||||
"Agent ID": "Agent ID",
|
||||
"To Phone Number": "To Phone Number",
|
||||
"Details": "详细信息",
|
||||
"Call ID": "Call ID",
|
||||
"Phone Number": "Phone Number",
|
||||
"Execution Time": "Execution Time",
|
||||
"Timezone": "Timezone",
|
||||
"Prospect Details": "Prospect Details",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"Enter the phone number, along with country code, in format (e.g., +919876543210)": "Enter the phone number, along with country code, in format (e.g., +919876543210)",
|
||||
"Optional details with key-value pairs (e.g., customer_id, priority)": "Optional details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Time to schedule the call in YYYY-MM-DD HH:MM:SS format.": "Time to schedule the call in YYYY-MM-DD HH:MM:SS format.",
|
||||
"Timezone of the scheduled call (e.g., Asia/Calcutta)": "Timezone of the scheduled call (e.g., Asia/Calcutta)",
|
||||
"Optional prospect details with key-value pairs (e.g., customer_id, priority)": "Optional prospect details with key-value pairs (e.g., customer_id, priority)",
|
||||
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"GET": "获取",
|
||||
"POST": "帖子",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "弹出",
|
||||
"DELETE": "删除",
|
||||
"HEAD": "黑色"
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import {
|
||||
httpClient,
|
||||
createCustomApiCallAction,
|
||||
HttpMethod,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerConfig } from './lib/common/models';
|
||||
import { gmailGetListOfAgents } from './lib/actions/gmail-get-list-of-agents';
|
||||
import { createPhoneCall } from './lib/actions/create-phone-call';
|
||||
import { getCallDetails } from './lib/actions/get-call-details';
|
||||
import { scheduleCallAgent } from './lib/actions/schedule-call-agent';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { getCallTranscript } from './lib/actions/get-call-transcript';
|
||||
|
||||
export const aiAnswerAuth = PieceAuth.SecretText({
|
||||
displayName: 'AiAnswer API Access Token',
|
||||
required: true,
|
||||
description: `
|
||||
To obtain your AiAnswer API access token, follow these steps below:
|
||||
1. Log in to your AiAnswer account at https://app.aianswer.us .
|
||||
2. Navigate to Settings < API Key.
|
||||
3. Click on Copy icon to copy your existing Key or click on New API Key to create a new one.
|
||||
4. Copy the API Key and paste it below in "AiAnswer API Key".
|
||||
`,
|
||||
validate: async (auth) => {
|
||||
try {
|
||||
await httpClient.sendRequest<string[]>({
|
||||
method: HttpMethod.GET,
|
||||
url: `${aiAnswerConfig.baseUrl}/gmail/list_agents`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: auth.auth,
|
||||
},
|
||||
});
|
||||
return {
|
||||
valid: true,
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
valid: false,
|
||||
error: 'Invalid API Key',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const aianswer = createPiece({
|
||||
displayName: 'AI Answer',
|
||||
auth: aiAnswerAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/aianswer.png',
|
||||
categories: [
|
||||
PieceCategory.COMMUNICATION,
|
||||
PieceCategory.CUSTOMER_SUPPORT,
|
||||
PieceCategory.ARTIFICIAL_INTELLIGENCE,
|
||||
],
|
||||
authors: ['drona2938'],
|
||||
actions: [
|
||||
gmailGetListOfAgents,
|
||||
createPhoneCall,
|
||||
getCallDetails,
|
||||
scheduleCallAgent,
|
||||
getCallTranscript,
|
||||
createCustomApiCallAction({
|
||||
baseUrl: () => aiAnswerConfig.baseUrl,
|
||||
auth: aiAnswerAuth,
|
||||
authMapping: async (auth) => ({
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: `${auth.secret_text}`,
|
||||
}),
|
||||
}),
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { aiAnswerAuth } from '../..';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerConfig } from '../common/models';
|
||||
|
||||
export const createPhoneCall = createAction({
|
||||
name: 'createPhoneCall',
|
||||
auth: aiAnswerAuth,
|
||||
displayName: 'Create Phone Call',
|
||||
description: 'Create a phone call to customer from Agent',
|
||||
props: {
|
||||
agentID: Property.ShortText({
|
||||
displayName: 'Agent ID',
|
||||
required: true,
|
||||
}),
|
||||
phoneNumber: Property.ShortText({
|
||||
displayName: 'To Phone Number',
|
||||
description: 'Enter the phone number, along with country code, in format (e.g., +919876543210)',
|
||||
required: true,
|
||||
}),
|
||||
details: Property.Object({
|
||||
displayName: 'Details',
|
||||
description: 'Optional details with key-value pairs (e.g., customer_id, priority)',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const agentID = context.propsValue.agentID;
|
||||
const phoneNumber = context.propsValue.phoneNumber;
|
||||
const details = context.propsValue.details || {}; // Optional details
|
||||
|
||||
const res = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${aiAnswerConfig.baseUrl}/v2/call_agent/${agentID}`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: context.auth.secret_text,
|
||||
},
|
||||
queryParams: {
|
||||
agent_id: agentID,
|
||||
to_number: phoneNumber,
|
||||
},
|
||||
body: {
|
||||
details, // Include details object in the request body
|
||||
},
|
||||
});
|
||||
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerAuth } from '../..';
|
||||
import { aiAnswerConfig } from '../common/models';
|
||||
|
||||
export const getCallDetails = createAction({
|
||||
name: 'getCallDetails',
|
||||
auth: aiAnswerAuth,
|
||||
displayName: 'Get Call Details',
|
||||
description: 'Fetch Call details by Call ID',
|
||||
props: {
|
||||
callID: Property.ShortText({
|
||||
displayName: 'Call ID',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const callID = context.propsValue.callID;
|
||||
|
||||
const res = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${aiAnswerConfig.baseUrl}/v2/get_call/${callID}`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: context.auth.secret_text,
|
||||
},
|
||||
});
|
||||
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerAuth } from '../..';
|
||||
import { aiAnswerConfig } from '../common/models';
|
||||
|
||||
export const getCallTranscript = createAction({
|
||||
name: 'getCallTranscript',
|
||||
auth: aiAnswerAuth, // Auth configured here
|
||||
displayName: 'Get Call Transcript',
|
||||
description: 'Fetch the transcript of a call by Call ID',
|
||||
props: {
|
||||
callID: Property.ShortText({
|
||||
displayName: 'Call ID',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const callID = context.propsValue.callID;
|
||||
|
||||
const res = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${aiAnswerConfig.baseUrl}/v2/get_transcript/${callID}`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: context.auth.secret_text,
|
||||
},
|
||||
});
|
||||
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerConfig } from '../common/models';
|
||||
import { aiAnswerAuth } from '../../index';
|
||||
|
||||
export const gmailGetListOfAgents = createAction({
|
||||
name: 'gmailGetListOfAgents',
|
||||
auth: aiAnswerAuth,
|
||||
displayName: 'Gmail get list of Agents',
|
||||
description: 'get the lists of agents with Gmail',
|
||||
props: {},
|
||||
async run(context) {
|
||||
const res = await httpClient.sendRequest<string[]>({
|
||||
method: HttpMethod.GET,
|
||||
url: `${aiAnswerConfig.baseUrl}/gmail/list_agents`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: context.auth.secret_text,
|
||||
},
|
||||
});
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,68 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { aiAnswerAuth } from '../..';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { aiAnswerConfig } from '../common/models';
|
||||
|
||||
export const scheduleCallAgent = createAction({
|
||||
name: 'scheduleCallAgent',
|
||||
auth: aiAnswerAuth,
|
||||
displayName: 'Schedule Call Agent',
|
||||
description: 'Schedule a call with an agent',
|
||||
props: {
|
||||
agentID: Property.ShortText({
|
||||
displayName: 'Agent ID',
|
||||
required: true,
|
||||
}),
|
||||
phoneNumber: Property.ShortText({
|
||||
displayName: 'Phone Number',
|
||||
required: true,
|
||||
}),
|
||||
executionTime: Property.ShortText({
|
||||
displayName: 'Execution Time',
|
||||
description: 'Time to schedule the call in YYYY-MM-DD HH:MM:SS format.',
|
||||
required: true,
|
||||
}),
|
||||
timezone: Property.ShortText({
|
||||
displayName: 'Timezone',
|
||||
description: 'Timezone of the scheduled call (e.g., Asia/Calcutta)',
|
||||
required: true,
|
||||
}),
|
||||
prospectDetails: Property.Object({
|
||||
displayName: 'Prospect Details',
|
||||
description: 'Optional prospect details with key-value pairs (e.g., customer_id, priority)',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const agentID = context.propsValue.agentID;
|
||||
const phoneNumber = context.propsValue.phoneNumber;
|
||||
const executionTime = context.propsValue.executionTime;
|
||||
const timezone = context.propsValue.timezone;
|
||||
const prospectDetails = context.propsValue.prospectDetails || {}; // Optional prospect details
|
||||
|
||||
const requestBody = {
|
||||
phone_number: phoneNumber,
|
||||
execution_time: executionTime,
|
||||
timezone: timezone,
|
||||
prospect_details: {
|
||||
details: prospectDetails, // Nested details object with custom key-value pairs
|
||||
},
|
||||
};
|
||||
|
||||
const res = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${aiAnswerConfig.baseUrl}/v2/schedule_call_agent/${agentID}`,
|
||||
headers: {
|
||||
[aiAnswerConfig.accessTokenHeaderKey]: context.auth.secret_text,
|
||||
},
|
||||
queryParams: {
|
||||
agent_id: agentID
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
return res.body;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export const aiAnswerConfig = {
|
||||
baseUrl: 'https://backend-development-e8jn.onrender.com',
|
||||
accessTokenHeaderKey: 'Authorization',
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user