Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-forms
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-forms` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-forms",
|
||||
"version": "0.4.10"
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-forms",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/forms/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/forms",
|
||||
"tsConfig": "packages/pieces/community/forms/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/forms/package.json",
|
||||
"main": "packages/pieces/community/forms/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/forms/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/forms/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-forms {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/forms",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Human Input": "Human Input",
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Trigger einen Fluss durch den menschlichen Input.",
|
||||
"Respond on UI": "Auf UI antworten",
|
||||
"Return a file or text (markdown) as a response.": "Gib eine Datei oder einen Text (Markdown) als Antwort zurück.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Anhang",
|
||||
"Web Form": "Web-Formular",
|
||||
"Chat UI": "Chat-UI",
|
||||
"Trigger the flow by submitting a form.": "Löst den Fluss durch Absenden eines Formulars aus.",
|
||||
"Trigger the flow by sending a message": "Strömung durch Senden einer Nachricht auslösen",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Warte auf Antwort",
|
||||
"Inputs": "Eingaben",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**veröffentlichte Formular-URL:**\n```text\n{{formUrl}}\n```\nVerwenden Sie diese für die Produktion, sieht die veröffentlichte Version des Formulars an.\n<br>\n<br>\n**Entwurfsformular-URL:**\n``Text\n{{formUrl}}? seDraft=true\n```\nBenutze dies, um Beispieldaten zu generieren, schaue die Entwurfsversion des Formulars an (die du gerade bearbeitst).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nWenn **Warten auf Antwort** aktiviert ist, verwenden Sie **Antwort auf UI** in Ihrem Fluss, um eine Antwort auf das Formular zu geben.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**veröffentlichte Chat-URL:**\n```text\n{{chatUrl}}\n```\nVerwenden Sie dies für die Produktion zeigt die veröffentlichte Version des Chatflusses an.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nDieser Trigger konfiguriert ein Chat-Interface. Stelle sicher, dass **Reagieren auf UI** in deinem Fluss verwendet wird",
|
||||
"The name of the chatbot": "Der Name des Chatbots"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Activa un flujo a través de la entrada humana.",
|
||||
"Respond on UI": "Respuesta en la IU",
|
||||
"Return a file or text (markdown) as a response.": "Devuelve un archivo o texto (markdown) como respuesta.",
|
||||
"Text (Markdown)": "Texto (Markdown)",
|
||||
"Attachment": "Adjunto",
|
||||
"Web Form": "Formulario Web",
|
||||
"Chat UI": "Interfaz de Chat",
|
||||
"Trigger the flow by submitting a form.": "Activa el flujo enviando un formulario.",
|
||||
"Trigger the flow by sending a message": "Activa el flujo enviando un mensaje",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Espere a la respuesta",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Nombre del bot",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "El nombre del chatbot"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Déclencher un flux à travers les entrées humaines.",
|
||||
"Respond on UI": "Répondre à l'interface utilisateur",
|
||||
"Return a file or text (markdown) as a response.": "Renvoie un fichier ou un texte (markdown) comme réponse.",
|
||||
"Text (Markdown)": "Texte (Markdown)",
|
||||
"Attachment": "Pièce jointe",
|
||||
"Web Form": "Formulaire Web",
|
||||
"Chat UI": "Interface de chat",
|
||||
"Trigger the flow by submitting a form.": "Déclencher le flux en soumettant un formulaire.",
|
||||
"Trigger the flow by sending a message": "Déclencher le flux en envoyant un message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Attendre la réponse",
|
||||
"Inputs": "Entrées",
|
||||
"Bot Name": "Nom du bot",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**URL de formulaire publié :**\n```text\n{{formUrl}}\n```\nUtilisez ceci pour la production, consultez la version publiée du formulaire.\n<br>\n<br>\n**URL du formulaire d'ébauche :**\n```text\n{{formUrl}}? seDraft=true\n```\nUtilisez ceci pour générer des données d'échantillon, visualisez la version brouillon du formulaire (celle que vous éditez maintenant).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**URL du chat publié :**\n```text\n{{chatUrl}}\n```\nUtilisez ceci pour la production, affiche la version publiée du flux de discussion.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "Le nom du chatbot"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Human Input": "Human Input",
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Human Input": "Human Input",
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "人間の入力を通して流れをトリガーします。",
|
||||
"Respond on UI": "UIに対応する",
|
||||
"Return a file or text (markdown) as a response.": "ファイルまたはテキスト(マークダウン)をレスポンスとして返します。",
|
||||
"Text (Markdown)": "テキスト (マークダウン)",
|
||||
"Attachment": "添付ファイル",
|
||||
"Web Form": "Webフォーム",
|
||||
"Chat UI": "チャット UI",
|
||||
"Trigger the flow by submitting a form.": "フォームを送信してフローをトリガーします。",
|
||||
"Trigger the flow by sending a message": "メッセージを送信してフローをトリガーする",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "応答待ち",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot名",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\n**レスポンス待ち**が有効になっている場合は、フローで **UIで応答**を使用してフォームに返信を返します。\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nこのトリガーはチャットインターフェースを設定します。フローで**UIで応答**が使用されていることを確認してください",
|
||||
"The name of the chatbot": "チャットボットの名前"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Trigger een stroom door menselijke input.",
|
||||
"Respond on UI": "Reageer op UI",
|
||||
"Return a file or text (markdown) as a response.": "Geeft als reactie een bestand of tekst (markdown) als antwoord.",
|
||||
"Text (Markdown)": "Tekst (Markdown)",
|
||||
"Attachment": "Bijlage",
|
||||
"Web Form": "Web Formulier",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Voer de flow in door een formulier in te dienen.",
|
||||
"Trigger the flow by sending a message": "Activeer de stroom door een bericht te sturen",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wacht op reactie",
|
||||
"Inputs": "Invoer",
|
||||
"Bot Name": "Bot naam",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Gepubliceerde Form URL:**\n```text\n{{formUrl}}\n```\nGebruik dit voor productie, bekijk de gepubliceerde versie van het formulier.\n<br>\n<br>\n**Ontwerp Formulier URL:**\n```text\n{{formUrl}}? seDraft=true\n```\nGebruik dit om voorbeeld data te genereren, bekijk de conceptversie van het formulier (de versie die je nu aan het bewerken bent).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nAls **Wait for Response** is ingeschakeld, gebruik dan **Reageren op UI** in uw flow om een reactie terug te geven naar het formulier.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Gepubliceerde Chat URL:**\n```text\n{{chatUrl}}\n```\nGebruik dit voor productie, bekijk de gepubliceerde versie van de chatflow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nDeze trigger stelt een chat interface in. Zorg ervoor dat **Reageren op UI** wordt gebruikt in uw flow",
|
||||
"The name of the chatbot": "De naam van de chatbot"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Aciona um fluxo através de entrada humana.",
|
||||
"Respond on UI": "Responder na interface",
|
||||
"Return a file or text (markdown) as a response.": "Retornar um arquivo ou texto (markdown) como uma resposta.",
|
||||
"Text (Markdown)": "Texto (Markdown)",
|
||||
"Attachment": "Anexo",
|
||||
"Web Form": "Formulário Web",
|
||||
"Chat UI": "Interface do Chat",
|
||||
"Trigger the flow by submitting a form.": "Acionar o fluxo enviando um formulário.",
|
||||
"Trigger the flow by sending a message": "Acionar o fluxo enviando uma mensagem",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Aguarda Resposta",
|
||||
"Inputs": "Entradas",
|
||||
"Bot Name": "Nome do bot",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nEste gatilho configura uma interface de bate-papo. Certifique-se de que **Responder na interface do usuário** está sendo usado em seu fluxo",
|
||||
"The name of the chatbot": "O nome do ChatBot"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Human Input": "Ввод человека",
|
||||
"Trigger a flow through human input.": "Запустите поток через человеческий ввод.",
|
||||
"Respond on UI": "Ответить на пользовательский интерфейс",
|
||||
"Return a file or text (markdown) as a response.": "Возвращает файл или текст (markdown) в ответ.",
|
||||
"Text (Markdown)": "Текст (Markdown)",
|
||||
"Attachment": "Вложение",
|
||||
"Web Form": "Веб-форма",
|
||||
"Chat UI": "Интерфейс чата",
|
||||
"Trigger the flow by submitting a form.": "Запустите поток, отправив форму.",
|
||||
"Trigger the flow by sending a message": "Срабатывать поток, отправляя сообщение",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Ожидание ответа",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Имя бота",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**URL опубликованной формы:**\n```text\n{{formUrl}}\n```\nИспользуйте это для производства, просмотрите опубликованную версию формы.\n<br>\n<br>\n**URL-адрес проекта:**\n```text\n{{formUrl}}? seDraft=true\n```\nИспользуйте это для генерации выборки данных, просмотра черновика формы (которую вы редактируете сейчас).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nЕсли **Дождите** включен, используйте **Ответь** на пользовательском интерфейсе, чтобы дать ответ на форму.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Опубликованный URL чата:**\n```text\n{{chatUrl}}\n```\nИспользуйте это для производства, просматривает опубликованную версию чата.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nЭтот триггер создает чат интерфейс. Убедитесь, что **Ответь** используется в вашем потоке",
|
||||
"The name of the chatbot": "Название робота чата"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Human Input": "Human Input",
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Trigger a flow through human input.": "Trigger a flow through human input.",
|
||||
"Respond on UI": "Respond on UI",
|
||||
"Return a file or text (markdown) as a response.": "Return a file or text (markdown) as a response.",
|
||||
"Text (Markdown)": "Text (Markdown)",
|
||||
"Attachment": "Attachment",
|
||||
"Web Form": "Web Form",
|
||||
"Chat UI": "Chat UI",
|
||||
"Trigger the flow by submitting a form.": "Trigger the flow by submitting a form.",
|
||||
"Trigger the flow by sending a message": "Trigger the flow by sending a message",
|
||||
"Markdown": "Markdown",
|
||||
"Wait for Response": "Wait for Response",
|
||||
"Inputs": "Inputs",
|
||||
"Bot Name": "Bot Name",
|
||||
"**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n": "**Published Form URL:**\n```text\n{{formUrl}}\n```\nUse this for production, views the published version of the form.\n<br>\n<br>\n**Draft Form URL:**\n```text\n{{formUrl}}?useDraft=true\n```\nUse this to generate sample data, views the draft version of the form (the one you are editing now).\n",
|
||||
"\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n": "\nIf **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.\n",
|
||||
"\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n": "\n**Published Chat URL:**\n```text\n{{chatUrl}}\n```\nUse this for production, views the published version of the chat flow.\n<br>\n<br>\n",
|
||||
"\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow": "\nThis trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow",
|
||||
"The name of the chatbot": "The name of the chatbot"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { onChatSubmission } from './lib/triggers/chat-trigger';
|
||||
import { onFormSubmission } from './lib/triggers/form-trigger';
|
||||
import { returnResponse } from './lib/actions/return-response';
|
||||
|
||||
export const forms = createPiece({
|
||||
displayName: 'Human Input',
|
||||
description: 'Trigger a flow through human input.',
|
||||
auth: PieceAuth.None(),
|
||||
minimumSupportedRelease: '0.65.0',
|
||||
categories: [PieceCategory.CORE],
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/human-input.svg',
|
||||
authors: ['anasbarg', 'MoShizzle', 'abuaboud'],
|
||||
actions: [returnResponse],
|
||||
triggers: [onFormSubmission, onChatSubmission],
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import { FileResponseInterface, HumanInputFormResult, HumanInputFormResultTypes } from '@activepieces/shared';
|
||||
import { StatusCodes } from 'http-status-codes';
|
||||
import mime from 'mime-types';
|
||||
|
||||
export const returnResponse = createAction({
|
||||
name: 'return_response',
|
||||
displayName: 'Respond on UI',
|
||||
description: 'Return a file or text (markdown) as a response.',
|
||||
props: {
|
||||
markdown: Property.LongText({
|
||||
displayName: 'Text (Markdown)',
|
||||
required: false,
|
||||
}),
|
||||
file: Property.File({
|
||||
displayName: 'Attachment',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
errorHandlingOptions: {
|
||||
retryOnFailure: {
|
||||
hide: true,
|
||||
},
|
||||
continueOnFailure: {
|
||||
hide: true,
|
||||
},
|
||||
},
|
||||
async run({ propsValue, run, files }) {
|
||||
const responseFiles: FileResponseInterface[] = []
|
||||
if (propsValue.file) {
|
||||
const fileName = propsValue.file.filename;
|
||||
const fileBase64 = propsValue.file.base64;
|
||||
const mimeType = mime.lookup(fileName);
|
||||
responseFiles.push({
|
||||
url: await files.write({
|
||||
fileName,
|
||||
data: Buffer.from(fileBase64, 'base64'),
|
||||
}),
|
||||
mimeType: mimeType || '',
|
||||
});
|
||||
}
|
||||
const markdownResponseBody: HumanInputFormResult = {
|
||||
type: HumanInputFormResultTypes.MARKDOWN,
|
||||
value: propsValue.markdown ?? '',
|
||||
files: responseFiles,
|
||||
}
|
||||
run.respond({
|
||||
response: {
|
||||
status: StatusCodes.OK,
|
||||
body: markdownResponseBody,
|
||||
headers: {},
|
||||
},
|
||||
|
||||
});
|
||||
return markdownResponseBody;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
import {
|
||||
Property,
|
||||
TriggerStrategy,
|
||||
createTrigger,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import {
|
||||
MarkdownVariant,
|
||||
USE_DRAFT_QUERY_PARAM_NAME,
|
||||
ChatFormResponse,
|
||||
} from '@activepieces/shared';
|
||||
|
||||
const responseMarkdown = `
|
||||
This trigger sets up a chat interface. Ensure that **Respond on UI** is used in your flow`;
|
||||
|
||||
const markdown = `
|
||||
**Published Chat URL:**
|
||||
\`\`\`text
|
||||
{{chatUrl}}
|
||||
\`\`\`
|
||||
Use this for production, views the published version of the chat flow.
|
||||
<br>
|
||||
<br>
|
||||
`;
|
||||
|
||||
export const onChatSubmission = createTrigger({
|
||||
name: 'chat_submission',
|
||||
displayName: 'Chat UI',
|
||||
description: 'Trigger the flow by sending a message',
|
||||
props: {
|
||||
about: Property.MarkDown({
|
||||
value: markdown,
|
||||
variant: MarkdownVariant.BORDERLESS,
|
||||
}),
|
||||
responseMarkdown: Property.MarkDown({
|
||||
value: responseMarkdown,
|
||||
variant: MarkdownVariant.WARNING,
|
||||
}),
|
||||
botName: Property.ShortText({
|
||||
displayName: 'Bot Name',
|
||||
description: 'The name of the chatbot',
|
||||
required: true,
|
||||
defaultValue: 'AI Bot',
|
||||
}),
|
||||
},
|
||||
sampleData: undefined,
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable() {
|
||||
return;
|
||||
},
|
||||
async onDisable() {
|
||||
return;
|
||||
},
|
||||
async run(ctx) {
|
||||
const item = ctx.payload.body as { chatId?: string; message?: string };
|
||||
if (!item.chatId) {
|
||||
throw new Error('Chat ID is required');
|
||||
}
|
||||
if (!item.message) {
|
||||
throw new Error('Message is required');
|
||||
}
|
||||
const files = Object.entries(item)
|
||||
.filter(([key]) => key.startsWith('file'))
|
||||
.map(([key, value]) => {
|
||||
const index = Number(key.split('[')[1].split(']')[0]);
|
||||
return [index, value] as const;
|
||||
})
|
||||
.sort(([indexA], [indexB]) => indexA - indexB)
|
||||
.map(([_, value]) => value);
|
||||
|
||||
const response: ChatFormResponse = {
|
||||
sessionId: item.chatId,
|
||||
message: item.message,
|
||||
files,
|
||||
}
|
||||
return [response];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,130 @@
|
||||
import {
|
||||
Property,
|
||||
TriggerStrategy,
|
||||
createTrigger,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import {
|
||||
createKeyForFormInput,
|
||||
MarkdownVariant,
|
||||
USE_DRAFT_QUERY_PARAM_NAME,
|
||||
} from '@activepieces/shared';
|
||||
|
||||
|
||||
const markdown = `**Published Form URL:**
|
||||
\`\`\`text
|
||||
{{formUrl}}
|
||||
\`\`\`
|
||||
Use this for production, views the published version of the form.
|
||||
<br>
|
||||
<br>
|
||||
**Draft Form URL:**
|
||||
\`\`\`text
|
||||
{{formUrl}}?${USE_DRAFT_QUERY_PARAM_NAME}=true
|
||||
\`\`\`
|
||||
Use this to generate sample data, views the draft version of the form (the one you are editing now).
|
||||
`;
|
||||
const responseMarkdown = `
|
||||
If **Wait for Response** is enabled, use **Respond on UI** in your flow to provide a response back to the form.
|
||||
`;
|
||||
|
||||
type FormInput = {
|
||||
displayName: string;
|
||||
type: 'text' | 'text_area' | 'file' | 'toggle';
|
||||
description?: string;
|
||||
required: boolean;
|
||||
};
|
||||
|
||||
const parseBoolean = (value: unknown, fieldName: string): boolean => {
|
||||
if (typeof value === 'boolean') {
|
||||
return value;
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
const lowerValue = value.toLowerCase();
|
||||
if (lowerValue === 'true' || lowerValue === 'false') {
|
||||
return lowerValue === 'true';
|
||||
}
|
||||
}
|
||||
throw new Error(`Field ${fieldName} must be a boolean or 'true'/'false' string`);
|
||||
};
|
||||
|
||||
export const onFormSubmission = createTrigger({
|
||||
name: 'form_submission',
|
||||
displayName: 'Web Form',
|
||||
description: 'Trigger the flow by submitting a form.',
|
||||
props: {
|
||||
about: Property.MarkDown({
|
||||
value: markdown,
|
||||
variant: MarkdownVariant.BORDERLESS,
|
||||
}),
|
||||
response: Property.MarkDown({
|
||||
value: responseMarkdown,
|
||||
variant: MarkdownVariant.WARNING,
|
||||
}),
|
||||
waitForResponse: Property.Checkbox({
|
||||
displayName: 'Wait for Response',
|
||||
defaultValue: false,
|
||||
required: true,
|
||||
}),
|
||||
inputs: Property.Array({
|
||||
displayName: 'Inputs',
|
||||
required: true,
|
||||
properties: {
|
||||
displayName: Property.ShortText({
|
||||
displayName: 'Field Name',
|
||||
required: true,
|
||||
}),
|
||||
type: Property.StaticDropdown({
|
||||
displayName: 'Field Type',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ value: 'text', label: 'Text' },
|
||||
{ value: 'text_area', label: 'Text Area' },
|
||||
{ value: 'file', label: 'File' },
|
||||
{ value: 'toggle', label: 'Toggle' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
description: Property.ShortText({
|
||||
displayName: 'Field Description',
|
||||
required: false,
|
||||
}),
|
||||
required: Property.Checkbox({
|
||||
displayName: 'Required',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
}),
|
||||
},
|
||||
sampleData: {},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable() {
|
||||
return;
|
||||
},
|
||||
async onDisable() {
|
||||
return;
|
||||
},
|
||||
async run(context) {
|
||||
const payload = context.payload.body as Record<string, unknown>;
|
||||
const inputs = context.propsValue.inputs as FormInput[];
|
||||
|
||||
const processedPayload: Record<string, unknown> = {};
|
||||
for (const input of inputs) {
|
||||
const key = createKeyForFormInput(input.displayName);
|
||||
const value = payload[key];
|
||||
|
||||
switch (input.type) {
|
||||
case 'toggle':
|
||||
processedPayload[key] = parseBoolean(value, input.displayName);
|
||||
break;
|
||||
case 'text':
|
||||
case 'text_area':
|
||||
case 'file':
|
||||
processedPayload[key] = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [processedPayload];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user