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,7 @@
|
||||
{
|
||||
"API key": "API-Schlüssel",
|
||||
"Remove background": "Hintergrund entfernen",
|
||||
"Remove the background of the image given as input": "Den Hintergrund des Bildes als Eingabe entfernen",
|
||||
"Image file": "Bilddatei",
|
||||
"Generated filename": "Generierter Dateiname"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "Clave API",
|
||||
"Remove background": "Eliminar fondo",
|
||||
"Remove the background of the image given as input": "Remueve el fondo de la imagen dada como entrada",
|
||||
"Image file": "Archivo de imagen",
|
||||
"Generated filename": "Nombre de archivo generado"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "Clé API",
|
||||
"Remove background": "Supprimer l'arrière-plan",
|
||||
"Remove the background of the image given as input": "Supprime l'arrière-plan de l'image donnée en entrée",
|
||||
"Image file": "Fichier image",
|
||||
"Generated filename": "Nom de fichier généré"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "API キー",
|
||||
"Remove background": "背景を削除",
|
||||
"Remove the background of the image given as input": "入力として与えられた画像の背景を削除",
|
||||
"Image file": "画像ファイル",
|
||||
"Generated filename": "生成されたファイル名"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "API sleutel",
|
||||
"Remove background": "Achtergrond verwijderen",
|
||||
"Remove the background of the image given as input": "Verwijder de achtergrond van de gegeven afbeelding als invoer",
|
||||
"Image file": "Afbeelding bestand",
|
||||
"Generated filename": "Gegenereerde bestandsnaam"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "Chave da API",
|
||||
"Remove background": "Remover fundo",
|
||||
"Remove the background of the image given as input": "Remove o fundo da imagem dada como entrada",
|
||||
"Image file": "Arquivo de imagem",
|
||||
"Generated filename": "Nome de arquivo gerado"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Photoroom": "Фотография",
|
||||
"API key": "API ключ",
|
||||
"Remove background": "Удалить фон",
|
||||
"Remove the background of the image given as input": "Удалить фон изображения, заданный как ввод",
|
||||
"Image file": "Файл изображения",
|
||||
"Generated filename": "Сгенерированное имя файла"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "API key",
|
||||
"Remove background": "Remove background",
|
||||
"Remove the background of the image given as input": "Remove the background of the image given as input",
|
||||
"Image file": "Image file",
|
||||
"Generated filename": "Generated filename"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Photoroom": "Photoroom",
|
||||
"API key": "API key",
|
||||
"Remove background": "Remove background",
|
||||
"Remove the background of the image given as input": "Remove the background of the image given as input",
|
||||
"Image file": "Image file",
|
||||
"Generated filename": "Generated filename"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"API key": "API key",
|
||||
"Remove background": "Remove background",
|
||||
"Remove the background of the image given as input": "Remove the background of the image given as input",
|
||||
"Image file": "Image file",
|
||||
"Generated filename": "Generated filename"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { removeBackground } from './lib/actions/remove-background';
|
||||
|
||||
export const photoroomAuth = PieceAuth.CustomAuth({
|
||||
required: true,
|
||||
props: {
|
||||
apiKey: PieceAuth.SecretText({
|
||||
displayName: 'API key',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export const photoroom = createPiece({
|
||||
displayName: 'Photoroom',
|
||||
auth: photoroomAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/photoroom.png',
|
||||
authors: ['AdamSelene', 'Charles-Go'],
|
||||
actions: [removeBackground],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { photoroomAuth } from '../..';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const removeBackground = createAction({
|
||||
name: 'removeBackground',
|
||||
displayName: 'Remove background',
|
||||
description: 'Remove the background of the image given as input',
|
||||
auth: photoroomAuth,
|
||||
props: {
|
||||
file: Property.File({ displayName: 'Image file', required: true }),
|
||||
filename: Property.ShortText({
|
||||
displayName: 'Generated filename',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ auth, propsValue, files }) {
|
||||
const form = new FormData();
|
||||
form.append('image_file', new Blob([propsValue.file.data as any]));
|
||||
const response = await httpClient.sendRequest({
|
||||
url: `https://sdk.photoroom.com/v1/segment`,
|
||||
method: HttpMethod.POST,
|
||||
headers: {
|
||||
'x-api-key': auth.props.apiKey,
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
body: form,
|
||||
});
|
||||
const imageUrl = await files.write({
|
||||
fileName: propsValue.filename,
|
||||
data: Buffer.from(response.body.result_b64, 'base64'),
|
||||
});
|
||||
return {
|
||||
fileName: propsValue.filename,
|
||||
url: imageUrl,
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user