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,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Tag zum Kontakt hinzufügen",
|
||||
"create contact": "erstelle Kontakt",
|
||||
"Remove tag from contact": "Tag vom Kontakt entfernen",
|
||||
"Search form by keyword(s)": "Suchformular nach Stichwort(en)",
|
||||
"Update contact": "Kontakt aktualisieren",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Füge einen Tag einem Kontakt (Befrager) in VideoAsk hinzu",
|
||||
"Create a new respondent (contact)": "Erstelle einen neuen Befragten (Kontakt)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Entferne ein Schlagwort von einem Kontakt (Befragter) in VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Formulare nach Schlüsselwörtern(n) innerhalb der Organisation suchen",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Aktualisiere einen bestehenden Teilnehmer (Kontakt) in VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
||||
"Organization ID": "Organisations-ID",
|
||||
"Contact ID": "Kontakt-ID",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Name",
|
||||
"Email": "E-Mail",
|
||||
"Phone": "Telefon",
|
||||
"Limit": "Limit",
|
||||
"Search term": "Suchbegriff",
|
||||
"Respondent ID": "Teilnehmer-ID",
|
||||
"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)",
|
||||
"Select the organization": "Organisation auswählen",
|
||||
"The contact (respondent) id to add the tag to": "Der Kontakt (Befragter) id zum Hinzufügen des Tags",
|
||||
"Select the tag": "Tag auswählen",
|
||||
"The name of the contact": "Der Name des Kontakts",
|
||||
"The email of the contact": "Die E-Mail des Kontakts",
|
||||
"The phone number of the contact": "Die Telefonnummer des Kontakts",
|
||||
"The contact (respondent) id to remove the tag from": "Der Kontakt (Befragter) id zum Entfernen des Tags",
|
||||
"Maximum number of results to return": "Maximale Anzahl der zurückzugebenden Ergebnisse",
|
||||
"Keyword(s) to search for in form titles": "Schlüsselwort(e) zum Suchen in Formulartiteln",
|
||||
"The ID of the respondent to update": "Die ID des zu aktualisierenden Befragten",
|
||||
"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",
|
||||
"Form contact message": "Kontaktnachricht Formular",
|
||||
"Form transcribed": "Formular übertragen",
|
||||
"new form response": "neue Formular-Antwort",
|
||||
"New form author response": "Antwort des Formular-Autors",
|
||||
"Triggers when a contact sends a message via a form": "Löst aus, wenn ein Kontakt eine Nachricht über ein Formular sendet",
|
||||
"Triggered when a form is transcribed": "Wird ausgelöst, wenn ein Formular übertragen wird",
|
||||
"Trigger when a new form response is submitted": "Auslöser wenn eine neue Formularantwort gesendet wird",
|
||||
"Trigger when a form author responds to a contact message": "Auslösen wenn ein Formular-Autor auf eine Kontaktnachricht antwortet",
|
||||
"Team ID": "Team-ID",
|
||||
"Tag": "Markierung",
|
||||
"Select the team containing the database": "Wählen Sie das Team mit der Datenbank",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "Ein kurzer, einzigartiger Identifikator für diesen Webhook. Tags helfen Ihnen, einfach Webhooks zu unterscheiden, wenn Sie sie abrufen, aktualisieren oder löschen müssen."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Añadir etiqueta al contacto",
|
||||
"create contact": "crear contacto",
|
||||
"Remove tag from contact": "Eliminar etiqueta del contacto",
|
||||
"Search form by keyword(s)": "Buscar por palabra(s) clave",
|
||||
"Update contact": "Actualizar contacto",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Añadir una etiqueta a un contacto (respondente) en VideoAsk",
|
||||
"Create a new respondent (contact)": "Crear un nuevo encuestado (contacto)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Eliminar una etiqueta de un contacto (respondente) en VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Buscar formularios por palabra(s) clave dentro de la organización",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Actualizar un encuestado existente (contacto) en VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
||||
"Organization ID": "ID de la organización",
|
||||
"Contact ID": "ID de contacto",
|
||||
"Tag ID": "Etiqueta ID",
|
||||
"Name": "Nombre",
|
||||
"Email": "E-mail",
|
||||
"Phone": "Teléfono",
|
||||
"Limit": "Límite",
|
||||
"Search term": "Buscar término",
|
||||
"Respondent ID": "ID de Respuesta",
|
||||
"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)",
|
||||
"Select the organization": "Seleccione la organización",
|
||||
"The contact (respondent) id to add the tag to": "El id de contacto (respondent) para agregar la etiqueta",
|
||||
"Select the tag": "Seleccione la etiqueta",
|
||||
"The name of the contact": "El nombre del contacto",
|
||||
"The email of the contact": "El email del contacto",
|
||||
"The phone number of the contact": "El número de teléfono del contacto",
|
||||
"The contact (respondent) id to remove the tag from": "El id de contacto (respondent) del que eliminar la etiqueta",
|
||||
"Maximum number of results to return": "Número máximo de resultados a devolver",
|
||||
"Keyword(s) to search for in form titles": "Palabra(s) clave a buscar en los títulos del formulario",
|
||||
"The ID of the respondent to update": "El ID del encuestado a actualizar",
|
||||
"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 PDF, imágenes, etc.",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO",
|
||||
"Form contact message": "Mensaje de contacto del formulario",
|
||||
"Form transcribed": "Formulario transcrito",
|
||||
"new form response": "nueva respuesta de formulario",
|
||||
"New form author response": "Nueva respuesta de autor del formulario",
|
||||
"Triggers when a contact sends a message via a form": "Dispara cuando un contacto envía un mensaje a través de un formulario",
|
||||
"Triggered when a form is transcribed": "Activado cuando un formulario es transcrito",
|
||||
"Trigger when a new form response is submitted": "Activar cuando se envía una nueva respuesta de formulario",
|
||||
"Trigger when a form author responds to a contact message": "Activar cuando un autor del formulario responde a un mensaje de contacto",
|
||||
"Team ID": "ID de equipo",
|
||||
"Tag": "Etiqueta",
|
||||
"Select the team containing the database": "Seleccione el equipo que contiene la base de datos",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "Un identificador corto y único para este webhook. Las etiquetas le ayudan a distinguir fácilmente los webhooks cuando necesita recuperarlos, actualizarlos o eliminarlos."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Ajouter un tag au contact",
|
||||
"create contact": "créer un contact",
|
||||
"Remove tag from contact": "Supprimer le tag du contact",
|
||||
"Search form by keyword(s)": "Formulaire de recherche par mot clé (s)",
|
||||
"Update contact": "Mettre à jour le contact",
|
||||
"Custom API Call": "Appel d'API personnalisé",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Ajouter un tag à un contact (répondant) dans VideoAsk",
|
||||
"Create a new respondent (contact)": "Créer un nouveau répondant (contact)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Retirer un tag d'un contact (répondant) dans VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Rechercher des formulaires par mot(s) clé(s) dans l'organisation",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Mettre à jour un répondant existant (contact) dans VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
||||
"Organization ID": "ID de l'organisation",
|
||||
"Contact ID": "ID du contact",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Nom",
|
||||
"Email": "Courriel",
|
||||
"Phone": "Téléphone",
|
||||
"Limit": "Limite",
|
||||
"Search term": "Terme de recherche",
|
||||
"Respondent ID": "ID de la personne interrogée",
|
||||
"Method": "Méthode",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"Body": "Body",
|
||||
"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)",
|
||||
"Select the organization": "Sélectionnez l'organisation",
|
||||
"The contact (respondent) id to add the tag to": "Le contact (répondant) id à ajouter le tag à",
|
||||
"Select the tag": "Sélectionnez le tag",
|
||||
"The name of the contact": "Le nom du contact",
|
||||
"The email of the contact": "L'e-mail du contact",
|
||||
"The phone number of the contact": "Le numéro de téléphone du contact",
|
||||
"The contact (respondent) id to remove the tag from": "L'id du contact (répondant) pour supprimer le tag de",
|
||||
"Maximum number of results to return": "Nombre maximum de résultats à retourner",
|
||||
"Keyword(s) to search for in form titles": "Mot(s) clé(s) à rechercher dans les titres du formulaire",
|
||||
"The ID of the respondent to update": "L'ID du répondant à mettre à jour",
|
||||
"Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
||||
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD",
|
||||
"Form contact message": "Formulaire de message de contact",
|
||||
"Form transcribed": "Formulaire transcrit",
|
||||
"new form response": "nouvelle réponse au formulaire",
|
||||
"New form author response": "Nouvelle réponse de l'auteur du formulaire",
|
||||
"Triggers when a contact sends a message via a form": "Déclenche lorsqu'un contact envoie un message via un formulaire",
|
||||
"Triggered when a form is transcribed": "Déclenché lorsqu'un formulaire est transcrit",
|
||||
"Trigger when a new form response is submitted": "Déclencher lorsqu'un nouveau formulaire de réponse est envoyé",
|
||||
"Trigger when a form author responds to a contact message": "Déclencher lorsqu'un auteur d'un formulaire répond à un message de contact",
|
||||
"Team ID": "ID d'équipe",
|
||||
"Tag": "Étiquette",
|
||||
"Select the team containing the database": "Sélectionnez l'équipe contenant la base de données",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "Un identifiant court et unique pour ce webhook. Les tags vous aident à distinguer facilement les webhooks lorsque vous avez besoin de les récupérer, de les mettre à jour ou de les supprimer."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "連絡先にタグを追加",
|
||||
"create contact": "連絡先を作成",
|
||||
"Remove tag from contact": "連絡先からタグを削除",
|
||||
"Search form by keyword(s)": "キーワードでフォームを検索",
|
||||
"Update contact": "連絡先を更新",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "VideoAsk の連絡先(回答者)にタグを追加",
|
||||
"Create a new respondent (contact)": "新しい回答者(連絡先)を作成",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "VideoAsk の連絡先(回答者)からタグを削除",
|
||||
"Search forms by keyword(s) within the organization": "組織内のキーワードでフォームを検索",
|
||||
"Update an existing respondent (contact) in VideoAsk": "VideoAsk の既存の回答者(連絡先)を更新",
|
||||
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
||||
"Organization ID": "組織 ID",
|
||||
"Contact ID": "連絡先ID",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Name",
|
||||
"Email": "Eメールアドレス",
|
||||
"Phone": "電話番号",
|
||||
"Limit": "制限",
|
||||
"Search term": "検索キーワード:",
|
||||
"Respondent ID": "回答者ID",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"Select the organization": "組織を選択",
|
||||
"The contact (respondent) id to add the tag to": "タグを追加する連絡先 (回答者) ID",
|
||||
"Select the tag": "タグを選択",
|
||||
"The name of the contact": "連絡先の名前",
|
||||
"The email of the contact": "連絡先のメールアドレス",
|
||||
"The phone number of the contact": "連絡先の電話番号",
|
||||
"The contact (respondent) id to remove the tag from": "タグを削除する連絡先 (回答者) ID",
|
||||
"Maximum number of results to return": "結果の最大数",
|
||||
"Keyword(s) to search for in form titles": "フォームのタイトルを検索するキーワード",
|
||||
"The ID of the respondent to update": "更新する回答者のID",
|
||||
"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": "頭",
|
||||
"Form contact message": "フォーム連絡先メッセージ",
|
||||
"Form transcribed": "書体を書き起こしました",
|
||||
"new form response": "新しいフォーム応答",
|
||||
"New form author response": "新しいフォームの作成者の応答",
|
||||
"Triggers when a contact sends a message via a form": "連絡先がフォーム経由でメッセージを送信したときにトリガーします",
|
||||
"Triggered when a form is transcribed": "フォームが書き換えられたときにトリガーされます",
|
||||
"Trigger when a new form response is submitted": "新しいフォーム応答が送信されたときにトリガーします",
|
||||
"Trigger when a form author responds to a contact message": "フォーム作成者が連絡先メッセージに応答したときにトリガーします",
|
||||
"Team ID": "チームID",
|
||||
"Tag": "タグ",
|
||||
"Select the team containing the database": "データベースを含むチームを選択",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "このWebhookの短い一意の識別子です。タグは、Webhookを取得、更新、削除する必要があるときに簡単に識別できます。"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Tag aan contact toevoegen",
|
||||
"create contact": "Contactpersoon aanmaken",
|
||||
"Remove tag from contact": "Verwijder tag uit contact",
|
||||
"Search form by keyword(s)": "Zoek formulier op trefwoord(en)",
|
||||
"Update contact": "Contact bijwerken",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Voeg een tag toe aan een contact (respondent) in VideoAsk",
|
||||
"Create a new respondent (contact)": "Maak een nieuwe respondent aan (contact)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Verwijder een tag van een contact (respondent) in VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Zoek formulieren op trefwoord(en) in de organisatie",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Update een bestaande respondent (contact) in VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
||||
"Organization ID": "Organisatie ID",
|
||||
"Contact ID": "Contact ID",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Naam",
|
||||
"Email": "E-mail",
|
||||
"Phone": "Telefoonnummer",
|
||||
"Limit": "Limiet",
|
||||
"Search term": "Zoek term",
|
||||
"Respondent ID": "Opnieuw ID",
|
||||
"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)",
|
||||
"Select the organization": "Selecteer de organisatie",
|
||||
"The contact (respondent) id to add the tag to": "Het contact (respondent) id om de tag toe te voegen aan",
|
||||
"Select the tag": "Selecteer de tag",
|
||||
"The name of the contact": "De naam van de contactpersoon",
|
||||
"The email of the contact": "Het e-mailadres van de contactpersoon",
|
||||
"The phone number of the contact": "Het telefoonnummer van de contactpersoon",
|
||||
"The contact (respondent) id to remove the tag from": "Het contact (respondent) id om de tag te verwijderen van",
|
||||
"Maximum number of results to return": "Maximum aantal resultaten om te retourneren",
|
||||
"Keyword(s) to search for in form titles": "Trefwoord(en) om te zoeken in formuliertitels",
|
||||
"The ID of the respondent to update": "Het ID van de geactualiseerde melding",
|
||||
"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",
|
||||
"Form contact message": "Formulier contact bericht",
|
||||
"Form transcribed": "Formulier omgezet",
|
||||
"new form response": "nieuwe formulierreactie",
|
||||
"New form author response": "Nieuw antwoord auteur formulier",
|
||||
"Triggers when a contact sends a message via a form": "Triggert wanneer een contact een bericht via een formulier stuurt",
|
||||
"Triggered when a form is transcribed": "Uitgelokt wanneer een formulier wordt overgeschreven",
|
||||
"Trigger when a new form response is submitted": "Trigger wanneer een nieuw formulierantwoord wordt verzonden",
|
||||
"Trigger when a form author responds to a contact message": "Trigger wanneer een auteur van een formulier reageert op een contactbericht",
|
||||
"Team ID": "Team ID",
|
||||
"Tag": "Tagnaam",
|
||||
"Select the team containing the database": "Selecteer het team dat de database bevat",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "Een korte, unieke id voor deze webhook. Tags helpen u eenvoudig webhooks te onderscheiden als u ze wilt ophalen, bijwerken of verwijderen."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Adicionar etiqueta ao contato",
|
||||
"create contact": "criar contato",
|
||||
"Remove tag from contact": "Remover etiqueta do contato",
|
||||
"Search form by keyword(s)": "Formulário de pesquisa por palavra-chave",
|
||||
"Update contact": "Atualizar contato",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Adicionar uma tag para um contato (respondent) no VideoAsk",
|
||||
"Create a new respondent (contact)": "Criar um novo resposta (contato)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Remover uma tag de um contato (respondent) em VideoPerguntar",
|
||||
"Search forms by keyword(s) within the organization": "Pesquisar formulários por palavra-chave dentro da organização",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Atualizar uma resposta (contato) existente no VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
||||
"Organization ID": "ID da organização",
|
||||
"Contact ID": "ID do contato",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Nome",
|
||||
"Email": "e-mail",
|
||||
"Phone": "Smartphone",
|
||||
"Limit": "Limitar",
|
||||
"Search term": "Termo para pesquisa",
|
||||
"Respondent ID": "ID da resposta",
|
||||
"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)",
|
||||
"Select the organization": "Selecione a organização",
|
||||
"The contact (respondent) id to add the tag to": "O ID do contato (respondent) para adicionar a tag a",
|
||||
"Select the tag": "Selecione o marcador",
|
||||
"The name of the contact": "O nome do contato",
|
||||
"The email of the contact": "O e-mail do contato",
|
||||
"The phone number of the contact": "O número de telefone do contato",
|
||||
"The contact (respondent) id to remove the tag from": "O id do contato (respondent) para remover a tag de",
|
||||
"Maximum number of results to return": "Número máximo de resultados para retornar",
|
||||
"Keyword(s) to search for in form titles": "Palavra-chave para pesquisar em títulos de formulários",
|
||||
"The ID of the respondent to update": "A ID do respondente a atualizar",
|
||||
"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",
|
||||
"Form contact message": "Mensagem de contato",
|
||||
"Form transcribed": "Formulário transcrito",
|
||||
"new form response": "nova resposta de formulário",
|
||||
"New form author response": "Nova resposta ao autor do formulário",
|
||||
"Triggers when a contact sends a message via a form": "Aciona quando um contato envia uma mensagem através de um formulário",
|
||||
"Triggered when a form is transcribed": "Acionada quando um formulário é transcrito",
|
||||
"Trigger when a new form response is submitted": "Ativar quando uma nova resposta de formulário for enviada",
|
||||
"Trigger when a form author responds to a contact message": "Ativar quando um formulário de autor responder a uma mensagem de contato",
|
||||
"Team ID": "ID da Equipe",
|
||||
"Tag": "Etiqueta",
|
||||
"Select the team containing the database": "Selecione a equipe que contém o banco de dados",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "Um identificador curto e exclusivo para este webhook. As tags ajudam a distinguir webhooks facilmente quando você precisa recuperar, atualizar ou excluí-los."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Add tag to contact",
|
||||
"create contact": "create contact",
|
||||
"Remove tag from contact": "Remove tag from contact",
|
||||
"Search form by keyword(s)": "Search form by keyword(s)",
|
||||
"Update contact": "Update contact",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Add a tag to a contact (respondent) in VideoAsk",
|
||||
"Create a new respondent (contact)": "Create a new respondent (contact)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Remove a tag from a contact (respondent) in VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Search forms by keyword(s) within the organization",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Update an existing respondent (contact) in VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Organization ID": "Organization ID",
|
||||
"Contact ID": "Contact ID",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "Name",
|
||||
"Email": "Email",
|
||||
"Phone": "Phone",
|
||||
"Limit": "Limit",
|
||||
"Search term": "Search term",
|
||||
"Respondent ID": "Respondent ID",
|
||||
"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)",
|
||||
"Select the organization": "Select the organization",
|
||||
"The contact (respondent) id to add the tag to": "The contact (respondent) id to add the tag to",
|
||||
"Select the tag": "Select the tag",
|
||||
"The name of the contact": "The name of the contact",
|
||||
"The email of the contact": "The email of the contact",
|
||||
"The phone number of the contact": "The phone number of the contact",
|
||||
"The contact (respondent) id to remove the tag from": "The contact (respondent) id to remove the tag from",
|
||||
"Maximum number of results to return": "Maximum number of results to return",
|
||||
"Keyword(s) to search for in form titles": "Keyword(s) to search for in form titles",
|
||||
"The ID of the respondent to update": "The ID of the respondent to update",
|
||||
"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",
|
||||
"Form contact message": "Form contact message",
|
||||
"Form transcribed": "Form transcribed",
|
||||
"new form response": "new form response",
|
||||
"New form author response": "New form author response",
|
||||
"Triggers when a contact sends a message via a form": "Triggers when a contact sends a message via a form",
|
||||
"Triggered when a form is transcribed": "Triggered when a form is transcribed",
|
||||
"Trigger when a new form response is submitted": "Trigger when a new form response is submitted",
|
||||
"Trigger when a form author responds to a contact message": "Trigger when a form author responds to a contact message",
|
||||
"Team ID": "Team ID",
|
||||
"Tag": "Tag",
|
||||
"Select the team containing the database": "Select the team containing the database",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them."
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"\n": "\n",
|
||||
"Add tag to contact": "Add tag to contact",
|
||||
"create contact": "create contact",
|
||||
"Remove tag from contact": "Remove tag from contact",
|
||||
"Search form by keyword(s)": "Search form by keyword(s)",
|
||||
"Update contact": "Update contact",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"Add a tag to a contact (respondent) in VideoAsk": "Add a tag to a contact (respondent) in VideoAsk",
|
||||
"Create a new respondent (contact)": "Create a new respondent (contact)",
|
||||
"Remove a tag from a contact (respondent) in VideoAsk": "Remove a tag from a contact (respondent) in VideoAsk",
|
||||
"Search forms by keyword(s) within the organization": "Search forms by keyword(s) within the organization",
|
||||
"Update an existing respondent (contact) in VideoAsk": "Update an existing respondent (contact) in VideoAsk",
|
||||
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
||||
"Organization ID": "Organization ID",
|
||||
"Contact ID": "Contact ID",
|
||||
"Tag ID": "Tag ID",
|
||||
"Name": "名称",
|
||||
"Email": "电子邮件地址",
|
||||
"Phone": "Phone",
|
||||
"Limit": "Limit",
|
||||
"Search term": "Search term",
|
||||
"Respondent ID": "Respondent ID",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"Select the organization": "Select the organization",
|
||||
"The contact (respondent) id to add the tag to": "The contact (respondent) id to add the tag to",
|
||||
"Select the tag": "Select the tag",
|
||||
"The name of the contact": "The name of the contact",
|
||||
"The email of the contact": "The email of the contact",
|
||||
"The phone number of the contact": "The phone number of the contact",
|
||||
"The contact (respondent) id to remove the tag from": "The contact (respondent) id to remove the tag from",
|
||||
"Maximum number of results to return": "Maximum number of results to return",
|
||||
"Keyword(s) to search for in form titles": "Keyword(s) to search for in form titles",
|
||||
"The ID of the respondent to update": "The ID of the respondent to update",
|
||||
"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": "黑色",
|
||||
"Form contact message": "Form contact message",
|
||||
"Form transcribed": "Form transcribed",
|
||||
"new form response": "new form response",
|
||||
"New form author response": "New form author response",
|
||||
"Triggers when a contact sends a message via a form": "Triggers when a contact sends a message via a form",
|
||||
"Triggered when a form is transcribed": "Triggered when a form is transcribed",
|
||||
"Trigger when a new form response is submitted": "Trigger when a new form response is submitted",
|
||||
"Trigger when a form author responds to a contact message": "Trigger when a form author responds to a contact message",
|
||||
"Team ID": "Team ID",
|
||||
"Tag": "标签",
|
||||
"Select the team containing the database": "Select the team containing the database",
|
||||
"A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.": "A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them."
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
import { createPiece } from "@activepieces/pieces-framework";
|
||||
import { createContact } from "./lib/actions/create-contact";
|
||||
import { videoaskAuth } from "./lib/common/auth";
|
||||
import { createCustomApiCallAction, HttpMethod } from "@activepieces/pieces-common";
|
||||
import { makeRequest } from "./lib/common/client";
|
||||
import { PieceCategory } from "@activepieces/shared";
|
||||
import { formContactMessage } from "./lib/triggers/form-contact-message";
|
||||
import { formTranscribed } from "./lib/triggers/form-transcribed";
|
||||
import { newFormResponse } from "./lib/triggers/new-form-response";
|
||||
import { newFormAuthorResponse } from "./lib/triggers/new-form-author-response";
|
||||
import { addTagToContact } from "./lib/actions/add-tag-to-contact";
|
||||
import { removeTagFromContact } from "./lib/actions/remove-tag-from-contact";
|
||||
import { searchForm } from "./lib/actions/search-form";
|
||||
import { updateContact } from "./lib/actions/update-contact";
|
||||
import { organizationIdDropdown } from "./lib/common/props";
|
||||
|
||||
export const videoask = createPiece({
|
||||
displayName: "VideoAsk",
|
||||
auth: videoaskAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: "https://cdn.activepieces.com/pieces/videoask.png",
|
||||
authors: ['sanket-a11y'],
|
||||
categories: [PieceCategory.FORMS_AND_SURVEYS],
|
||||
actions: [
|
||||
addTagToContact,
|
||||
createContact,
|
||||
removeTagFromContact,
|
||||
searchForm,
|
||||
updateContact,
|
||||
createCustomApiCallAction({
|
||||
auth: videoaskAuth,
|
||||
baseUrl: () => "https://api.videoask.com",
|
||||
authMapping: async (auth, propsValue) => {
|
||||
return {
|
||||
Authorization: `Bearer ${auth.access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
"organization-id": propsValue['organizationId'],
|
||||
};
|
||||
},
|
||||
extraProps: {
|
||||
organizationId: organizationIdDropdown,
|
||||
}
|
||||
})
|
||||
],
|
||||
triggers: [
|
||||
formContactMessage,
|
||||
formTranscribed,
|
||||
newFormResponse,
|
||||
newFormAuthorResponse
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { organizationIdDropdown, tagIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const addTagToContact = createAction({
|
||||
auth: videoaskAuth,
|
||||
name: 'addTagToContact',
|
||||
displayName: 'Add tag to contact',
|
||||
description: 'Add a tag to a contact (respondent) in VideoAsk',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
contactId: Property.ShortText({
|
||||
displayName: 'Contact ID',
|
||||
description: 'The contact (respondent) id to add the tag to',
|
||||
required: true,
|
||||
}),
|
||||
tagId: tagIdDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const { organizationId, contactId, tagId } = context.propsValue;
|
||||
const access_token = context.auth.access_token as string;
|
||||
|
||||
const response = await makeRequest(
|
||||
organizationId as string,
|
||||
access_token,
|
||||
HttpMethod.PATCH,
|
||||
`/contacts/${contactId}/tags/${tagId}`,
|
||||
{ action: 'add' }
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { organizationIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const createContact = createAction({
|
||||
auth: videoaskAuth,
|
||||
name: 'createContact',
|
||||
displayName: 'create contact',
|
||||
description: 'Create a new respondent (contact)',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
name: Property.ShortText({
|
||||
displayName: 'Name',
|
||||
description: 'The name of the contact',
|
||||
required: false,
|
||||
}),
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
description: 'The email of the contact',
|
||||
required: true,
|
||||
}),
|
||||
phone_number: Property.ShortText({
|
||||
displayName: 'Phone',
|
||||
description: 'The phone number of the contact',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { organizationId, name, email, phone_number } = context.propsValue;
|
||||
const access_token = context.auth.access_token;
|
||||
|
||||
const body = {
|
||||
name,
|
||||
email,
|
||||
phone_number,
|
||||
};
|
||||
|
||||
const response = await makeRequest(
|
||||
organizationId as string,
|
||||
access_token,
|
||||
HttpMethod.POST,
|
||||
'/contacts',
|
||||
body
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { organizationIdDropdown, tagIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const removeTagFromContact = createAction({
|
||||
auth: videoaskAuth,
|
||||
name: 'removeTagFromContact',
|
||||
displayName: 'Remove tag from contact',
|
||||
description: 'Remove a tag from a contact (respondent) in VideoAsk',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
contactId: Property.ShortText({
|
||||
displayName: 'Contact ID',
|
||||
description: 'The contact (respondent) id to remove the tag from',
|
||||
required: true,
|
||||
}),
|
||||
tagId: tagIdDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const { organizationId, contactId, tagId } = context.propsValue;
|
||||
const access_token = context.auth.access_token as string;
|
||||
|
||||
const response = await makeRequest(
|
||||
organizationId as string,
|
||||
access_token,
|
||||
HttpMethod.PATCH,
|
||||
`/contacts/${contactId}/tags/${tagId}`,
|
||||
{ action: 'remove' }
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { organizationIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const searchForm = createAction({
|
||||
auth: videoaskAuth,
|
||||
name: 'searchForm',
|
||||
displayName: 'Search form by keyword(s)',
|
||||
description: 'Search forms by keyword(s) within the organization',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
limit: Property.Number({
|
||||
displayName: 'Limit',
|
||||
description: 'Maximum number of results to return',
|
||||
required: false,
|
||||
defaultValue: 100,
|
||||
}),
|
||||
search: Property.ShortText({
|
||||
displayName: 'Search term',
|
||||
description: 'Keyword(s) to search for in form titles',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { organizationId, limit, search } = context.propsValue;
|
||||
const access_token = context.auth.access_token as string;
|
||||
|
||||
const effectiveLimit = limit ?? 100;
|
||||
const encodedSearch = encodeURIComponent(search as string);
|
||||
|
||||
const response = await makeRequest(
|
||||
organizationId as string,
|
||||
access_token,
|
||||
HttpMethod.GET,
|
||||
`/search/forms?limit=${effectiveLimit}&search=${encodedSearch}`
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { organizationIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const updateContact = createAction({
|
||||
auth: videoaskAuth,
|
||||
name: 'updateContact',
|
||||
displayName: 'Update contact',
|
||||
description: 'Update an existing respondent (contact) in VideoAsk',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
respondentId: Property.ShortText({
|
||||
displayName: 'Respondent ID',
|
||||
description: 'The ID of the respondent to update',
|
||||
required: true,
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Name',
|
||||
description: 'The name of the contact',
|
||||
required: false,
|
||||
}),
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
description: 'The email of the contact',
|
||||
required: false,
|
||||
}),
|
||||
phone_number: Property.ShortText({
|
||||
displayName: 'Phone',
|
||||
description: 'The phone number of the contact',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { organizationId, respondentId, name, email, phone_number } = context.propsValue;
|
||||
const access_token = context.auth.access_token as string;
|
||||
|
||||
const body: Record<string, unknown> = {};
|
||||
if (name !== undefined && name !== null && name !== '') body['name'] = name;
|
||||
if (email !== undefined && email !== null && email !== '') body['email'] = email;
|
||||
if (phone_number !== undefined && phone_number !== null && phone_number !== '') body['phone_number'] = phone_number;
|
||||
|
||||
const path = `/respondents/${respondentId}`;
|
||||
|
||||
const response = await makeRequest(organizationId as string, access_token, HttpMethod.PATCH, path, body);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { PieceAuth } from "@activepieces/pieces-framework";
|
||||
|
||||
|
||||
const authdec = `
|
||||
`
|
||||
|
||||
export const videoaskAuth = PieceAuth.OAuth2({
|
||||
description: authdec,
|
||||
authUrl: 'https://auth.videoask.com/authorize',
|
||||
tokenUrl: 'https://auth.videoask.com/oauth/token',
|
||||
required: true,
|
||||
scope: [],
|
||||
})
|
||||
@@ -0,0 +1,27 @@
|
||||
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
|
||||
|
||||
export const BASE_URL = `https://api.videoask.com`;
|
||||
|
||||
export async function makeRequest(
|
||||
organizationId: string,
|
||||
access_token: string,
|
||||
method: HttpMethod,
|
||||
path: string,
|
||||
body?: unknown
|
||||
) {
|
||||
try {
|
||||
const response = await httpClient.sendRequest({
|
||||
method,
|
||||
url: `${BASE_URL}${path}`,
|
||||
headers: {
|
||||
Authorization: `Bearer ${access_token}`,
|
||||
'Content-Type': 'application/json',
|
||||
'organization-id': organizationId,
|
||||
},
|
||||
body,
|
||||
});
|
||||
return response.body;
|
||||
} catch (error: any) {
|
||||
throw new Error(`Unexpected error: ${error.message || String(error)}`);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { Property } from "@activepieces/pieces-framework";
|
||||
import { makeRequest } from "./client";
|
||||
import { videoaskAuth } from "./auth";
|
||||
|
||||
export const organizationIdDropdown = Property.Dropdown({
|
||||
displayName: 'Organization ID',
|
||||
auth: videoaskAuth,
|
||||
description: 'Select the organization',
|
||||
required: true,
|
||||
refreshers: ['auth'],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const access_token = (auth as any).access_token;
|
||||
const organizations = await makeRequest('', access_token, HttpMethod.GET, '/organizations');
|
||||
return {
|
||||
disabled: false,
|
||||
options: organizations.results.map((organization: any) => ({
|
||||
label: organization.name || organization.organization_id,
|
||||
value: organization.organization_id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading organizations',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const videoaskIdDropdown = Property.Dropdown({
|
||||
auth: videoaskAuth,
|
||||
displayName: 'Team ID',
|
||||
description: 'Select the team containing the database',
|
||||
required: true,
|
||||
refreshers: ['auth', 'organizationId'],
|
||||
options: async ({ auth, organizationId }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your account first',
|
||||
};
|
||||
}
|
||||
if (!organizationId) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please select organization first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const videoasks = await makeRequest(organizationId as string, auth.access_token, HttpMethod.GET, '/forms');
|
||||
return {
|
||||
disabled: false,
|
||||
options: videoasks.results.map((videoask: any) => ({
|
||||
label: videoask.title,
|
||||
value: videoask.form_id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading teams',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const tagIdDropdown = Property.Dropdown({
|
||||
displayName: 'Tag ID',
|
||||
auth: videoaskAuth,
|
||||
description: 'Select the tag',
|
||||
required: true,
|
||||
refreshers: ['auth', 'organizationId'],
|
||||
options: async ({ auth, organizationId }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your account first',
|
||||
};
|
||||
}
|
||||
if (!organizationId) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please select organization first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const tags = await makeRequest(organizationId as string, (auth as any).access_token, HttpMethod.GET, '/tags');
|
||||
return {
|
||||
disabled: false,
|
||||
options: tags.results.map((tag: any) => ({
|
||||
label: tag.title,
|
||||
value: tag.tag_id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading tags',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,367 @@
|
||||
import {
|
||||
createTrigger,
|
||||
Property,
|
||||
TriggerStrategy,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { organizationIdDropdown, videoaskIdDropdown } from '../common/props';
|
||||
import { makeRequest } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
export const formContactMessage = createTrigger({
|
||||
auth: videoaskAuth,
|
||||
name: 'formContactMessage',
|
||||
displayName: 'Form contact message',
|
||||
description: 'Triggers when a contact sends a message via a form',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
formId: videoaskIdDropdown,
|
||||
tag: Property.ShortText({
|
||||
displayName: 'Tag',
|
||||
description:
|
||||
'A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
sampleData: {
|
||||
"event_id": "35f63f63c4c31d04a938d5b279a6a4e6",
|
||||
"event_type": "form_contact_message",
|
||||
"interaction_id": "386bbc0b-bb60-4b62-82fa-d630d0d2b83b",
|
||||
"contact": {
|
||||
"contact_id": "6f0cde71-546c-499b-8cdb-c661300fb7f3",
|
||||
"name": "John Doe",
|
||||
"email": "john.doe@example.com",
|
||||
"status": "completed",
|
||||
"created_at": "2020-08-13T09:07:25.501318Z",
|
||||
"updated_at": "2020-08-13T09:07:55.461776Z",
|
||||
"answers": [
|
||||
{
|
||||
"answer_id": "f0f5a564-1f46-49e9-b579-731e6e3f9c4e",
|
||||
"created_at": "2020-08-13T09:07:31.216396Z",
|
||||
"is_public": false,
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries"
|
||||
}
|
||||
],
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"type": "poll",
|
||||
"poll_option_id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"poll_option_content": "Strawberries"
|
||||
},
|
||||
{
|
||||
"answer_id": "6254f48a-a29d-4623-9525-9a8aeab9b5dc",
|
||||
"created_at": "2020-08-13T09:07:55.181435Z",
|
||||
"input_text": "Bacause they're tasty!",
|
||||
"is_public": false,
|
||||
"poll_options": [],
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
{
|
||||
"author_type": "form_author",
|
||||
"created_at": "2020-08-13T09:09:47.351432Z",
|
||||
"gif": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/preview.gif?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"is_public": true,
|
||||
"media_duration": 9,
|
||||
"media_type": "video",
|
||||
"media_url": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/video.mp4?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"message_id": "e4d547ca-e29b-47cb-9096-8f8bbafedde2",
|
||||
"share_id": "mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"share_url": "https://www.videoask.com/mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"thread_id": "95ae6155-f970-4d18-9116-191777fef28a",
|
||||
"thumbnail": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/image.0000001.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"transcription": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you.",
|
||||
"transcription_data": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "Hello,",
|
||||
"end_time": 1.1,
|
||||
"start_time": 0.8
|
||||
},
|
||||
{
|
||||
"word": "John.",
|
||||
"end_time": 1.5,
|
||||
"start_time": 1.1
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"end_time": 1.7,
|
||||
"start_time": 1.5
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 1.8,
|
||||
"start_time": 1.7
|
||||
},
|
||||
{
|
||||
"word": "so",
|
||||
"end_time": 1.9,
|
||||
"start_time": 1.8
|
||||
},
|
||||
{
|
||||
"word": "much",
|
||||
"end_time": 2.1,
|
||||
"start_time": 1.9
|
||||
},
|
||||
{
|
||||
"word": "for",
|
||||
"end_time": 2.3,
|
||||
"start_time": 2.1
|
||||
},
|
||||
{
|
||||
"word": "your",
|
||||
"end_time": 2.4,
|
||||
"start_time": 2.3
|
||||
},
|
||||
{
|
||||
"word": "response.",
|
||||
"end_time": 3.1,
|
||||
"start_time": 2.4
|
||||
},
|
||||
{
|
||||
"word": "Can",
|
||||
"end_time": 4,
|
||||
"start_time": 3.9
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 4.1,
|
||||
"start_time": 4
|
||||
},
|
||||
{
|
||||
"word": "please",
|
||||
"end_time": 4.8,
|
||||
"start_time": 4.1
|
||||
},
|
||||
{
|
||||
"word": "explain",
|
||||
"end_time": 5.3,
|
||||
"start_time": 4.8
|
||||
},
|
||||
{
|
||||
"word": "have",
|
||||
"end_time": 5.5,
|
||||
"start_time": 5.3
|
||||
},
|
||||
{
|
||||
"word": "it",
|
||||
"end_time": 5.6,
|
||||
"start_time": 5.5
|
||||
},
|
||||
{
|
||||
"word": "better?",
|
||||
"end_time": 6.1,
|
||||
"start_time": 5.6
|
||||
},
|
||||
{
|
||||
"word": "Why",
|
||||
"end_time": 6.3,
|
||||
"start_time": 6.1
|
||||
},
|
||||
{
|
||||
"word": "do",
|
||||
"end_time": 6.4,
|
||||
"start_time": 6.3
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 6.5,
|
||||
"start_time": 6.4
|
||||
},
|
||||
{
|
||||
"word": "love",
|
||||
"end_time": 6.7,
|
||||
"start_time": 6.5
|
||||
},
|
||||
{
|
||||
"word": "strawberries?",
|
||||
"end_time": 7.5,
|
||||
"start_time": 6.7
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"end_time": 8.2,
|
||||
"start_time": 8
|
||||
},
|
||||
{
|
||||
"word": "you.",
|
||||
"end_time": 8.5,
|
||||
"start_time": 8.2
|
||||
}
|
||||
],
|
||||
"confidence": 0.90139115,
|
||||
"transcript": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you."
|
||||
}
|
||||
],
|
||||
"type": "video"
|
||||
},
|
||||
{
|
||||
"author_type": "contact",
|
||||
"created_at": "2020-08-13T09:32:21.909981Z",
|
||||
"is_public": false,
|
||||
"media_type": "text",
|
||||
"message_id": "511bfc20-691e-471f-9f73-02e1d9888b41",
|
||||
"share_id": "mqre28jqxifto11ejkxhvln4c3akaks8ejciqlk1",
|
||||
"share_url": "https://www.videoask.com/mqre28jqxifto11ejkxhvln4c3akaks8ejciqlk1",
|
||||
"thread_id": "95ae6155-f970-4d18-9116-191777fef28a",
|
||||
"transcode_status": "completed",
|
||||
"transcription": "Because they look good, they smell good and they taste good! \nThey're even a great source of nutrition and antioxidants.",
|
||||
"type": "text",
|
||||
"input_text": "Because they look good, they smell good and they taste good! \nThey're even a great source of nutrition and antioxidants."
|
||||
}
|
||||
],
|
||||
"platform": "desktop",
|
||||
"tags": [],
|
||||
"are_answers_public": false,
|
||||
"are_messages_public": false,
|
||||
"share_id": "c3rqviz79cva7xmuoo70rva4l5fi699isbzvxjym",
|
||||
"share_url": "https://www.videoask.com/c3rqviz79cva7xmuoo70rva4l5fi699isbzvxjym"
|
||||
},
|
||||
"form": {
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"title": "Example form for documentation",
|
||||
"requires_contact_info": true,
|
||||
"requires_contact_email": true,
|
||||
"requires_contact_name": true,
|
||||
"requires_contact_phone_number": false,
|
||||
"hide_branding": false,
|
||||
"metadata": {
|
||||
"primary_color": "#522CBB",
|
||||
"secondary_color": "#4CD982",
|
||||
"locale": "en-US",
|
||||
"show_form_title": true
|
||||
},
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"created_at": "2020-03-30T15:53:59.331687Z",
|
||||
"updated_at": "2020-04-23T08:40:51.775168Z",
|
||||
"respondents_count": 13,
|
||||
"author_id": "8a484e48-2e8e-423d-8d91-b1d6c98b60f2",
|
||||
"questions": [
|
||||
{
|
||||
"answers_count": 9,
|
||||
"created_at": "2020-03-30T15:53:59.697150Z",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"media_id": "e627bdd1-a9db-41a9-80db-a6546c9c6ba6",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy.mp4?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy.mp4",
|
||||
"metadata": {
|
||||
"text": "What's your favorite fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "27b7cd85-db1e-4316-8dbe-772523feb098",
|
||||
"content": "Bananas",
|
||||
"total_count": 3
|
||||
},
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries",
|
||||
"total_count": 4
|
||||
},
|
||||
{
|
||||
"id": "b15efc9c-ae2e-4254-b653-50c8ef2b7364",
|
||||
"content": "Apples",
|
||||
"total_count": 0
|
||||
},
|
||||
{
|
||||
"id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"content": "Grapes",
|
||||
"total_count": 1
|
||||
},
|
||||
{
|
||||
"id": "6daada9f-cc7b-4ffe-9529-f16f35517770",
|
||||
"content": "Other",
|
||||
"total_count": 1
|
||||
}
|
||||
],
|
||||
"allow_multiple_selection": false,
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"thumbnail": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy-preview.gif?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"type": "poll",
|
||||
"updated_at": "2020-03-30T15:57:11.319072Z"
|
||||
},
|
||||
{
|
||||
"allowed_answer_media_types": [
|
||||
"video",
|
||||
"audio",
|
||||
"text"
|
||||
],
|
||||
"created_at": "2020-03-30T15:57:10.931514Z",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"media_id": "8031b331-c5e1-4fda-8523-314c2fa5cdd8",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy.mp4?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy.mp4",
|
||||
"metadata": {
|
||||
"text": "Why do you love that fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"allow_multiple_selection": false,
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"thumbnail": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy-preview.gif?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"type": "standard",
|
||||
"updated_at": "2020-03-30T15:57:11.324552Z"
|
||||
}
|
||||
],
|
||||
"are_answers_public": false,
|
||||
"notifications": {
|
||||
"send_contact_message_emails": true
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"author_type": "contact",
|
||||
"created_at": "2020-08-13T09:32:21.909981Z",
|
||||
"is_public": false,
|
||||
"media_type": "text",
|
||||
"message_id": "511bfc20-691e-471f-9f73-02e1d9888b41",
|
||||
"share_id": "mqre28jqxifto11ejkxhvln4c3akaks8ejciqlk1",
|
||||
"share_url": "https://www.videoask.com/mqre28jqxifto11ejkxhvln4c3akaks8ejciqlk1",
|
||||
"thread_id": "95ae6155-f970-4d18-9116-191777fef28a",
|
||||
"transcode_status": "completed",
|
||||
"transcription": "Because they look good, they smell good and they taste good! \nThey're even a great source of nutrition and antioxidants.",
|
||||
"type": "text",
|
||||
"input_text": "Because they look good, they smell good and they taste good! \nThey're even a great source of nutrition and antioxidants."
|
||||
}
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.PUT,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`,
|
||||
{
|
||||
url: context.webhookUrl,
|
||||
event_types: ['form_contact_message'],
|
||||
}
|
||||
);
|
||||
},
|
||||
async onDisable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.DELETE,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`
|
||||
);
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,168 @@
|
||||
|
||||
import { createTrigger, Property, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { organizationIdDropdown, videoaskIdDropdown } from '../common/props';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { makeRequest } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
export const formTranscribed = createTrigger({
|
||||
auth: videoaskAuth,
|
||||
name: 'formTranscribed',
|
||||
displayName: 'Form transcribed',
|
||||
description: 'Triggered when a form is transcribed',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
formId: videoaskIdDropdown,
|
||||
tag: Property.ShortText({
|
||||
displayName: 'Tag',
|
||||
description:
|
||||
'A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
sampleData: {
|
||||
"event_id": "1cc057d1a8acc59ed2ed7a7cd5edbf1b",
|
||||
"event_type": "form_response_transcribed",
|
||||
"interaction_id": "386bbc0b-bb60-4b62-82fa-d630d0d2b83b",
|
||||
"contact": {
|
||||
"contact_id": "7c6550ff-fe15-424a-918e-2c1936db8aed",
|
||||
"name": "John Doe",
|
||||
"email": "john.doe@example.com",
|
||||
"phone_number": null,
|
||||
"thumbnail": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej-00001.jpg",
|
||||
"status": "completed",
|
||||
"created_at": "2020-03-30T16:04:09.021715Z",
|
||||
"updated_at": "2020-03-30T16:05:08.952236Z",
|
||||
"answers": [
|
||||
{
|
||||
"answer_id": "0f4ab93a-4914-4e4a-a33b-8466fda6147a",
|
||||
"created_at": "2020-03-30T16:04:09.353595Z",
|
||||
"poll_option_content": "Grapes",
|
||||
"poll_option_id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"type": "poll"
|
||||
},
|
||||
{
|
||||
"answer_id": "995948a9-8a02-48f8-a018-769f0f25e7f8",
|
||||
"created_at": "2020-03-30T16:05:05.434020Z",
|
||||
"media_url": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej.mp4",
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"share_id": "a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej",
|
||||
"share_url": "https://www.videoask.com/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej",
|
||||
"thumbnail": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej-00001.jpg",
|
||||
"transcode_status": "completed",
|
||||
"transcription": "I don't actually know, but once I start eating them, I can never stop.",
|
||||
"type": "video"
|
||||
}
|
||||
]
|
||||
},
|
||||
"form": {
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"title": "Example form for documentation",
|
||||
"requires_contact_info": true,
|
||||
"requires_contact_email": true,
|
||||
"requires_contact_name": true,
|
||||
"requires_contact_phone_number": false,
|
||||
"hide_branding": false,
|
||||
"metadata": {
|
||||
"primary_color": "#522CBB",
|
||||
"secondary_color": "#4CD982",
|
||||
"locale": "en-US",
|
||||
"show_form_title": true
|
||||
},
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"created_at": "2020-03-30T15:53:59.331687Z",
|
||||
"updated_at": "2020-03-30T15:57:11.330236Z",
|
||||
"author_id": "8a484e48-2e8e-423d-8d91-b1d6c98b60f2",
|
||||
"questions": [
|
||||
{
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"metadata": {
|
||||
"text": "What's your favorite fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"type": "poll",
|
||||
"share_id": "ql0eet9ga",
|
||||
"share_url": "https://www.videoask.com/ql0eet9ga",
|
||||
"created_at": "2020-03-30T15:53:59.697150Z",
|
||||
"updated_at": "2020-03-30T15:57:11.319072Z",
|
||||
"thumbnail": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy-preview.gif?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy.mp4?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy.mp4",
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "27b7cd85-db1e-4316-8dbe-772523feb098",
|
||||
"content": "Bananas"
|
||||
},
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries"
|
||||
},
|
||||
{
|
||||
"id": "b15efc9c-ae2e-4254-b653-50c8ef2b7364",
|
||||
"content": "Apples"
|
||||
},
|
||||
{
|
||||
"id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"content": "Grapes"
|
||||
},
|
||||
{
|
||||
"id": "6daada9f-cc7b-4ffe-9529-f16f35517770",
|
||||
"content": "Other"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"metadata": {
|
||||
"text": "Why do you love that fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"type": "standard",
|
||||
"allowed_answer_media_types": [
|
||||
"video",
|
||||
"audio",
|
||||
"text"
|
||||
],
|
||||
"share_id": "qrv6rnyg3",
|
||||
"share_url": "https://www.videoask.com/qrv6rnyg3",
|
||||
"created_at": "2020-03-30T15:57:10.931514Z",
|
||||
"updated_at": "2020-03-30T15:57:11.324552Z",
|
||||
"thumbnail": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy-preview.gif?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy.mp4?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy.mp4"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.PUT,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`,
|
||||
{
|
||||
url: context.webhookUrl,
|
||||
event_types: ['form_response_transcribed']
|
||||
}
|
||||
);
|
||||
},
|
||||
async onDisable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.DELETE,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`
|
||||
);
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body]
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,480 @@
|
||||
import {
|
||||
createTrigger,
|
||||
Property,
|
||||
TriggerStrategy,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
import { organizationIdDropdown, videoaskIdDropdown } from '../common/props';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { makeRequest } from '../common/client';
|
||||
|
||||
export const newFormAuthorResponse = createTrigger({
|
||||
auth: videoaskAuth,
|
||||
name: 'newFormAuthorResponse',
|
||||
displayName: 'New form author response',
|
||||
description: 'Trigger when a form author responds to a contact message',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
formId: videoaskIdDropdown,
|
||||
tag: Property.ShortText({
|
||||
displayName: 'Tag',
|
||||
description:
|
||||
'A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
sampleData: {
|
||||
"event_id": "a69aeb109cd0c1408e71c3836e84e74f",
|
||||
"event_type": "form_author_message",
|
||||
"contact": {
|
||||
"contact_id": "6f0cde71-546c-499b-8cdb-c661300fb7f3",
|
||||
"name": "John Doe",
|
||||
"email": "john.doe@example.com",
|
||||
"status": "completed",
|
||||
"created_at": "2020-08-13T09:07:25.501318Z",
|
||||
"updated_at": "2020-08-13T09:07:55.461776Z",
|
||||
"answers": [
|
||||
{
|
||||
"answer_id": "f0f5a564-1f46-49e9-b579-731e6e3f9c4e",
|
||||
"created_at": "2020-08-13T09:07:31.216396Z",
|
||||
"is_public": false,
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries"
|
||||
}
|
||||
],
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"type": "poll",
|
||||
"poll_option_id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"poll_option_content": "Strawberries"
|
||||
},
|
||||
{
|
||||
"answer_id": "6254f48a-a29d-4623-9525-9a8aeab9b5dc",
|
||||
"created_at": "2020-08-13T09:07:55.181435Z",
|
||||
"input_text": "Bacause they're tasty!",
|
||||
"is_public": false,
|
||||
"poll_options": [],
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
{
|
||||
"author_type": "form_author",
|
||||
"created_at": "2020-08-13T09:09:47.351432Z",
|
||||
"gif": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/preview.gif?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"is_public": true,
|
||||
"media_duration": 9,
|
||||
"media_type": "video",
|
||||
"media_url": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/video.mp4?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"message_id": "e4d547ca-e29b-47cb-9096-8f8bbafedde2",
|
||||
"share_id": "mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"share_url": "https://www.videoask.com/mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"thread_id": "95ae6155-f970-4d18-9116-191777fef28a",
|
||||
"thumbnail": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/image.0000001.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"transcription": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you.",
|
||||
"transcription_data": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "Hello,",
|
||||
"end_time": 1.1,
|
||||
"start_time": 0.8
|
||||
},
|
||||
{
|
||||
"word": "John.",
|
||||
"end_time": 1.5,
|
||||
"start_time": 1.1
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"end_time": 1.7,
|
||||
"start_time": 1.5
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 1.8,
|
||||
"start_time": 1.7
|
||||
},
|
||||
{
|
||||
"word": "so",
|
||||
"end_time": 1.9,
|
||||
"start_time": 1.8
|
||||
},
|
||||
{
|
||||
"word": "much",
|
||||
"end_time": 2.1,
|
||||
"start_time": 1.9
|
||||
},
|
||||
{
|
||||
"word": "for",
|
||||
"end_time": 2.3,
|
||||
"start_time": 2.1
|
||||
},
|
||||
{
|
||||
"word": "your",
|
||||
"end_time": 2.4,
|
||||
"start_time": 2.3
|
||||
},
|
||||
{
|
||||
"word": "response.",
|
||||
"end_time": 3.1,
|
||||
"start_time": 2.4
|
||||
},
|
||||
{
|
||||
"word": "Can",
|
||||
"end_time": 4,
|
||||
"start_time": 3.9
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 4.1,
|
||||
"start_time": 4
|
||||
},
|
||||
{
|
||||
"word": "please",
|
||||
"end_time": 4.8,
|
||||
"start_time": 4.1
|
||||
},
|
||||
{
|
||||
"word": "explain",
|
||||
"end_time": 5.3,
|
||||
"start_time": 4.8
|
||||
},
|
||||
{
|
||||
"word": "have",
|
||||
"end_time": 5.5,
|
||||
"start_time": 5.3
|
||||
},
|
||||
{
|
||||
"word": "it",
|
||||
"end_time": 5.6,
|
||||
"start_time": 5.5
|
||||
},
|
||||
{
|
||||
"word": "better?",
|
||||
"end_time": 6.1,
|
||||
"start_time": 5.6
|
||||
},
|
||||
{
|
||||
"word": "Why",
|
||||
"end_time": 6.3,
|
||||
"start_time": 6.1
|
||||
},
|
||||
{
|
||||
"word": "do",
|
||||
"end_time": 6.4,
|
||||
"start_time": 6.3
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"end_time": 6.5,
|
||||
"start_time": 6.4
|
||||
},
|
||||
{
|
||||
"word": "love",
|
||||
"end_time": 6.7,
|
||||
"start_time": 6.5
|
||||
},
|
||||
{
|
||||
"word": "strawberries?",
|
||||
"end_time": 7.5,
|
||||
"start_time": 6.7
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"end_time": 8.2,
|
||||
"start_time": 8
|
||||
},
|
||||
{
|
||||
"word": "you.",
|
||||
"end_time": 8.5,
|
||||
"start_time": 8.2
|
||||
}
|
||||
],
|
||||
"confidence": 0.90139115,
|
||||
"transcript": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you."
|
||||
}
|
||||
],
|
||||
"type": "video"
|
||||
}
|
||||
],
|
||||
"platform": "desktop",
|
||||
"tags": [],
|
||||
"are_answers_public": false,
|
||||
"are_messages_public": false,
|
||||
"share_id": "c3rqviz79cva7xmuoo70rva4l5fi699isbzvxjym",
|
||||
"share_url": "https://www.videoask.com/c3rqviz79cva7xmuoo70rva4l5fi699isbzvxjym"
|
||||
},
|
||||
"form": {
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"title": "Example form for documentation",
|
||||
"requires_contact_info": true,
|
||||
"requires_contact_email": true,
|
||||
"requires_contact_name": true,
|
||||
"requires_contact_phone_number": false,
|
||||
"hide_branding": false,
|
||||
"metadata": {
|
||||
"primary_color": "#522CBB",
|
||||
"secondary_color": "#4CD982",
|
||||
"locale": "en-US",
|
||||
"show_form_title": true
|
||||
},
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"created_at": "2020-03-30T15:53:59.331687Z",
|
||||
"updated_at": "2020-04-23T08:40:51.775168Z",
|
||||
"respondents_count": 13,
|
||||
"author_id": "8a484e48-2e8e-423d-8d91-b1d6c98b60f2",
|
||||
"questions": [
|
||||
{
|
||||
"answers_count": 9,
|
||||
"created_at": "2020-03-30T15:53:59.697150Z",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"media_id": "e627bdd1-a9db-41a9-80db-a6546c9c6ba6",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy.mp4?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy.mp4",
|
||||
"metadata": {
|
||||
"text": "What's your favorite fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "27b7cd85-db1e-4316-8dbe-772523feb098",
|
||||
"content": "Bananas",
|
||||
"total_count": 3
|
||||
},
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries",
|
||||
"total_count": 4
|
||||
},
|
||||
{
|
||||
"id": "b15efc9c-ae2e-4254-b653-50c8ef2b7364",
|
||||
"content": "Apples",
|
||||
"total_count": 0
|
||||
},
|
||||
{
|
||||
"id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"content": "Grapes",
|
||||
"total_count": 1
|
||||
},
|
||||
{
|
||||
"id": "6daada9f-cc7b-4ffe-9529-f16f35517770",
|
||||
"content": "Other",
|
||||
"total_count": 1
|
||||
}
|
||||
],
|
||||
"allow_multiple_selection": false,
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"thumbnail": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy-preview.gif?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"type": "poll",
|
||||
"updated_at": "2020-03-30T15:57:11.319072Z"
|
||||
},
|
||||
{
|
||||
"allowed_answer_media_types": [
|
||||
"video",
|
||||
"audio",
|
||||
"text"
|
||||
],
|
||||
"created_at": "2020-03-30T15:57:10.931514Z",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"media_id": "8031b331-c5e1-4fda-8523-314c2fa5cdd8",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy.mp4?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy.mp4",
|
||||
"metadata": {
|
||||
"text": "Why do you love that fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"allow_multiple_selection": false,
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"thumbnail": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy-preview.gif?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"type": "standard",
|
||||
"updated_at": "2020-03-30T15:57:11.324552Z"
|
||||
}
|
||||
],
|
||||
"are_answers_public": false,
|
||||
"notifications": {
|
||||
"send_contact_message_emails": true
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"author_type": "form_author",
|
||||
"created_at": "2020-08-13T09:09:47.351432Z",
|
||||
"gif": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/preview.gif?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"is_public": true,
|
||||
"media_duration": 9,
|
||||
"media_type": "video",
|
||||
"media_url": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/video.mp4?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"message_id": "e4d547ca-e29b-47cb-9096-8f8bbafedde2",
|
||||
"share_id": "mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"share_url": "https://www.videoask.com/mctlhdikwzcxs0f618gu5mn247pexyxuqpbvodny",
|
||||
"thread_id": "95ae6155-f970-4d18-9116-191777fef28a",
|
||||
"thumbnail": "https://media.videoask.com/transcoded/b3286b15-8722-44ad-99dd-ef643f0bb9da/thumbnails/image.0000001.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJtZWRpYV9pZCI6ImIzMjg2YjE1LTg3MjItNDRhZC05OWRkLWVmNjQzZjBiYjlkYSIsImV4cCI6MTU5NzkxNDU4N30.sUyDJaJVDlaCTtwXIeytwRwNS9wHLSTge15owz3La2deuJLJd1xLuEEyS35F2hfPLdVsoQl6Whn9fugdCGRl9KUllPYMyJuqJwSh9bzQTsJ_VO7A3kEna13P3VOP5G3skq-XfWn3PWdmNy90HeiDikAbV4RTaxGx6OLlV6s7swqT--lQUhn8NjRYElkPBkhOKtdt_sTGXDfEcvuCB2ymvRjLxHjSB3W0o0MThiizKevEhOuwo4z6su2EECmoQ_ahGVo-f64qgSYGflflYAWtvwLntjEa1uJQ8oCbSJaffk34VHenTLj4bc-rCfbGjXK4azw_HxTm7l8em-hxpoGEm_QzNMar0NGY5hn2nZove6ekDLHUp5DpcwuAhN2nbuswRjCeI3i4f2e8EUa4w_PNHvlMk5vBTErMqNTA-28pyfz5OD1MyEQ7fH5vSnsLvRWvpYFTl-1J22krPTurN_TxPGBaEEyHSJHdK_5rqBE4kwJBwDWY-tPJrRJKKQaRF7AtvtYBhiRFlcU1eX5tWiSJvVKK5jwCLpd8nq58cx1xo5bWDspidNbAWDAh_xTQ6YFQcBX4gVDUPtse-tOBiXFjX-7O7EL3ykkWDlybRUgOw__HcemaneydY1fytJBcK_AUbB46pO0aNct11cP2-S92ie-HTwibymWuoU-YhLDEid4",
|
||||
"transcode_status": "completed",
|
||||
"transcribe_status": "completed",
|
||||
"transcription": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you.",
|
||||
"transcription_data": [
|
||||
{
|
||||
"transcript": "Hello, John. Thank you so much for your response. Can you please explain have it better? Why do you love strawberries? Thank you.",
|
||||
"confidence": 0.90139115,
|
||||
"words": [
|
||||
{
|
||||
"word": "Hello,",
|
||||
"start_time": 0.8,
|
||||
"end_time": 1.1
|
||||
},
|
||||
{
|
||||
"word": "John.",
|
||||
"start_time": 1.1,
|
||||
"end_time": 1.5
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"start_time": 1.5,
|
||||
"end_time": 1.7
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"start_time": 1.7,
|
||||
"end_time": 1.8
|
||||
},
|
||||
{
|
||||
"word": "so",
|
||||
"start_time": 1.8,
|
||||
"end_time": 1.9
|
||||
},
|
||||
{
|
||||
"word": "much",
|
||||
"start_time": 1.9,
|
||||
"end_time": 2.1
|
||||
},
|
||||
{
|
||||
"word": "for",
|
||||
"start_time": 2.1,
|
||||
"end_time": 2.3
|
||||
},
|
||||
{
|
||||
"word": "your",
|
||||
"start_time": 2.3,
|
||||
"end_time": 2.4
|
||||
},
|
||||
{
|
||||
"word": "response.",
|
||||
"start_time": 2.4,
|
||||
"end_time": 3.1
|
||||
},
|
||||
{
|
||||
"word": "Can",
|
||||
"start_time": 3.9,
|
||||
"end_time": 4
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"start_time": 4,
|
||||
"end_time": 4.1
|
||||
},
|
||||
{
|
||||
"word": "please",
|
||||
"start_time": 4.1,
|
||||
"end_time": 4.8
|
||||
},
|
||||
{
|
||||
"word": "explain",
|
||||
"start_time": 4.8,
|
||||
"end_time": 5.3
|
||||
},
|
||||
{
|
||||
"word": "have",
|
||||
"start_time": 5.3,
|
||||
"end_time": 5.5
|
||||
},
|
||||
{
|
||||
"word": "it",
|
||||
"start_time": 5.5,
|
||||
"end_time": 5.6
|
||||
},
|
||||
{
|
||||
"word": "better?",
|
||||
"start_time": 5.6,
|
||||
"end_time": 6.1
|
||||
},
|
||||
{
|
||||
"word": "Why",
|
||||
"start_time": 6.1,
|
||||
"end_time": 6.3
|
||||
},
|
||||
{
|
||||
"word": "do",
|
||||
"start_time": 6.3,
|
||||
"end_time": 6.4
|
||||
},
|
||||
{
|
||||
"word": "you",
|
||||
"start_time": 6.4,
|
||||
"end_time": 6.5
|
||||
},
|
||||
{
|
||||
"word": "love",
|
||||
"start_time": 6.5,
|
||||
"end_time": 6.7
|
||||
},
|
||||
{
|
||||
"word": "strawberries?",
|
||||
"start_time": 6.7,
|
||||
"end_time": 7.5
|
||||
},
|
||||
{
|
||||
"word": "Thank",
|
||||
"start_time": 8,
|
||||
"end_time": 8.2
|
||||
},
|
||||
{
|
||||
"word": "you.",
|
||||
"start_time": 8.2,
|
||||
"end_time": 8.5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "video"
|
||||
}
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.PUT,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`,
|
||||
{
|
||||
url: context.webhookUrl,
|
||||
event_types: ['form_author_response'],
|
||||
}
|
||||
);
|
||||
},
|
||||
async onDisable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.DELETE,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`
|
||||
);
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,169 @@
|
||||
|
||||
import { createTrigger, Property, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { organizationIdDropdown, videoaskIdDropdown } from '../common/props';
|
||||
import { makeRequest } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { videoaskAuth } from '../common/auth';
|
||||
export const newFormResponse = createTrigger({
|
||||
auth: videoaskAuth,
|
||||
name: 'newFormResponse',
|
||||
displayName: 'new form response',
|
||||
description: 'Trigger when a new form response is submitted',
|
||||
props: {
|
||||
organizationId: organizationIdDropdown,
|
||||
formId: videoaskIdDropdown,
|
||||
tag: Property.ShortText({
|
||||
displayName: 'Tag',
|
||||
description:
|
||||
'A short, unique identifier for this webhook. Tags help you easily distinguish webhooks when you need to retrieve, update, or delete them.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
sampleData: {
|
||||
"event_id": "7df19833701662b6414ed1765dcc626c",
|
||||
"event_type": "form_response",
|
||||
"interaction_id": "386bbc0b-bb60-4b62-82fa-d630d0d2b83b",
|
||||
"contact": {
|
||||
"contact_id": "7c6550ff-fe15-424a-918e-2c1936db8aed",
|
||||
"name": "John Doe",
|
||||
"email": "john.doe@example.com",
|
||||
"phone_number": null,
|
||||
"thumbnail": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej-00001.jpg",
|
||||
"status": "completed",
|
||||
"created_at": "2020-03-30T16:04:09.021715Z",
|
||||
"updated_at": "2020-03-30T16:05:08.952236Z",
|
||||
"answers": [
|
||||
{
|
||||
"answer_id": "0f4ab93a-4914-4e4a-a33b-8466fda6147a",
|
||||
"created_at": "2020-03-30T16:04:09.353595Z",
|
||||
"poll_option_content": "Grapes",
|
||||
"poll_option_id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"type": "poll"
|
||||
},
|
||||
{
|
||||
"answer_id": "995948a9-8a02-48f8-a018-769f0f25e7f8",
|
||||
"created_at": "2020-03-30T16:05:05.434020Z",
|
||||
"media_url": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej.mp4",
|
||||
"media_duration": 6,
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"share_id": "a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej",
|
||||
"share_url": "https://www.videoask.com/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej",
|
||||
"thumbnail": "https://media.videoask.com/transcoded/a8v1jwbdwwc7uq0keni9kf0c5l42vt42gp23f4ej-00001.jpg",
|
||||
"transcode_status": "completed",
|
||||
"type": "video"
|
||||
}
|
||||
]
|
||||
},
|
||||
"form": {
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"title": "Example form for documentation",
|
||||
"requires_contact_info": true,
|
||||
"requires_contact_email": true,
|
||||
"requires_contact_name": true,
|
||||
"requires_contact_phone_number": false,
|
||||
"hide_branding": false,
|
||||
"metadata": {
|
||||
"primary_color": "#522CBB",
|
||||
"secondary_color": "#4CD982",
|
||||
"locale": "en-US",
|
||||
"show_form_title": true
|
||||
},
|
||||
"share_id": "f72l3mugt",
|
||||
"share_url": "https://www.videoask.com/f72l3mugt",
|
||||
"created_at": "2020-03-30T15:53:59.331687Z",
|
||||
"updated_at": "2020-03-30T15:57:11.330236Z",
|
||||
"respondents_count": 2,
|
||||
"author_id": "8a484e48-2e8e-423d-8d91-b1d6c98b60f2",
|
||||
"questions": [
|
||||
{
|
||||
"question_id": "4d73e927-e0ef-4b73-a5da-cdda038545e1",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"metadata": {
|
||||
"text": "What's your favorite fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"type": "poll",
|
||||
"share_id": "ql0eet9ga",
|
||||
"share_url": "https://www.videoask.com/ql0eet9ga",
|
||||
"created_at": "2020-03-30T15:53:59.697150Z",
|
||||
"updated_at": "2020-03-30T15:57:11.319072Z",
|
||||
"thumbnail": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy-preview.gif?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media3.giphy.com/media/xUPGcuomRFMUcsB9nO/giphy.mp4?cid=c83daf2546ecd961cfc590162cdb4787bf1c482527149606&rid=giphy.mp4",
|
||||
"poll_options": [
|
||||
{
|
||||
"id": "27b7cd85-db1e-4316-8dbe-772523feb098",
|
||||
"content": "Bananas"
|
||||
},
|
||||
{
|
||||
"id": "38ee39f0-aca3-4f3a-a74b-ec65beb139b3",
|
||||
"content": "Strawberries"
|
||||
},
|
||||
{
|
||||
"id": "b15efc9c-ae2e-4254-b653-50c8ef2b7364",
|
||||
"content": "Apples"
|
||||
},
|
||||
{
|
||||
"id": "3c4a9c2e-fab0-47bf-b545-ff2d77ce3b21",
|
||||
"content": "Grapes"
|
||||
},
|
||||
{
|
||||
"id": "6daada9f-cc7b-4ffe-9529-f16f35517770",
|
||||
"content": "Other"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question_id": "a74ac70a-b207-492d-a3c8-43c8508f5c7a",
|
||||
"form_id": "5a1b8066-f92c-47bf-b8f2-3beb0a738122",
|
||||
"metadata": {
|
||||
"text": "Why do you love that fruit?",
|
||||
"darken_text_background": true,
|
||||
"fit_video": false
|
||||
},
|
||||
"type": "standard",
|
||||
"allowed_answer_media_types": [
|
||||
"video",
|
||||
"audio",
|
||||
"text"
|
||||
],
|
||||
"share_id": "qrv6rnyg3",
|
||||
"share_url": "https://www.videoask.com/qrv6rnyg3",
|
||||
"created_at": "2020-03-30T15:57:10.931514Z",
|
||||
"updated_at": "2020-03-30T15:57:11.324552Z",
|
||||
"thumbnail": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy-preview.gif?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy-preview.gif",
|
||||
"transcode_status": "completed",
|
||||
"media_type": "video",
|
||||
"media_url": "https://media2.giphy.com/media/9nIIo3LBIlzvW/giphy.mp4?cid=c83daf25eacd7951d2151b3805a0177237e0b1c9c45d0b31&rid=giphy.mp4"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.PUT,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`,
|
||||
{
|
||||
url: context.webhookUrl,
|
||||
event_types: ['form_response']
|
||||
}
|
||||
);
|
||||
},
|
||||
async onDisable(context) {
|
||||
await makeRequest(
|
||||
context.propsValue.organizationId as string,
|
||||
(context.auth as any).access_token as string,
|
||||
HttpMethod.DELETE,
|
||||
`/forms/${context.propsValue.formId}/webhooks/${context.propsValue.tag}`
|
||||
);
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body]
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user