Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-mailjet
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-mailjet` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-mailjet",
|
||||
"version": "0.0.8"
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-mailjet",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/mailjet/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/mailjet",
|
||||
"tsConfig": "packages/pieces/community/mailjet/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/mailjet/package.json",
|
||||
"main": "packages/pieces/community/mailjet/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/mailjet/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/mailjet/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-mailjet {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/mailjet",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "E-Mail-Zustellservice zum Versenden von Transaktions- und Marketing-E-Mails",
|
||||
"API Key": "API-Schlüssel",
|
||||
"Enter your API Key here": "API-Schlüssel hier eingeben",
|
||||
"API Secret": "API-Geheimnis",
|
||||
"Enter your API Secret here": "API-Geheimnis hier eingeben",
|
||||
"Enter your api credentials": "Geben Sie Ihre Api Anmeldedaten ein",
|
||||
"Send Email": "E-Mail senden",
|
||||
"Send a text, HTML or template email through Mailjet": "Text, HTML oder Template E-Mail über Mailjet senden",
|
||||
"From (Email)": "Von (Email)",
|
||||
"From (Name)": "Von (Name)",
|
||||
"Emails of recipients": "E-Mails von Empfängern",
|
||||
"Subject": "Betreff",
|
||||
"Text part": "Textteil",
|
||||
"HTML part": "HTML-Teil",
|
||||
"Template Id": "Template Id",
|
||||
"Template variables": "Template-Variablen",
|
||||
"Sender email, must be verified in Mailjet": "Absender-E-Mail, muss in Mailjet verifiziert werden",
|
||||
"Template Id (number) defined in Mailjet": "Template-Id (Nummer) definiert in Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "Servicio de entrega de correo electrónico para enviar correos electrónicos transaccionales y de marketing",
|
||||
"API Key": "Clave API",
|
||||
"Enter your API Key here": "Introduzca su clave API aquí",
|
||||
"API Secret": "API secreta",
|
||||
"Enter your API Secret here": "Introduce aquí tu API Secret",
|
||||
"Enter your api credentials": "Introduce tus credenciales de api",
|
||||
"Send Email": "Enviar Email",
|
||||
"Send a text, HTML or template email through Mailjet": "Enviar un texto, HTML o plantilla de correo electrónico a través de Mailjet",
|
||||
"From (Email)": "Desde (Email)",
|
||||
"From (Name)": "De (Nombre)",
|
||||
"Emails of recipients": "Correos de destinatarios",
|
||||
"Subject": "Asunto",
|
||||
"Text part": "Parte del texto",
|
||||
"HTML part": "Parte HTML",
|
||||
"Template Id": "Id de Plantilla",
|
||||
"Template variables": "Variables de plantilla",
|
||||
"Sender email, must be verified in Mailjet": "Correo electrónico del remitente, debe ser verificado en Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Plantilla Id (número) definido en Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "Service de livraison de courrier électronique pour l'envoi d'e-mails transactionnels et de marketing",
|
||||
"API Key": "Clé API",
|
||||
"Enter your API Key here": "Entrez votre clé API ici",
|
||||
"API Secret": "Secret de l'API",
|
||||
"Enter your API Secret here": "Entrez votre secret API ici",
|
||||
"Enter your api credentials": "Entrez vos identifiants api",
|
||||
"Send Email": "Envoyer un e-mail",
|
||||
"Send a text, HTML or template email through Mailjet": "Envoyer un courriel, HTML ou modèle via Mailjet",
|
||||
"From (Email)": "De (Email)",
|
||||
"From (Name)": "De (Nom)",
|
||||
"Emails of recipients": "E-mails des destinataires",
|
||||
"Subject": "Sujet",
|
||||
"Text part": "Pièce de texte",
|
||||
"HTML part": "Pièce HTML",
|
||||
"Template Id": "Identifiant du modèle",
|
||||
"Template variables": "Variables de modèle",
|
||||
"Sender email, must be verified in Mailjet": "L'e-mail de l'expéditeur doit être vérifié dans Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Id du modèle (nombre) défini dans Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "トランザクションとマーケティングの電子メールを送信するためのメール配信サービス",
|
||||
"API Key": "API キー",
|
||||
"Enter your API Key here": "ここにAPIキーを入力してください",
|
||||
"API Secret": "APIシークレット",
|
||||
"Enter your API Secret here": "ここにAPIシークレットを入力してください",
|
||||
"Enter your api credentials": "あなたのapi資格情報を入力してください",
|
||||
"Send Email": "メール送信",
|
||||
"Send a text, HTML or template email through Mailjet": "Mailjetを通じてテキスト、HTMLまたはテンプレートのメールを送信する",
|
||||
"From (Email)": "From (Email)",
|
||||
"From (Name)": "差出人(名前)",
|
||||
"Emails of recipients": "受信者のメール",
|
||||
"Subject": "件名",
|
||||
"Text part": "テキストの一部",
|
||||
"HTML part": "HTMLパート",
|
||||
"Template Id": "テンプレートID",
|
||||
"Template variables": "テンプレート変数",
|
||||
"Sender email, must be verified in Mailjet": "送信者のメールはMailjetで確認する必要があります",
|
||||
"Template Id (number) defined in Mailjet": "Mailjetで定義されているテンプレートID(数字)"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "E-mailbezorging service voor het verzenden van transactionele en marketing e-mails",
|
||||
"API Key": "API Sleutel",
|
||||
"Enter your API Key here": "Voer hier uw API-sleutel in",
|
||||
"API Secret": "API Geheim",
|
||||
"Enter your API Secret here": "Voer hier uw API Secret in",
|
||||
"Enter your api credentials": "Voer uw api referenties in",
|
||||
"Send Email": "E-mail verzenden",
|
||||
"Send a text, HTML or template email through Mailjet": "Stuur een tekst, HTML of sjabloon e-mail via Mailjet",
|
||||
"From (Email)": "Van (Email)",
|
||||
"From (Name)": "Van (Naam)",
|
||||
"Emails of recipients": "E-mails van ontvangers",
|
||||
"Subject": "Onderwerp",
|
||||
"Text part": "Tekst onderdeel",
|
||||
"HTML part": "HTML deel",
|
||||
"Template Id": "Sjabloon ID",
|
||||
"Template variables": "Template variabelen",
|
||||
"Sender email, must be verified in Mailjet": "Afzender e-mail, moet worden geverifieerd in Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Sjabloon Id (nummer) gedefinieerd in Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "Serviço de entrega de e-mail para envio de e-mails de transacção e marketing",
|
||||
"API Key": "Chave de API",
|
||||
"Enter your API Key here": "Digite sua chave de API aqui",
|
||||
"API Secret": "API Segredo",
|
||||
"Enter your API Secret here": "Digite seu Segredo da API aqui",
|
||||
"Enter your api credentials": "Insira suas credenciais de API",
|
||||
"Send Email": "Enviar e-mail",
|
||||
"Send a text, HTML or template email through Mailjet": "Enviar um texto, HTML ou modelo de e-mail através do Mailjet",
|
||||
"From (Email)": "De (E-mail)",
|
||||
"From (Name)": "De (Nome)",
|
||||
"Emails of recipients": "E-mails de destinatários",
|
||||
"Subject": "Cargo",
|
||||
"Text part": "Parte de texto",
|
||||
"HTML part": "Parte HTML",
|
||||
"Template Id": "ID do modelo",
|
||||
"Template variables": "Variáveis do template",
|
||||
"Sender email, must be verified in Mailjet": "E-mail do remetente, deve ser verificado no Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Id do modelo (número) definido no campo Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Mailjet": "Mailjet",
|
||||
"Email delivery service for sending transactional and marketing emails": "Служба доставки электронной почты для отправки транзакций и маркетинговых писем",
|
||||
"API Key": "Ключ API",
|
||||
"Enter your API Key here": "Введите ваш API ключ здесь",
|
||||
"API Secret": "Секрет API",
|
||||
"Enter your API Secret here": "Введите ваш API Секрет здесь",
|
||||
"Enter your api credentials": "Введите ваши данные api",
|
||||
"Send Email": "Отправить письмо",
|
||||
"Send a text, HTML or template email through Mailjet": "Отправить текст, HTML или шаблон письма через Mailjet",
|
||||
"From (Email)": "От (Email)",
|
||||
"From (Name)": "От (имя)",
|
||||
"Emails of recipients": "E-mail получателей",
|
||||
"Subject": "Тема",
|
||||
"Text part": "Текстовая часть",
|
||||
"HTML part": "Часть HTML",
|
||||
"Template Id": "Id шаблона",
|
||||
"Template variables": "Переменные шаблона",
|
||||
"Sender email, must be verified in Mailjet": "E-mail отправителя, должен быть проверен в Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Идентификатор шаблона (число) определен в Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "Email delivery service for sending transactional and marketing emails",
|
||||
"API Key": "API Key",
|
||||
"Enter your API Key here": "Enter your API Key here",
|
||||
"API Secret": "API Secret",
|
||||
"Enter your API Secret here": "Enter your API Secret here",
|
||||
"Enter your api credentials": "Enter your api credentials",
|
||||
"Send Email": "Send Email",
|
||||
"Send a text, HTML or template email through Mailjet": "Send a text, HTML or template email through Mailjet",
|
||||
"From (Email)": "From (Email)",
|
||||
"From (Name)": "From (Name)",
|
||||
"Emails of recipients": "Emails of recipients",
|
||||
"Subject": "Subject",
|
||||
"Text part": "Text part",
|
||||
"HTML part": "HTML part",
|
||||
"Template Id": "Template Id",
|
||||
"Template variables": "Template variables",
|
||||
"Sender email, must be verified in Mailjet": "Sender email, must be verified in Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Template Id (number) defined in Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Mailjet": "Mailjet",
|
||||
"Email delivery service for sending transactional and marketing emails": "Email delivery service for sending transactional and marketing emails",
|
||||
"API Key": "API Key",
|
||||
"Enter your API Key here": "Enter your API Key here",
|
||||
"API Secret": "API Secret",
|
||||
"Enter your API Secret here": "Enter your API Secret here",
|
||||
"Enter your api credentials": "Enter your api credentials",
|
||||
"Send Email": "Send Email",
|
||||
"Send a text, HTML or template email through Mailjet": "Send a text, HTML or template email through Mailjet",
|
||||
"From (Email)": "From (Email)",
|
||||
"From (Name)": "From (Name)",
|
||||
"Emails of recipients": "Emails of recipients",
|
||||
"Subject": "Subject",
|
||||
"Text part": "Text part",
|
||||
"HTML part": "HTML part",
|
||||
"Template Id": "Template Id",
|
||||
"Template variables": "Template variables",
|
||||
"Sender email, must be verified in Mailjet": "Sender email, must be verified in Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Template Id (number) defined in Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Email delivery service for sending transactional and marketing emails": "Email delivery service for sending transactional and marketing emails",
|
||||
"API Key": "API 密钥",
|
||||
"Enter your API Key here": "Enter your API Key here",
|
||||
"API Secret": "API Secret",
|
||||
"Enter your API Secret here": "Enter your API Secret here",
|
||||
"Enter your api credentials": "Enter your api credentials",
|
||||
"Send Email": "Send Email",
|
||||
"Send a text, HTML or template email through Mailjet": "Send a text, HTML or template email through Mailjet",
|
||||
"From (Email)": "From (Email)",
|
||||
"From (Name)": "From (Name)",
|
||||
"Emails of recipients": "Emails of recipients",
|
||||
"Subject": "Subject",
|
||||
"Text part": "Text part",
|
||||
"HTML part": "HTML part",
|
||||
"Template Id": "Template Id",
|
||||
"Template variables": "Template variables",
|
||||
"Sender email, must be verified in Mailjet": "Sender email, must be verified in Mailjet",
|
||||
"Template Id (number) defined in Mailjet": "Template Id (number) defined in Mailjet"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { sendEmail } from './lib/actions/send-email';
|
||||
|
||||
export const mailjetAuth = PieceAuth.BasicAuth({
|
||||
description: 'Enter your api credentials',
|
||||
required: true,
|
||||
username: {
|
||||
displayName: 'API Key',
|
||||
description: 'Enter your API Key here'
|
||||
},
|
||||
password: {
|
||||
displayName: 'API Secret',
|
||||
description: 'Enter your API Secret here'
|
||||
}
|
||||
});
|
||||
|
||||
export const mailjet = createPiece({
|
||||
displayName: 'Mailjet',
|
||||
description: 'Email delivery service for sending transactional and marketing emails',
|
||||
auth: mailjetAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/mailjet.svg',
|
||||
categories: [PieceCategory.COMMUNICATION],
|
||||
authors: ['christian-schab'],
|
||||
actions: [sendEmail],
|
||||
triggers: []
|
||||
});
|
||||
@@ -0,0 +1,88 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { AuthenticationType, httpClient, HttpMethod, HttpRequest } from '@activepieces/pieces-common';
|
||||
import { mailjetAuth } from '../../';
|
||||
|
||||
export const sendEmail = createAction({
|
||||
auth: mailjetAuth,
|
||||
name: 'send_email',
|
||||
displayName: 'Send Email',
|
||||
description: 'Send a text, HTML or template email through Mailjet',
|
||||
props: {
|
||||
fromEmail: Property.ShortText({
|
||||
displayName: 'From (Email)',
|
||||
description: 'Sender email, must be verified in Mailjet',
|
||||
required: true
|
||||
}),
|
||||
fromName: Property.ShortText({
|
||||
displayName: 'From (Name)',
|
||||
required: false
|
||||
}),
|
||||
toEmails: Property.Array({
|
||||
displayName: 'Emails of recipients',
|
||||
required: true
|
||||
}),
|
||||
subject: Property.ShortText({
|
||||
displayName: 'Subject',
|
||||
description: undefined,
|
||||
required: true
|
||||
}),
|
||||
textPart: Property.LongText({
|
||||
displayName: 'Text part',
|
||||
description: undefined,
|
||||
required: false
|
||||
}),
|
||||
htmlPart: Property.LongText({
|
||||
displayName: 'HTML part',
|
||||
description: undefined,
|
||||
required: false
|
||||
}),
|
||||
templateId: Property.Number({
|
||||
displayName: 'Template Id',
|
||||
description: 'Template Id (number) defined in Mailjet',
|
||||
required: false
|
||||
}),
|
||||
templateVariables: Property.Object({
|
||||
displayName: 'Template variables',
|
||||
description: undefined,
|
||||
required: false
|
||||
})
|
||||
},
|
||||
async run(configValue) {
|
||||
const { propsValue, auth } = configValue;
|
||||
|
||||
const message = {
|
||||
From: {
|
||||
Email: propsValue.fromEmail,
|
||||
Name: propsValue.fromName || propsValue.fromEmail
|
||||
},
|
||||
To: propsValue.toEmails.map(to => ({
|
||||
Email: to,
|
||||
Name: to
|
||||
})),
|
||||
Subject: propsValue.subject,
|
||||
TextPart: propsValue.textPart,
|
||||
TemplateID: propsValue.templateId,
|
||||
TemplateLanguage: !!propsValue.templateId,
|
||||
Variables: propsValue.templateVariables
|
||||
};
|
||||
const request: HttpRequest<string> = {
|
||||
method: HttpMethod.POST,
|
||||
url: `https://api.mailjet.com/v3.1/send`,
|
||||
body: JSON.stringify({ messages: [message] }),
|
||||
authentication: {
|
||||
type: AuthenticationType.BASIC,
|
||||
username: auth.username,
|
||||
password: auth.password
|
||||
},
|
||||
queryParams: {}
|
||||
};
|
||||
|
||||
const response = await httpClient.sendRequest(request);
|
||||
|
||||
if (response.status !== 200) {
|
||||
throw new Error(`Failed to communicate with Mailjet`);
|
||||
} else {
|
||||
return response.body.Messages[0];
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -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