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,15 @@
|
||||
{
|
||||
"Base URL": "Basis-URL",
|
||||
"API key": "API-Schlüssel",
|
||||
"Enter the base URL": "Basis-URL eingeben",
|
||||
"Enter the API key from your Aminos One panel": "Geben Sie den API-Schlüssel aus Ihrem Aminos One Panel ein",
|
||||
"Enter Aminos One authentication details": "Aminos One Authentifizierungsdetails eingeben",
|
||||
"Create User on Aminos One": "Benutzer auf Aminos 1 erstellen",
|
||||
"Create a user and plan in Aminos One Panel": "Benutzer erstellen und in Aminos One Panel planen",
|
||||
"Username (e-mail)": "Benutzername (E-Mail)",
|
||||
"Name of user": "Benutzername",
|
||||
"Plan ID": "Plan ID",
|
||||
"Username, should be an e-mail address": "Benutzername sollte eine E-Mail-Adresse sein",
|
||||
"The name of the user": "Der Name des Benutzers",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Plan ID Nummer aus den Abos in Ihrem Aminos One Panel"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "URL base",
|
||||
"API key": "Clave API",
|
||||
"Enter the base URL": "Introduzca la URL base",
|
||||
"Enter the API key from your Aminos One panel": "Introduzca la clave API de su panel Aminos One",
|
||||
"Enter Aminos One authentication details": "Introduzca los detalles de autenticación de Aminos One",
|
||||
"Create User on Aminos One": "Crear usuario en Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Crear un usuario y planear en el Panel de Aminos One",
|
||||
"Username (e-mail)": "Nombre de usuario (correo electrónico)",
|
||||
"Name of user": "Nombre del usuario",
|
||||
"Plan ID": "ID del plan",
|
||||
"Username, should be an e-mail address": "Nombre de usuario, debe ser una dirección de correo electrónico",
|
||||
"The name of the user": "El nombre del usuario",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Planificar número de ID de los planes en su panel de Aminos One"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "URL de base",
|
||||
"API key": "Clé API",
|
||||
"Enter the base URL": "Entrez l'URL de base",
|
||||
"Enter the API key from your Aminos One panel": "Entrez la clé API de votre panneau Aminos One",
|
||||
"Enter Aminos One authentication details": "Entrez les détails d'authentification d'Aminos One",
|
||||
"Create User on Aminos One": "Créer un utilisateur sur Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Créer un utilisateur et planifier dans Aminos One Panel",
|
||||
"Username (e-mail)": "Nom d'utilisateur (e-mail)",
|
||||
"Name of user": "Nom de l'utilisateur",
|
||||
"Plan ID": "ID du plan",
|
||||
"Username, should be an e-mail address": "Le nom d'utilisateur, doit être une adresse e-mail",
|
||||
"The name of the user": "Le nom de l'utilisateur",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Numéro d’identification du plan à partir des forfaits dans votre panneau Aminos One"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "ベースURL",
|
||||
"API key": "API キー",
|
||||
"Enter the base URL": "ベース URL を入力してください",
|
||||
"Enter the API key from your Aminos One panel": "Aminos One パネルから API キーを入力してください",
|
||||
"Enter Aminos One authentication details": "Aminos 1つの認証詳細を入力してください",
|
||||
"Create User on Aminos One": "Aminos One でユーザーを作成",
|
||||
"Create a user and plan in Aminos One Panel": "Aminos One Panel でユーザーと計画を作成する",
|
||||
"Username (e-mail)": "ユーザー名(メールアドレス)",
|
||||
"Name of user": "ユーザー名",
|
||||
"Plan ID": "プランID",
|
||||
"Username, should be an e-mail address": "ユーザー名はメールアドレスでなければなりません",
|
||||
"The name of the user": "利用者の名前",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Aminos OneパネルのプランからのプランID番号"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "Basis URL",
|
||||
"API key": "API sleutel",
|
||||
"Enter the base URL": "Voer de basis-URL in",
|
||||
"Enter the API key from your Aminos One panel": "Voer de API-sleutel in vanuit uw Aminos One paneel",
|
||||
"Enter Aminos One authentication details": "Voer Aminos One authenticatiegegevens in",
|
||||
"Create User on Aminos One": "Gebruiker aanmaken op Aminos Één",
|
||||
"Create a user and plan in Aminos One Panel": "Maak een gebruiker aan en plan in Aminos One Panel",
|
||||
"Username (e-mail)": "Gebruikersnaam (e-mail)",
|
||||
"Name of user": "Naam van de gebruiker",
|
||||
"Plan ID": "Abonnement ID",
|
||||
"Username, should be an e-mail address": "Gebruikersnaam moet een e-mailadres zijn",
|
||||
"The name of the user": "De naam van de gebruiker",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Plan ID-nummer uit de plannen in uw Aminos Eén paneel"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "URL Base",
|
||||
"API key": "Chave da API",
|
||||
"Enter the base URL": "Digite a URL base",
|
||||
"Enter the API key from your Aminos One panel": "Digite a chave da API do seu painel Aminos One",
|
||||
"Enter Aminos One authentication details": "Digite os detalhes de autenticação Aminos One",
|
||||
"Create User on Aminos One": "Criar Usuário no Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Criar um usuário e um plano no Aminos One Panel",
|
||||
"Username (e-mail)": "Usuário (e-mail)",
|
||||
"Name of user": "Nome do usuário",
|
||||
"Plan ID": "ID Plano",
|
||||
"Username, should be an e-mail address": "Nome de usuário, deve ser um endereço de e-mail",
|
||||
"The name of the user": "O nome do usuário",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Planeje o número de identificação dos planos no seu painel One Aminos"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Aminos": "Aminos",
|
||||
"Base URL": "Базовый URL",
|
||||
"API key": "API ключ",
|
||||
"Enter the base URL": "Введите базовый URL",
|
||||
"Enter the API key from your Aminos One panel": "Введите ключ API из панели Aminos One",
|
||||
"Enter Aminos One authentication details": "Введите данные аутентификации Aminos One",
|
||||
"Create User on Aminos One": "Создать пользователя на Aminos 1",
|
||||
"Create a user and plan in Aminos One Panel": "Создать пользователя и план в панели Aminos 1",
|
||||
"Username (e-mail)": "Имя пользователя (e-mail)",
|
||||
"Name of user": "Имя пользователя",
|
||||
"Plan ID": "План ID",
|
||||
"Username, should be an e-mail address": "Имя пользователя должно быть e-mail адресом",
|
||||
"The name of the user": "Имя пользователя",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Спланируйте идентификационный номер из планов вашей панели Aminos One"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "Base URL",
|
||||
"API key": "API key",
|
||||
"Enter the base URL": "Enter the base URL",
|
||||
"Enter the API key from your Aminos One panel": "Enter the API key from your Aminos One panel",
|
||||
"Enter Aminos One authentication details": "Enter Aminos One authentication details",
|
||||
"Create User on Aminos One": "Create User on Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Create a user and plan in Aminos One Panel",
|
||||
"Username (e-mail)": "Username (e-mail)",
|
||||
"Name of user": "Name of user",
|
||||
"Plan ID": "Plan ID",
|
||||
"Username, should be an e-mail address": "Username, should be an e-mail address",
|
||||
"The name of the user": "The name of the user",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Plan ID number from the plans in your Aminos One panel"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Aminos": "Aminos",
|
||||
"Base URL": "Base URL",
|
||||
"API key": "API key",
|
||||
"Enter the base URL": "Enter the base URL",
|
||||
"Enter the API key from your Aminos One panel": "Enter the API key from your Aminos One panel",
|
||||
"Enter Aminos One authentication details": "Enter Aminos One authentication details",
|
||||
"Create User on Aminos One": "Create User on Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Create a user and plan in Aminos One Panel",
|
||||
"Username (e-mail)": "Username (e-mail)",
|
||||
"Name of user": "Name of user",
|
||||
"Plan ID": "Plan ID",
|
||||
"Username, should be an e-mail address": "Username, should be an e-mail address",
|
||||
"The name of the user": "The name of the user",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Plan ID number from the plans in your Aminos One panel"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"Base URL": "基本网址",
|
||||
"API key": "API key",
|
||||
"Enter the base URL": "Enter the base URL",
|
||||
"Enter the API key from your Aminos One panel": "Enter the API key from your Aminos One panel",
|
||||
"Enter Aminos One authentication details": "Enter Aminos One authentication details",
|
||||
"Create User on Aminos One": "Create User on Aminos One",
|
||||
"Create a user and plan in Aminos One Panel": "Create a user and plan in Aminos One Panel",
|
||||
"Username (e-mail)": "Username (e-mail)",
|
||||
"Name of user": "Name of user",
|
||||
"Plan ID": "Plan ID",
|
||||
"Username, should be an e-mail address": "Username, should be an e-mail address",
|
||||
"The name of the user": "The name of the user",
|
||||
"Plan ID number from the plans in your Aminos One panel": "Plan ID number from the plans in your Aminos One panel"
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import {
|
||||
PieceAuth,
|
||||
Property,
|
||||
createPiece,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { createUser } from './lib/actions/createUser';
|
||||
|
||||
export const aminosAuth = PieceAuth.CustomAuth({
|
||||
description: 'Enter Aminos One authentication details',
|
||||
props: {
|
||||
base_url: Property.ShortText({
|
||||
displayName: 'Base URL',
|
||||
description: 'Enter the base URL',
|
||||
required: true,
|
||||
}),
|
||||
access_token: PieceAuth.SecretText({
|
||||
displayName: 'API key',
|
||||
description: 'Enter the API key from your Aminos One panel',
|
||||
required: true
|
||||
})
|
||||
},
|
||||
// Optional Validation
|
||||
validate: async ({auth}) => {
|
||||
if(auth){
|
||||
return {
|
||||
valid: true,
|
||||
}
|
||||
}
|
||||
return {
|
||||
valid: false,
|
||||
error: 'Invalid Api Key'
|
||||
}
|
||||
},
|
||||
required: true
|
||||
});
|
||||
|
||||
export const aminos = createPiece({
|
||||
displayName: "Aminos",
|
||||
auth: aminosAuth,
|
||||
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: "https://cdn.activepieces.com/pieces/aminos.png",
|
||||
authors: ["buttonsbond"],
|
||||
actions: [createUser],
|
||||
triggers: [],
|
||||
});
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
//import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { aminosAuth } from '../..';
|
||||
export const createUser = createAction({
|
||||
// auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,
|
||||
auth: aminosAuth,
|
||||
name: 'createUser',
|
||||
displayName: 'Create User on Aminos One',
|
||||
description: 'Create a user and plan in Aminos One Panel',
|
||||
props: {
|
||||
useremail: Property.ShortText({
|
||||
displayName: 'Username (e-mail)',
|
||||
description: 'Username, should be an e-mail address',
|
||||
required:true,
|
||||
}),
|
||||
userfriendlyname: Property.ShortText({
|
||||
displayName: 'Name of user',
|
||||
description: 'The name of the user',
|
||||
required:true,
|
||||
}),
|
||||
userplanid: Property.Number({
|
||||
displayName: 'Plan ID',
|
||||
description: 'Plan ID number from the plans in your Aminos One panel',
|
||||
required:true,
|
||||
})
|
||||
},
|
||||
async run(context) {
|
||||
// the below need to be passed with the JSON
|
||||
// context.auth.access_token
|
||||
// context.auth.base_url
|
||||
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
const createAminosRequestBody = {
|
||||
api_key: context.auth.props.access_token,
|
||||
name: context.propsValue.userfriendlyname,
|
||||
email: context.propsValue.useremail,
|
||||
price_plan_id: context.propsValue.userplanid,
|
||||
};
|
||||
// console.log("AMINOS:" + JSON.stringify(createAminosRequestBody));
|
||||
const createAminosResponse = await fetch(`${baseUrl}/api/users`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify(createAminosRequestBody),
|
||||
});
|
||||
// 400 status is returned on failure, possibly because user exists already
|
||||
if (!createAminosResponse.ok) {
|
||||
throw new Error(`Failed to create user. Status: ${createAminosResponse.status}`);
|
||||
}
|
||||
const createAminosResponseBody = await createAminosResponse.json();
|
||||
// if creation was ok, then user and status are returned, user is the user id on aminos, status will just be success
|
||||
return createAminosResponseBody;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user