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,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Geben Sie Ihren Sender API Token ein",
|
||||
"Add / Update Subscriber": "Abonnent hinzufügen/aktualisieren",
|
||||
"Create Campaign": "Kampagne erstellen",
|
||||
"Unsubscribe Subscriber": "Abonnent abbestellen",
|
||||
"Add Subscriber to Group": "Abonnent zur Gruppe hinzufügen",
|
||||
"Remove Subscriber from Group": "Abonnent aus Gruppe entfernen",
|
||||
"Send Campaign": "Kampagne senden",
|
||||
"Update Subscriber": "Abonnent aktualisieren",
|
||||
"Add a new subscriber or update existing subscriber's data": "Neuen Abonnenten hinzufügen oder vorhandene Abonnentendaten aktualisieren",
|
||||
"Creates a draft campaign in Sender": "Erstellt einen Entwurf Kampagne in Absender",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Markiere eine E-Mail-Adresse als global abgemeldet oder aus einer Gruppe",
|
||||
"Add an existing or new subscriber into one or more groups": "Bestehende oder neue Abonnenten zu einer oder mehreren Gruppen hinzufügen",
|
||||
"Remove a subscriber from a specific group": "Abonnenten einer bestimmten Gruppe entfernen",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Auslösen einer entworfenen Kampagne an ihre Empfängerliste",
|
||||
"Update an existing subscriber's data": "Aktualisiere die Daten eines Abonnenten",
|
||||
"Email": "E-Mail",
|
||||
"First Name": "Vorname",
|
||||
"Last Name": "Nachname",
|
||||
"Phone": "Telefon",
|
||||
"Groups": "Gruppen",
|
||||
"Custom Fields": "Eigene Felder",
|
||||
"Trigger Automation": "Trigger-Automatisierung",
|
||||
"Campaign Name": "Kampagnenname",
|
||||
"Email Subject": "E-Mail-Betreff",
|
||||
"From Name": "Absendername",
|
||||
"Reply To": "Antwort an",
|
||||
"Content Type": "Inhaltstyp",
|
||||
"Subscriber": "Abonnent",
|
||||
"Subscribers": "Abonnenten",
|
||||
"Campaign": "Kampagne",
|
||||
"Subscriber email address": "E-Mail Adresse des Abonnenten",
|
||||
"Subscriber first name": "Abonnent Vorname",
|
||||
"Subscriber last name": "Abonnenten-Nachname",
|
||||
"Subscriber phone number": "Abonnenten-Telefonnummer",
|
||||
"Select one or more groups": "Wählen Sie eine oder mehrere Gruppen",
|
||||
"JSON object with custom field keys and values": "JSON-Objekt mit benutzerdefinierten Feldschlüssen und -werten",
|
||||
"Whether to trigger automation workflows": "Ob Automatisierungsworkflows ausgelöst werden sollen",
|
||||
"The name of the campaign": "Der Name der Kampagne",
|
||||
"The subject line of the email": "Die Betreffzeile der E-Mail",
|
||||
"Sender name": "Absendername",
|
||||
"Reply-to email address": "Antwort-an E-Mail-Adresse",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "Der Wert muss einer von \"Editor\", \"html\" oder \"text\" sein",
|
||||
"Select a subscriber": "Abonnent auswählen",
|
||||
"Select one or more subscribers to delete": "Wählen Sie einen oder mehrere Abonnenten zum Löschen",
|
||||
"Select a campaign": "Kampagne auswählen",
|
||||
"Subscriber email address to update": "Abonnenten-E-Mail-Adresse zum Aktualisieren",
|
||||
"New first name": "Neuer Vorname",
|
||||
"New last name": "Neuer Nachname",
|
||||
"New phone number": "Neue Telefonnummer",
|
||||
"JSON object with custom field keys and values to update": "JSON-Objekt mit benutzerdefinierten Feldschlüssel und zu aktualisierenden Werten",
|
||||
"New Campaign": "Neue Kampagne",
|
||||
"New Group": "Neue Gruppe",
|
||||
"New Subscriber": "Neuer Abonnent",
|
||||
"New Subscriber in Group": "Neuer Abonnent in Gruppe",
|
||||
"Updated Subscriber": "Abonnent aktualisiert",
|
||||
"New Unsubscriber": "Neuer Abmelder",
|
||||
"New Unsubscriber From Group": "Neuer Abmelder von Gruppe",
|
||||
"Fires when a new campaign is created in Sender": "Feuert wenn eine neue Kampagne im Sender erstellt wird",
|
||||
"Fires when a new group/list is created": "Feuert wenn eine neue Gruppe/Liste erstellt wird",
|
||||
"Fires when a subscriber is added to any group or to account": "Feuert ab, wenn ein Abonnent zu einer Gruppe oder einem Konto hinzugefügt wird",
|
||||
"Fires when a subscriber is added to a specific group/list": "Löst ab, wenn ein Abonnent zu einer bestimmten Gruppe/Liste hinzugefügt wird",
|
||||
"Fires when a subscriber's data (fields) is updated": "Feuert ab, wenn die Daten eines Abonnenten aktualisiert werden",
|
||||
"Fires when someone unsubscribes globally": "Feuert ab, wenn sich jemand global abmeldet",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Feuert ab, wenn ein Abonnent von einer bestimmten Gruppe entfernt/abgemeldet wird",
|
||||
"Group ID": "Gruppen-ID",
|
||||
"The ID of the group to monitor": "Die ID der zu überwachenden Gruppe"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Introduzca su token de API de remitente",
|
||||
"Add / Update Subscriber": "Añadir / Actualizar suscriptor",
|
||||
"Create Campaign": "Crear Campaña",
|
||||
"Unsubscribe Subscriber": "Darse de baja de suscriptores",
|
||||
"Add Subscriber to Group": "Añadir suscriptor al grupo",
|
||||
"Remove Subscriber from Group": "Quitar suscriptor del grupo",
|
||||
"Send Campaign": "Enviar Campaña",
|
||||
"Update Subscriber": "Actualizar suscriptor",
|
||||
"Add a new subscriber or update existing subscriber's data": "Añadir un nuevo suscriptor o actualizar los datos del suscriptor existente",
|
||||
"Creates a draft campaign in Sender": "Crea un borrador de campaña en el remitente",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Marcar una dirección de correo electrónico como desuscrito globalmente o de un grupo",
|
||||
"Add an existing or new subscriber into one or more groups": "Añadir un suscriptor existente o nuevo en uno o más grupos",
|
||||
"Remove a subscriber from a specific group": "Eliminar un suscriptor de un grupo específico",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Activar el envío de una campaña redactada a su lista de destinatarios",
|
||||
"Update an existing subscriber's data": "Actualizar datos de un suscriptor existente",
|
||||
"Email": "E-mail",
|
||||
"First Name": "Nombre",
|
||||
"Last Name": "Apellido",
|
||||
"Phone": "Teléfono",
|
||||
"Groups": "Grupos",
|
||||
"Custom Fields": "Campos personalizados",
|
||||
"Trigger Automation": "Automatización del disparador",
|
||||
"Campaign Name": "Nombre de Campaña",
|
||||
"Email Subject": "Asunto de Email",
|
||||
"From Name": "De nombre",
|
||||
"Reply To": "Responder a",
|
||||
"Content Type": "Tipo de contenido",
|
||||
"Subscriber": "Suscriptor",
|
||||
"Subscribers": "Suscriptores",
|
||||
"Campaign": "Campaña",
|
||||
"Subscriber email address": "Dirección de correo del suscriptor",
|
||||
"Subscriber first name": "Nombre del suscriptor",
|
||||
"Subscriber last name": "Apellido del suscriptor",
|
||||
"Subscriber phone number": "Número de teléfono del suscriptor",
|
||||
"Select one or more groups": "Seleccione uno o más grupos",
|
||||
"JSON object with custom field keys and values": "Objeto JSON con claves y valores de campos personalizados",
|
||||
"Whether to trigger automation workflows": "Activar flujos de trabajo de automatización",
|
||||
"The name of the campaign": "El nombre de la campaña",
|
||||
"The subject line of the email": "La línea del asunto del correo electrónico",
|
||||
"Sender name": "Nombre del remitente",
|
||||
"Reply-to email address": "Responder a la dirección de correo",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "El valor debe ser uno de \"editor\", \"html\", o \"texto\"",
|
||||
"Select a subscriber": "Seleccione un suscriptor",
|
||||
"Select one or more subscribers to delete": "Seleccione uno o más suscriptores a eliminar",
|
||||
"Select a campaign": "Seleccione una campaña",
|
||||
"Subscriber email address to update": "Dirección de correo del suscriptor para actualizar",
|
||||
"New first name": "Nuevo nombre",
|
||||
"New last name": "Nuevo apellido",
|
||||
"New phone number": "Nuevo número de teléfono",
|
||||
"JSON object with custom field keys and values to update": "Objeto JSON con claves y valores de campos personalizados a actualizar",
|
||||
"New Campaign": "Nueva Campaña",
|
||||
"New Group": "Nuevo grupo",
|
||||
"New Subscriber": "Nuevo suscriptor",
|
||||
"New Subscriber in Group": "Nuevo suscriptor en el grupo",
|
||||
"Updated Subscriber": "Suscriptor actualizado",
|
||||
"New Unsubscriber": "Nuevo desuscriptor",
|
||||
"New Unsubscriber From Group": "Nuevo desuscriptor del grupo",
|
||||
"Fires when a new campaign is created in Sender": "Dispara cuando se crea una nueva campaña en el remitente",
|
||||
"Fires when a new group/list is created": "Dispara cuando se crea un nuevo grupo/lista",
|
||||
"Fires when a subscriber is added to any group or to account": "Dispara cuando un suscriptor es añadido a cualquier grupo o cuenta",
|
||||
"Fires when a subscriber is added to a specific group/list": "Dispara cuando un suscriptor es añadido a un grupo/lista específico",
|
||||
"Fires when a subscriber's data (fields) is updated": "Dispara cuando se actualizan los datos de un suscriptor (campos)",
|
||||
"Fires when someone unsubscribes globally": "Dispara cuando alguien deja de suscribirse globalmente",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Dispara cuando un suscriptor es eliminado/desuscrito de un grupo específico",
|
||||
"Group ID": "ID de grupo",
|
||||
"The ID of the group to monitor": "El ID del grupo a monitorear"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Entrez votre jeton API Sender",
|
||||
"Add / Update Subscriber": "Ajouter / Mettre à jour un abonné",
|
||||
"Create Campaign": "Créer une campagne",
|
||||
"Unsubscribe Subscriber": "Se désabonner de l'abonné",
|
||||
"Add Subscriber to Group": "Ajouter un abonné au groupe",
|
||||
"Remove Subscriber from Group": "Retirer l'abonné du groupe",
|
||||
"Send Campaign": "Envoyer la campagne",
|
||||
"Update Subscriber": "Mettre à jour l'abonné",
|
||||
"Add a new subscriber or update existing subscriber's data": "Ajouter un nouvel abonné ou mettre à jour les données de l'abonné existant",
|
||||
"Creates a draft campaign in Sender": "Crée un brouillon de campagne dans l'expéditeur",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Marquer une adresse e-mail comme désabonnée globalement ou depuis un groupe",
|
||||
"Add an existing or new subscriber into one or more groups": "Ajouter un abonné existant ou nouveau dans un ou plusieurs groupes",
|
||||
"Remove a subscriber from a specific group": "Retirer un abonné d'un groupe spécifique",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Déclencher l'envoi d'une campagne préparée à sa liste de destinataires",
|
||||
"Update an existing subscriber's data": "Mettre à jour les données d'un abonné existant",
|
||||
"Email": "Courriel",
|
||||
"First Name": "First Name",
|
||||
"Last Name": "Last Name",
|
||||
"Phone": "Téléphone",
|
||||
"Groups": "Groupes",
|
||||
"Custom Fields": "Champs personnalisés",
|
||||
"Trigger Automation": "Automatisation du déclencheur",
|
||||
"Campaign Name": "Nom de la campagne",
|
||||
"Email Subject": "Sujet de l'e-mail",
|
||||
"From Name": "De nom",
|
||||
"Reply To": "Répondre à",
|
||||
"Content Type": "Type de contenu",
|
||||
"Subscriber": "Abonné",
|
||||
"Subscribers": "Abonnés",
|
||||
"Campaign": "Campagnes",
|
||||
"Subscriber email address": "Adresse e-mail de l'abonné",
|
||||
"Subscriber first name": "Prénom de l'abonné",
|
||||
"Subscriber last name": "Nom de l'abonné",
|
||||
"Subscriber phone number": "Numéro de téléphone de l'abonné",
|
||||
"Select one or more groups": "Sélectionnez un ou plusieurs groupes",
|
||||
"JSON object with custom field keys and values": "Objet JSON avec des clés et des valeurs de champs personnalisés",
|
||||
"Whether to trigger automation workflows": "Déclencher ou non les workflows d'automatisation",
|
||||
"The name of the campaign": "Le nom de la campagne",
|
||||
"The subject line of the email": "Le sujet de l'e-mail",
|
||||
"Sender name": "Nom de l'expéditeur",
|
||||
"Reply-to email address": "Adresse e-mail de réponse",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "La valeur doit être \"editor\", \"html\", ou \"text\"",
|
||||
"Select a subscriber": "Sélectionner un abonné",
|
||||
"Select one or more subscribers to delete": "Sélectionnez un ou plusieurs abonnés à supprimer",
|
||||
"Select a campaign": "Sélectionnez une campagne",
|
||||
"Subscriber email address to update": "Adresse e-mail de l'abonné à mettre à jour",
|
||||
"New first name": "Nouveau prénom",
|
||||
"New last name": "Nouveau nom",
|
||||
"New phone number": "Nouveau numéro de téléphone",
|
||||
"JSON object with custom field keys and values to update": "Objet JSON avec des clés et des valeurs de champs personnalisés à mettre à jour",
|
||||
"New Campaign": "Nouvelle Campagne",
|
||||
"New Group": "Nouveau groupe",
|
||||
"New Subscriber": "Nouvel abonné",
|
||||
"New Subscriber in Group": "Nouvel abonné dans le groupe",
|
||||
"Updated Subscriber": "Abonné mis à jour",
|
||||
"New Unsubscriber": "Nouveau désabonné",
|
||||
"New Unsubscriber From Group": "Nouveau désabonné du groupe",
|
||||
"Fires when a new campaign is created in Sender": "Tire quand une nouvelle campagne est créée dans l'expéditeur",
|
||||
"Fires when a new group/list is created": "Tire quand un nouveau groupe/liste est créé",
|
||||
"Fires when a subscriber is added to any group or to account": "Se déclenche lorsqu'un abonné est ajouté à un groupe ou à un compte",
|
||||
"Fires when a subscriber is added to a specific group/list": "Déclenche lorsqu'un abonné est ajouté à un groupe/une liste spécifique",
|
||||
"Fires when a subscriber's data (fields) is updated": "Déclenche quand les données d'un abonné (champs) sont mises à jour",
|
||||
"Fires when someone unsubscribes globally": "Tire lorsque quelqu'un se désabonne globalement",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Déclenche lorsqu'un abonné est supprimé/désabonné d'un groupe spécifique",
|
||||
"Group ID": "ID du groupe",
|
||||
"The ID of the group to monitor": "L'ID du groupe à surveiller"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "送信者APIトークンを入力してください",
|
||||
"Add / Update Subscriber": "購読者の追加 / 更新",
|
||||
"Create Campaign": "キャンペーンを作成",
|
||||
"Unsubscribe Subscriber": "購読を解除",
|
||||
"Add Subscriber to Group": "購読者をグループに追加",
|
||||
"Remove Subscriber from Group": "購読者をグループから削除",
|
||||
"Send Campaign": "キャンペーンを送信",
|
||||
"Update Subscriber": "購読者を更新",
|
||||
"Add a new subscriber or update existing subscriber's data": "新しい購読者を追加するか、既存の購読者のデータを更新します",
|
||||
"Creates a draft campaign in Sender": "送信者でドラフトキャンペーンを作成します",
|
||||
"Mark an email address as unsubscribed globally or from a group": "メールアドレスをグローバルまたはグループから登録解除済みとしてマーク",
|
||||
"Add an existing or new subscriber into one or more groups": "1つまたは複数のグループに既存または新規登録者を追加",
|
||||
"Remove a subscriber from a specific group": "特定のグループから購読者を削除",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "下書きされたキャンペーンの送信を受信者リストにトリガーする",
|
||||
"Update an existing subscriber's data": "既存の登録者のデータを更新",
|
||||
"Email": "Eメールアドレス",
|
||||
"First Name": "名",
|
||||
"Last Name": "姓",
|
||||
"Phone": "電話番号",
|
||||
"Groups": "グループ",
|
||||
"Custom Fields": "カスタムフィールド",
|
||||
"Trigger Automation": "トリガーの自動化",
|
||||
"Campaign Name": "キャンペーン名",
|
||||
"Email Subject": "メールの件名",
|
||||
"From Name": "差出人名",
|
||||
"Reply To": "返信先",
|
||||
"Content Type": "コンテンツタイプ",
|
||||
"Subscriber": "Subscriber",
|
||||
"Subscribers": "Subscribers",
|
||||
"Campaign": "キャンペーン",
|
||||
"Subscriber email address": "購読者メールアドレス",
|
||||
"Subscriber first name": "サブスクライバー名",
|
||||
"Subscriber last name": "購読者の姓",
|
||||
"Subscriber phone number": "購読者電話番号",
|
||||
"Select one or more groups": "1つ以上のグループを選択してください",
|
||||
"JSON object with custom field keys and values": "カスタムフィールドキーと値を持つ JSON オブジェクト",
|
||||
"Whether to trigger automation workflows": "自動化ワークフローをトリガーするか",
|
||||
"The name of the campaign": "キャンペーン名",
|
||||
"The subject line of the email": "メールの件名",
|
||||
"Sender name": "送信者名",
|
||||
"Reply-to email address": "返信先メールアドレス",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "値は \"editor\", \"html\" または \"text\" のいずれかでなければなりません",
|
||||
"Select a subscriber": "購読者を選択",
|
||||
"Select one or more subscribers to delete": "削除する購読者を選択してください",
|
||||
"Select a campaign": "キャンペーンを選択",
|
||||
"Subscriber email address to update": "更新する購読者メールアドレス",
|
||||
"New first name": "新しい名",
|
||||
"New last name": "新しい姓",
|
||||
"New phone number": "新しい電話番号",
|
||||
"JSON object with custom field keys and values to update": "カスタムフィールドキーと値を持つJSONオブジェクト",
|
||||
"New Campaign": "新規キャンペーン",
|
||||
"New Group": "新しいグループ",
|
||||
"New Subscriber": "新規購読",
|
||||
"New Subscriber in Group": "グループの新規加入者",
|
||||
"Updated Subscriber": "購読者の更新",
|
||||
"New Unsubscriber": "新しい購読解除",
|
||||
"New Unsubscriber From Group": "グループからの新しい購読解除",
|
||||
"Fires when a new campaign is created in Sender": "送信者に新しいキャンペーンが作成されたときに発生します。",
|
||||
"Fires when a new group/list is created": "新しいグループ/リストが作成されたときに発行されます",
|
||||
"Fires when a subscriber is added to any group or to account": "購読者が任意のグループまたはアカウントに追加されたときに発火します",
|
||||
"Fires when a subscriber is added to a specific group/list": "購読者が特定のグループ/リストに追加されたときに発行されます",
|
||||
"Fires when a subscriber's data (fields) is updated": "購読者のデータ(フィールド)が更新されたときに発行されます",
|
||||
"Fires when someone unsubscribes globally": "世界中で購読解除された時に発火する",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "購読者が削除または購読解除されたときに発行されます。",
|
||||
"Group ID": "グループID",
|
||||
"The ID of the group to monitor": "監視するグループのID"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Voer uw API-sleutel voor afzender in",
|
||||
"Add / Update Subscriber": "Voeg / Update abonnee toe",
|
||||
"Create Campaign": "Nieuwe campagne",
|
||||
"Unsubscribe Subscriber": "Abonnee afmelden",
|
||||
"Add Subscriber to Group": "Voeg abonnee toe aan groep",
|
||||
"Remove Subscriber from Group": "Verwijder abonnee uit de groep",
|
||||
"Send Campaign": "Verzend campagne",
|
||||
"Update Subscriber": "Abonnee bijwerken",
|
||||
"Add a new subscriber or update existing subscriber's data": "Voeg een nieuwe abonnee toe of werk de gegevens van een bestaande abonnee bij",
|
||||
"Creates a draft campaign in Sender": "Creëert een concept campagne in de afzender",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Markeer een e-mailadres als algemeen afgemeld of uit een groep",
|
||||
"Add an existing or new subscriber into one or more groups": "Een bestaande of nieuwe abonnee toevoegen aan één of meer groepen",
|
||||
"Remove a subscriber from a specific group": "Verwijder een abonnee uit een specifieke groep",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Verzending van een opgestelde campagne naar de ontvangerslijst",
|
||||
"Update an existing subscriber's data": "Update een bestaande abonnee gegevens",
|
||||
"Email": "E-mail",
|
||||
"First Name": "Voornaam",
|
||||
"Last Name": "Achternaam",
|
||||
"Phone": "Telefoonnummer",
|
||||
"Groups": "Groepen",
|
||||
"Custom Fields": "Aangepaste velden",
|
||||
"Trigger Automation": "Trigger automatisering",
|
||||
"Campaign Name": "Campagne Naam",
|
||||
"Email Subject": "E-mail Onderwerp",
|
||||
"From Name": "Afzender naam",
|
||||
"Reply To": "Antwoord aan",
|
||||
"Content Type": "Type inhoud",
|
||||
"Subscriber": "Ontvangers",
|
||||
"Subscribers": "Ontvangers",
|
||||
"Campaign": "Campagne",
|
||||
"Subscriber email address": "E-mailadres abonnee",
|
||||
"Subscriber first name": "Voornaam abonnee",
|
||||
"Subscriber last name": "Achternaam abonnee",
|
||||
"Subscriber phone number": "Telefoonnummer van abonnee",
|
||||
"Select one or more groups": "Selecteer een of meer groepen",
|
||||
"JSON object with custom field keys and values": "JSON-object met eigen veld sleutels en waarden",
|
||||
"Whether to trigger automation workflows": "Of er automatisering workflows moeten worden geactiveerd",
|
||||
"The name of the campaign": "De naam van de campagne",
|
||||
"The subject line of the email": "Het onderwerp van de e-mail",
|
||||
"Sender name": "Naam afzender",
|
||||
"Reply-to email address": "Reply-to e-mailadres",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "De waarde moet een van \"editor\", \"html\" of \"text\" zijn",
|
||||
"Select a subscriber": "Selecteer een abonnee",
|
||||
"Select one or more subscribers to delete": "Selecteer een of meer abonnees om te verwijderen",
|
||||
"Select a campaign": "Selecteer een campagne",
|
||||
"Subscriber email address to update": "E-mailadres van abonnee om bij te werken",
|
||||
"New first name": "Nieuwe voornaam",
|
||||
"New last name": "Nieuwe achternaam",
|
||||
"New phone number": "Nieuw telefoonnummer",
|
||||
"JSON object with custom field keys and values to update": "JSON-object met aangepaste veld sleutels en waarden om bij te werken",
|
||||
"New Campaign": "Nieuwe campagne",
|
||||
"New Group": "Nieuwe groep",
|
||||
"New Subscriber": "Nieuwe abonnee",
|
||||
"New Subscriber in Group": "Nieuwe abonnee in de groep",
|
||||
"Updated Subscriber": "Abonnee bijgewerkt",
|
||||
"New Unsubscriber": "Nieuwe afmelder",
|
||||
"New Unsubscriber From Group": "Nieuwe afmelder uit de groep",
|
||||
"Fires when a new campaign is created in Sender": "Vuurt wanneer een nieuwe campagne wordt aangemaakt in de afzender",
|
||||
"Fires when a new group/list is created": "Vuurt wanneer een nieuwe groep/lijst wordt gemaakt",
|
||||
"Fires when a subscriber is added to any group or to account": "Vuurt wanneer een abonnee is toegevoegd aan een groep of aan een account",
|
||||
"Fires when a subscriber is added to a specific group/list": "Vuurt wanneer een abonnee is toegevoegd aan een specifieke groep/lijst",
|
||||
"Fires when a subscriber's data (fields) is updated": "Vuurt wanneer de gegevens van een abonnee (velden) worden bijgewerkt",
|
||||
"Fires when someone unsubscribes globally": "Vuurt wanneer iemand zich wereldwijd uitschrijft",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Vuurt wanneer een abonnee is verwijderd/uitgeschreven uit een specifieke groep",
|
||||
"Group ID": "Groep ID",
|
||||
"The ID of the group to monitor": "Het ID van de te monitorgroep"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Digite seu Token de API do Remetente",
|
||||
"Add / Update Subscriber": "Adicionar / Atualizar Assinante",
|
||||
"Create Campaign": "Criar Campanha",
|
||||
"Unsubscribe Subscriber": "Cancelar Assinatura",
|
||||
"Add Subscriber to Group": "Adicionar Assinante ao Grupo",
|
||||
"Remove Subscriber from Group": "Remover Assinante do Grupo",
|
||||
"Send Campaign": "Enviar Campanha",
|
||||
"Update Subscriber": "Atualizar Assinante",
|
||||
"Add a new subscriber or update existing subscriber's data": "Adicionar um novo assinante ou atualizar os dados do assinante existente",
|
||||
"Creates a draft campaign in Sender": "Cria uma campanha de rascunho no Remetente",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Marcar um endereço de e-mail como não inscrito globalmente ou de um grupo",
|
||||
"Add an existing or new subscriber into one or more groups": "Adicionar um já existente ou novo assinante em um ou mais grupos",
|
||||
"Remove a subscriber from a specific group": "Remover um assinante de um grupo específico",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Gatilho de envio de uma campanha elaborada para sua lista de destinatários",
|
||||
"Update an existing subscriber's data": "Atualizar dados de assinante existente",
|
||||
"Email": "e-mail",
|
||||
"First Name": "Nome",
|
||||
"Last Name": "Sobrenome",
|
||||
"Phone": "Smartphone",
|
||||
"Groups": "grupos",
|
||||
"Custom Fields": "Campos Personalizados",
|
||||
"Trigger Automation": "Gatilho de Automação",
|
||||
"Campaign Name": "Nome Da Campanha",
|
||||
"Email Subject": "Assunto do e-mail",
|
||||
"From Name": "Nome do Remetente",
|
||||
"Reply To": "Responder a",
|
||||
"Content Type": "Tipo de Conteúdo",
|
||||
"Subscriber": "Assinante",
|
||||
"Subscribers": "Assinantes",
|
||||
"Campaign": "Campanha",
|
||||
"Subscriber email address": "Endereço de e-mail assinante",
|
||||
"Subscriber first name": "Primeiro nome do assinante",
|
||||
"Subscriber last name": "Sobrenome do assinante",
|
||||
"Subscriber phone number": "Número de telefone assinante",
|
||||
"Select one or more groups": "Selecione um ou mais grupos",
|
||||
"JSON object with custom field keys and values": "Objeto JSON com chaves e valores de campo personalizados",
|
||||
"Whether to trigger automation workflows": "Habilitar automação de workflows",
|
||||
"The name of the campaign": "O nome da campanha",
|
||||
"The subject line of the email": "A linha de assunto do e-mail",
|
||||
"Sender name": "Nome do remetente",
|
||||
"Reply-to email address": "Responder-para endereço de e-mail",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "O valor deve ser \"editor\", \"html\" ou \"text\"",
|
||||
"Select a subscriber": "Selecione um assinante",
|
||||
"Select one or more subscribers to delete": "Selecione um ou mais assinantes para excluir",
|
||||
"Select a campaign": "Selecione a campanha",
|
||||
"Subscriber email address to update": "Endereço de e-mail do assinante para atualizar",
|
||||
"New first name": "Novo nome",
|
||||
"New last name": "Novo sobrenome",
|
||||
"New phone number": "Novo número de telefone",
|
||||
"JSON object with custom field keys and values to update": "Objeto JSON com chaves de campo e valores personalizados para atualizar",
|
||||
"New Campaign": "Nova Campanha",
|
||||
"New Group": "Novo Grupo",
|
||||
"New Subscriber": "Novo Assinante",
|
||||
"New Subscriber in Group": "Novo assinante em grupo",
|
||||
"Updated Subscriber": "Assinante atualizado",
|
||||
"New Unsubscriber": "Novo Desassinante",
|
||||
"New Unsubscriber From Group": "Novo descadastrador do grupo",
|
||||
"Fires when a new campaign is created in Sender": "Atira quando uma nova campanha é criada no Remetente",
|
||||
"Fires when a new group/list is created": "Atira quando um novo grupo/lista é criado",
|
||||
"Fires when a subscriber is added to any group or to account": "Efetua quando um assinante é adicionado a qualquer grupo ou conta",
|
||||
"Fires when a subscriber is added to a specific group/list": "Atira quando um assinante é adicionado a um grupo/lista específica",
|
||||
"Fires when a subscriber's data (fields) is updated": "aciona quando os dados de um assinante (campos) são atualizados",
|
||||
"Fires when someone unsubscribes globally": "Atira quando alguém se desinscreve globalmente",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Efetua quando um membro é removido/desinscrito de um grupo específico",
|
||||
"Group ID": "Grupo ID",
|
||||
"The ID of the group to monitor": "O ID do grupo a ser monitorado"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Enter your Sender API Token",
|
||||
"Add / Update Subscriber": "Add / Update Subscriber",
|
||||
"Create Campaign": "Create Campaign",
|
||||
"Unsubscribe Subscriber": "Unsubscribe Subscriber",
|
||||
"Add Subscriber to Group": "Add Subscriber to Group",
|
||||
"Remove Subscriber from Group": "Remove Subscriber from Group",
|
||||
"Send Campaign": "Send Campaign",
|
||||
"Update Subscriber": "Update Subscriber",
|
||||
"Add a new subscriber or update existing subscriber's data": "Add a new subscriber or update existing subscriber's data",
|
||||
"Creates a draft campaign in Sender": "Creates a draft campaign in Sender",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Mark an email address as unsubscribed globally or from a group",
|
||||
"Add an existing or new subscriber into one or more groups": "Add an existing or new subscriber into one or more groups",
|
||||
"Remove a subscriber from a specific group": "Remove a subscriber from a specific group",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Trigger sending of a drafted campaign to its recipient list",
|
||||
"Update an existing subscriber's data": "Update an existing subscriber's data",
|
||||
"Email": "Email",
|
||||
"First Name": "First Name",
|
||||
"Last Name": "Last Name",
|
||||
"Phone": "Phone",
|
||||
"Groups": "Groups",
|
||||
"Custom Fields": "Custom Fields",
|
||||
"Trigger Automation": "Trigger Automation",
|
||||
"Campaign Name": "Campaign Name",
|
||||
"Email Subject": "Email Subject",
|
||||
"From Name": "From Name",
|
||||
"Reply To": "Reply To",
|
||||
"Content Type": "Content Type",
|
||||
"Subscriber": "Subscriber",
|
||||
"Subscribers": "Subscribers",
|
||||
"Campaign": "Campaign",
|
||||
"Subscriber email address": "Subscriber email address",
|
||||
"Subscriber first name": "Subscriber first name",
|
||||
"Subscriber last name": "Subscriber last name",
|
||||
"Subscriber phone number": "Subscriber phone number",
|
||||
"Select one or more groups": "Select one or more groups",
|
||||
"JSON object with custom field keys and values": "JSON object with custom field keys and values",
|
||||
"Whether to trigger automation workflows": "Whether to trigger automation workflows",
|
||||
"The name of the campaign": "The name of the campaign",
|
||||
"The subject line of the email": "The subject line of the email",
|
||||
"Sender name": "Sender name",
|
||||
"Reply-to email address": "Reply-to email address",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "The value must be one of \"editor\", \"html\", or \"text\"",
|
||||
"Select a subscriber": "Select a subscriber",
|
||||
"Select one or more subscribers to delete": "Select one or more subscribers to delete",
|
||||
"Select a campaign": "Select a campaign",
|
||||
"Subscriber email address to update": "Subscriber email address to update",
|
||||
"New first name": "New first name",
|
||||
"New last name": "New last name",
|
||||
"New phone number": "New phone number",
|
||||
"JSON object with custom field keys and values to update": "JSON object with custom field keys and values to update",
|
||||
"New Campaign": "New Campaign",
|
||||
"New Group": "New Group",
|
||||
"New Subscriber": "New Subscriber",
|
||||
"New Subscriber in Group": "New Subscriber in Group",
|
||||
"Updated Subscriber": "Updated Subscriber",
|
||||
"New Unsubscriber": "New Unsubscriber",
|
||||
"New Unsubscriber From Group": "New Unsubscriber From Group",
|
||||
"Fires when a new campaign is created in Sender": "Fires when a new campaign is created in Sender",
|
||||
"Fires when a new group/list is created": "Fires when a new group/list is created",
|
||||
"Fires when a subscriber is added to any group or to account": "Fires when a subscriber is added to any group or to account",
|
||||
"Fires when a subscriber is added to a specific group/list": "Fires when a subscriber is added to a specific group/list",
|
||||
"Fires when a subscriber's data (fields) is updated": "Fires when a subscriber's data (fields) is updated",
|
||||
"Fires when someone unsubscribes globally": "Fires when someone unsubscribes globally",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Fires when a subscriber is removed/unsubscribed from a specific group",
|
||||
"Group ID": "Group ID",
|
||||
"The ID of the group to monitor": "The ID of the group to monitor"
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"Enter your Sender API Token": "Enter your Sender API Token",
|
||||
"Add / Update Subscriber": "Add / Update Subscriber",
|
||||
"Create Campaign": "Create Campaign",
|
||||
"Unsubscribe Subscriber": "Unsubscribe Subscriber",
|
||||
"Add Subscriber to Group": "Add Subscriber to Group",
|
||||
"Remove Subscriber from Group": "Remove Subscriber from Group",
|
||||
"Send Campaign": "Send Campaign",
|
||||
"Update Subscriber": "Update Subscriber",
|
||||
"Add a new subscriber or update existing subscriber's data": "Add a new subscriber or update existing subscriber's data",
|
||||
"Creates a draft campaign in Sender": "Creates a draft campaign in Sender",
|
||||
"Mark an email address as unsubscribed globally or from a group": "Mark an email address as unsubscribed globally or from a group",
|
||||
"Add an existing or new subscriber into one or more groups": "Add an existing or new subscriber into one or more groups",
|
||||
"Remove a subscriber from a specific group": "Remove a subscriber from a specific group",
|
||||
"Trigger sending of a drafted campaign to its recipient list": "Trigger sending of a drafted campaign to its recipient list",
|
||||
"Update an existing subscriber's data": "Update an existing subscriber's data",
|
||||
"Email": "电子邮件地址",
|
||||
"First Name": "名字",
|
||||
"Last Name": "名字",
|
||||
"Phone": "Phone",
|
||||
"Groups": "Groups",
|
||||
"Custom Fields": "Custom Fields",
|
||||
"Trigger Automation": "Trigger Automation",
|
||||
"Campaign Name": "Campaign Name",
|
||||
"Email Subject": "Email Subject",
|
||||
"From Name": "From Name",
|
||||
"Reply To": "Reply To",
|
||||
"Content Type": "Content Type",
|
||||
"Subscriber": "Subscriber",
|
||||
"Subscribers": "Subscribers",
|
||||
"Campaign": "Campaign",
|
||||
"Subscriber email address": "Subscriber email address",
|
||||
"Subscriber first name": "Subscriber first name",
|
||||
"Subscriber last name": "Subscriber last name",
|
||||
"Subscriber phone number": "Subscriber phone number",
|
||||
"Select one or more groups": "Select one or more groups",
|
||||
"JSON object with custom field keys and values": "JSON object with custom field keys and values",
|
||||
"Whether to trigger automation workflows": "Whether to trigger automation workflows",
|
||||
"The name of the campaign": "The name of the campaign",
|
||||
"The subject line of the email": "The subject line of the email",
|
||||
"Sender name": "Sender name",
|
||||
"Reply-to email address": "Reply-to email address",
|
||||
"The value must be one of \"editor\", \"html\", or \"text\"": "The value must be one of \"editor\", \"html\", or \"text\"",
|
||||
"Select a subscriber": "Select a subscriber",
|
||||
"Select one or more subscribers to delete": "Select one or more subscribers to delete",
|
||||
"Select a campaign": "Select a campaign",
|
||||
"Subscriber email address to update": "Subscriber email address to update",
|
||||
"New first name": "New first name",
|
||||
"New last name": "New last name",
|
||||
"New phone number": "New phone number",
|
||||
"JSON object with custom field keys and values to update": "JSON object with custom field keys and values to update",
|
||||
"New Campaign": "New Campaign",
|
||||
"New Group": "New Group",
|
||||
"New Subscriber": "New Subscriber",
|
||||
"New Subscriber in Group": "New Subscriber in Group",
|
||||
"Updated Subscriber": "Updated Subscriber",
|
||||
"New Unsubscriber": "New Unsubscriber",
|
||||
"New Unsubscriber From Group": "New Unsubscriber From Group",
|
||||
"Fires when a new campaign is created in Sender": "Fires when a new campaign is created in Sender",
|
||||
"Fires when a new group/list is created": "Fires when a new group/list is created",
|
||||
"Fires when a subscriber is added to any group or to account": "Fires when a subscriber is added to any group or to account",
|
||||
"Fires when a subscriber is added to a specific group/list": "Fires when a subscriber is added to a specific group/list",
|
||||
"Fires when a subscriber's data (fields) is updated": "Fires when a subscriber's data (fields) is updated",
|
||||
"Fires when someone unsubscribes globally": "Fires when someone unsubscribes globally",
|
||||
"Fires when a subscriber is removed/unsubscribed from a specific group": "Fires when a subscriber is removed/unsubscribed from a specific group",
|
||||
"Group ID": "Group ID",
|
||||
"The ID of the group to monitor": "The ID of the group to monitor"
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { createPiece} from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { senderAuth } from './lib/common/common';
|
||||
import { addUpdateSubscriberAction } from './lib/actions/add-subscriber';
|
||||
import { createCampaignAction } from './lib/actions/create-campaign';
|
||||
import { unsubscribeSubscriberAction } from './lib/actions/unsubscribe-subscriber';
|
||||
import { addSubscriberToGroupAction } from './lib/actions/add-subscriber-to-group';
|
||||
import { removeSubscriberFromGroupAction } from './lib/actions/remove-subscriber-from-group';
|
||||
import { sendCampaignAction } from './lib/actions/send-campaign';
|
||||
import { newCampaignTrigger } from './lib/triggers/new-campaign';
|
||||
import { newGroupTrigger } from './lib/triggers/new-group';
|
||||
import { newSubscriberTrigger } from './lib/triggers/new-subscriber';
|
||||
import { newSubscriberInGroupTrigger } from './lib/triggers/new-subscriber-in-group';
|
||||
import { updatedSubscriberTrigger } from './lib/triggers/updated-subscriber';
|
||||
import { newUnsubscriberTrigger } from './lib/triggers/new-unsubscriber';
|
||||
import { newUnsubscriberFromGroupTrigger } from './lib/triggers/new-unsubscriber-from-group';
|
||||
import { updateSubscriberAction } from './lib/actions/update-subscriber';
|
||||
|
||||
export const sender = createPiece({
|
||||
displayName: 'Sender',
|
||||
auth: senderAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/sender.png',
|
||||
authors: ['Ani-4x','sanket-a11y'],
|
||||
categories: [PieceCategory.MARKETING],
|
||||
actions: [
|
||||
addUpdateSubscriberAction,
|
||||
createCampaignAction,
|
||||
unsubscribeSubscriberAction,
|
||||
addSubscriberToGroupAction,
|
||||
removeSubscriberFromGroupAction,
|
||||
sendCampaignAction,
|
||||
updateSubscriberAction
|
||||
],
|
||||
triggers: [
|
||||
newCampaignTrigger,
|
||||
newGroupTrigger,
|
||||
newSubscriberTrigger,
|
||||
newSubscriberInGroupTrigger,
|
||||
updatedSubscriberTrigger,
|
||||
newUnsubscriberTrigger,
|
||||
newUnsubscriberFromGroupTrigger,
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
groupIdsDropdown,
|
||||
makeSenderRequest,
|
||||
senderAuth,
|
||||
subscriberDropdownSingle,
|
||||
} from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const addSubscriberToGroupAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'add_subscriber_to_group',
|
||||
displayName: 'Add Subscriber to Group',
|
||||
description: 'Add an existing or new subscriber into one or more groups',
|
||||
props: {
|
||||
subscriber: subscriberDropdownSingle,
|
||||
groups: groupIdsDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const subscriberData: any = {
|
||||
groups: context.propsValue.groups,
|
||||
};
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/subscribers/${context.propsValue.subscriber}`,
|
||||
HttpMethod.PATCH,
|
||||
subscriberData
|
||||
);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,79 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { groupIdsDropdown, makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { group } from 'console';
|
||||
|
||||
|
||||
export const addUpdateSubscriberAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'add_update_subscriber',
|
||||
displayName: 'Add / Update Subscriber',
|
||||
description: 'Add a new subscriber or update existing subscriber\'s data',
|
||||
props: {
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
description: 'Subscriber email address',
|
||||
required: true,
|
||||
}),
|
||||
firstname: Property.ShortText({
|
||||
displayName: 'First Name',
|
||||
description: 'Subscriber first name',
|
||||
required: false,
|
||||
}),
|
||||
lastname: Property.ShortText({
|
||||
displayName: 'Last Name',
|
||||
description: 'Subscriber last name',
|
||||
required: false,
|
||||
}),
|
||||
phone: Property.ShortText({
|
||||
displayName: 'Phone',
|
||||
description: 'Subscriber phone number',
|
||||
required: false,
|
||||
}),
|
||||
groups: groupIdsDropdown,
|
||||
customFields: Property.Json({
|
||||
displayName: 'Custom Fields',
|
||||
description: 'JSON object with custom field keys and values',
|
||||
required: false,
|
||||
}),
|
||||
triggerAutomation: Property.Checkbox({
|
||||
displayName: 'Trigger Automation',
|
||||
description: 'Whether to trigger automation workflows',
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const subscriberData: any = {
|
||||
email: context.propsValue.email,
|
||||
};
|
||||
|
||||
if (context.propsValue.firstname) {
|
||||
subscriberData.firstname = context.propsValue.firstname;
|
||||
}
|
||||
if (context.propsValue.lastname) {
|
||||
subscriberData.lastname = context.propsValue.lastname;
|
||||
}
|
||||
if (context.propsValue.phone) {
|
||||
subscriberData.phone = context.propsValue.phone;
|
||||
}
|
||||
if (context.propsValue.groups) {
|
||||
subscriberData.groups = context.propsValue.groups;
|
||||
}
|
||||
if (context.propsValue.customFields) {
|
||||
subscriberData.fields = context.propsValue.customFields;
|
||||
}
|
||||
if (context.propsValue.triggerAutomation) {
|
||||
subscriberData.trigger_automation = true;
|
||||
}
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/subscribers',
|
||||
HttpMethod.POST,
|
||||
subscriberData
|
||||
);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,62 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { groupIdsDropdown, makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { group } from 'console';
|
||||
|
||||
|
||||
export const createCampaignAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'create_campaign',
|
||||
displayName: 'Create Campaign',
|
||||
description: 'Creates a draft campaign in Sender',
|
||||
props: {
|
||||
title: Property.ShortText({
|
||||
displayName: 'Campaign Name',
|
||||
description: 'The name of the campaign',
|
||||
required: false,
|
||||
}),
|
||||
subject: Property.ShortText({
|
||||
displayName: 'Email Subject',
|
||||
description: 'The subject line of the email',
|
||||
required: true,
|
||||
}),
|
||||
from: Property.ShortText({
|
||||
displayName: 'From Name',
|
||||
description: 'Sender name',
|
||||
required: true,
|
||||
}),
|
||||
reply_to: Property.ShortText({
|
||||
displayName: 'Reply To',
|
||||
description: 'Reply-to email address',
|
||||
required: true,
|
||||
}),
|
||||
content_type: Property.LongText({
|
||||
displayName: 'Content Type',
|
||||
description: 'The value must be one of "editor", "html", or "text"',
|
||||
required: true,
|
||||
}),
|
||||
groups: groupIdsDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const campaignData: any = {
|
||||
title: context.propsValue.title,
|
||||
subject: context.propsValue.subject,
|
||||
from: context.propsValue.from,
|
||||
content_type: context.propsValue.content_type,
|
||||
groups: context.propsValue.groups,
|
||||
};
|
||||
|
||||
if (context.propsValue.reply_to) {
|
||||
campaignData.reply_to = context.propsValue.reply_to;
|
||||
}
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/campaigns',
|
||||
HttpMethod.POST,
|
||||
campaignData
|
||||
);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
groupIdDropdown,
|
||||
makeSenderRequest,
|
||||
senderAuth,
|
||||
subscribersDropdown,
|
||||
} from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const removeSubscriberFromGroupAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'remove_subscriber_from_group',
|
||||
displayName: 'Remove Subscriber from Group',
|
||||
description: 'Remove a subscriber from a specific group',
|
||||
props: {
|
||||
subscribers: subscribersDropdown,
|
||||
groupId: groupIdDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const subscribers = context.propsValue.subscribers;
|
||||
const groupId = context.propsValue.groupId;
|
||||
|
||||
const requestBody = {
|
||||
subscribers: subscribers,
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/subscribers/groups/${groupId}`,
|
||||
HttpMethod.DELETE,
|
||||
requestBody
|
||||
);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
subscribers,
|
||||
groupId,
|
||||
removedAt: new Date().toISOString(),
|
||||
response: response.body,
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
campaignDropdown,
|
||||
makeSenderRequest,
|
||||
senderAuth,
|
||||
} from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const sendCampaignAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'send_campaign',
|
||||
displayName: 'Send Campaign',
|
||||
description: 'Trigger sending of a drafted campaign to its recipient list',
|
||||
props: {
|
||||
campaignId: campaignDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const campaignId = context.propsValue.campaignId;
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/campaigns/${campaignId}/send`,
|
||||
HttpMethod.POST,
|
||||
);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
makeSenderRequest,
|
||||
senderAuth,
|
||||
subscriberDropdownSingle,
|
||||
} from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { subscribe } from 'diagnostics_channel';
|
||||
|
||||
export const unsubscribeSubscriberAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'unsubscribe_subscriber',
|
||||
displayName: 'Unsubscribe Subscriber',
|
||||
description: 'Mark an email address as unsubscribed globally or from a group',
|
||||
props: {
|
||||
subscriber: subscriberDropdownSingle,
|
||||
},
|
||||
async run(context) {
|
||||
const subscriber = context.propsValue.subscriber;
|
||||
const subscriberId = subscriber;
|
||||
|
||||
const requestBody = {
|
||||
subscribers: [subscriberId],
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/subscribers`,
|
||||
HttpMethod.DELETE,
|
||||
requestBody
|
||||
);
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,70 @@
|
||||
import { createAction, Property} from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth, subscriberDropdownSingle } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { subscribe } from 'diagnostics_channel';
|
||||
|
||||
|
||||
export const updateSubscriberAction = createAction({
|
||||
auth: senderAuth,
|
||||
name: 'update_subscriber',
|
||||
displayName: 'Update Subscriber',
|
||||
description: 'Update an existing subscriber\'s data',
|
||||
props: {
|
||||
subscriber: subscriberDropdownSingle,
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
description: 'Subscriber email address to update',
|
||||
required: true,
|
||||
}),
|
||||
firstname: Property.ShortText({
|
||||
displayName: 'First Name',
|
||||
description: 'New first name',
|
||||
required: false,
|
||||
}),
|
||||
lastname: Property.ShortText({
|
||||
displayName: 'Last Name',
|
||||
description: 'New last name',
|
||||
required: false,
|
||||
}),
|
||||
phone: Property.ShortText({
|
||||
displayName: 'Phone',
|
||||
description: 'New phone number',
|
||||
required: false,
|
||||
}),
|
||||
customFields: Property.Json({
|
||||
displayName: 'Custom Fields',
|
||||
description: 'JSON object with custom field keys and values to update',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const email = context.propsValue.email;
|
||||
const phone = context.propsValue.phone;
|
||||
const {subscriber}= context.propsValue;
|
||||
|
||||
const subscriberId = subscriber;
|
||||
const updateData: any = {};
|
||||
|
||||
if (context.propsValue.firstname) {
|
||||
updateData.firstname = context.propsValue.firstname;
|
||||
}
|
||||
if (context.propsValue.lastname) {
|
||||
updateData.lastname = context.propsValue.lastname;
|
||||
}
|
||||
if (context.propsValue.phone) {
|
||||
updateData.phone = context.propsValue.phone;
|
||||
}
|
||||
if (context.propsValue.customFields) {
|
||||
updateData.fields = context.propsValue.customFields;
|
||||
}
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/subscribers/${subscriberId}`,
|
||||
HttpMethod.PATCH,
|
||||
updateData
|
||||
);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,231 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
AuthenticationType,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { PieceAuth, Property } from '@activepieces/pieces-framework';
|
||||
|
||||
export const senderAuth = PieceAuth.SecretText({
|
||||
displayName: 'API Token',
|
||||
description: 'Enter your Sender API Token',
|
||||
required: true,
|
||||
});
|
||||
|
||||
const SENDER_API_BASE_URL = 'https://api.sender.net/v2';
|
||||
|
||||
export async function makeSenderRequest(
|
||||
auth: string,
|
||||
endpoint: string,
|
||||
method: HttpMethod = HttpMethod.GET,
|
||||
body?: any
|
||||
) {
|
||||
return await httpClient.sendRequest({
|
||||
method,
|
||||
url: `${SENDER_API_BASE_URL}${endpoint}`,
|
||||
headers: {
|
||||
Authorization: `Bearer ${auth}`,
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
body,
|
||||
});
|
||||
}
|
||||
export const groupIdDropdown = Property.Dropdown({
|
||||
auth: senderAuth,
|
||||
displayName: 'Groups',
|
||||
description: 'Select one or more groups',
|
||||
required: false,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your Sender account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response: any = await makeSenderRequest(
|
||||
auth.secret_text,
|
||||
'/groups',
|
||||
HttpMethod.GET
|
||||
);
|
||||
const groups = response.body.data || [];
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: groups.map((group: any) => ({
|
||||
label: group.title,
|
||||
value: group.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading groups',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const groupIdsDropdown = Property.MultiSelectDropdown({
|
||||
auth: senderAuth,
|
||||
displayName: 'Groups',
|
||||
description: 'Select one or more groups',
|
||||
required: false,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your Sender account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response: any = await makeSenderRequest(
|
||||
auth.secret_text,
|
||||
'/groups',
|
||||
HttpMethod.GET
|
||||
);
|
||||
const groups = response.body.data || [];
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: groups.map((group: any) => ({
|
||||
label: group.title,
|
||||
value: group.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading groups',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const subscribersDropdown = Property.MultiSelectDropdown<string, true, typeof senderAuth>({
|
||||
auth: senderAuth,
|
||||
displayName: 'Subscribers',
|
||||
description: 'Select one or more subscribers to delete',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your Sender account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response: any = await makeSenderRequest(
|
||||
auth.secret_text,
|
||||
'/subscribers?limit=50',
|
||||
HttpMethod.GET
|
||||
);
|
||||
const subscribers = response.body.data || [];
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: subscribers.map((sub: any) => ({
|
||||
label: sub.email,
|
||||
value: sub.email,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading subscribers',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const subscriberDropdownSingle = Property.Dropdown<string, true, typeof senderAuth>({
|
||||
auth: senderAuth,
|
||||
displayName: 'Subscriber',
|
||||
description: 'Select a subscriber',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your Sender account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response: any = await makeSenderRequest(
|
||||
auth.secret_text,
|
||||
'/subscribers?limit=50',
|
||||
HttpMethod.GET
|
||||
);
|
||||
const subscribers = response.body.data || [];
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: subscribers.map((sub: any) => ({
|
||||
label: sub.email,
|
||||
value: sub.email,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading subscribers',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const campaignDropdown = Property.Dropdown({
|
||||
auth: senderAuth,
|
||||
displayName: 'Campaign',
|
||||
description: 'Select a campaign',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please connect your Sender account first',
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const response: any = await makeSenderRequest(
|
||||
auth.secret_text,
|
||||
`/campaigns?limit=50&status=DRAFT`,
|
||||
HttpMethod.GET
|
||||
);
|
||||
const campaigns = response.body.data || [];
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: campaigns.map((c: any) => ({
|
||||
label: c.title || c.subject || c.id,
|
||||
value: c.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Error loading campaigns',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,55 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
|
||||
export const newCampaignTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_campaign',
|
||||
displayName: 'New Campaign',
|
||||
description: 'Fires when a new campaign is created in Sender',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic : 'campaigns/new',
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/campaigns?limit=1',
|
||||
HttpMethod.GET
|
||||
);
|
||||
return response.body.data || [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,55 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
|
||||
export const newGroupTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_group',
|
||||
displayName: 'New Group',
|
||||
description: 'Fires when a new group/list is created',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic : 'groups/new',
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/groups?limit=1',
|
||||
HttpMethod.GET
|
||||
);
|
||||
return response.body.data || [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,63 @@
|
||||
import { createTrigger, Property, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
|
||||
export const newSubscriberInGroupTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_subscriber_in_group',
|
||||
displayName: 'New Subscriber in Group',
|
||||
description: 'Fires when a subscriber is added to a specific group/list',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {
|
||||
groupId: Property.ShortText({
|
||||
displayName: 'Group ID',
|
||||
description: 'The ID of the group to monitor',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
const groupId = context.propsValue.groupId;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic : 'groups/new-subscriber',
|
||||
relation_id : groupId,
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
const groupId = context.propsValue.groupId;
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/groups/${groupId}/subscribers?limit=1`
|
||||
);
|
||||
return response.body.data || [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const newSubscriberTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_subscriber',
|
||||
displayName: 'New Subscriber',
|
||||
description: 'Fires when a subscriber is added to any group or to account',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic: 'subscribers/new',
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/subscribers?limit=1',
|
||||
HttpMethod.GET
|
||||
);
|
||||
return response.body.data;
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,58 @@
|
||||
import { createTrigger, TriggerStrategy, Property } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
|
||||
export const newUnsubscriberFromGroupTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_unsubscriber_from_group',
|
||||
displayName: 'New Unsubscriber From Group',
|
||||
description: 'Fires when a subscriber is removed/unsubscribed from a specific group',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {
|
||||
groupId: Property.ShortText({
|
||||
displayName: 'Group ID',
|
||||
description: 'The ID of the group to monitor',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
const groupId = context.propsValue.groupId;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic: 'groups/unsubscribed',
|
||||
relation_id : groupId,
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
return [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
|
||||
export const newUnsubscriberTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'new_unsubscriber',
|
||||
displayName: 'New Unsubscriber',
|
||||
description: 'Fires when someone unsubscribes globally',
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic: 'subscribers/unsubscribed',
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
return [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { makeSenderRequest, senderAuth } from '../common/common';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const updatedSubscriberTrigger = createTrigger({
|
||||
auth: senderAuth,
|
||||
name: 'updated_subscriber',
|
||||
displayName: 'Updated Subscriber',
|
||||
description: "Fires when a subscriber's data (fields) is updated",
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
async onEnable(context) {
|
||||
const webhookUrl = context.webhookUrl;
|
||||
|
||||
const webhookData = {
|
||||
url: webhookUrl,
|
||||
topic: 'subscribers/updated',
|
||||
};
|
||||
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/account/webhooks',
|
||||
HttpMethod.POST,
|
||||
webhookData
|
||||
);
|
||||
|
||||
await context.store.put('webhookId', response.body.data.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhookId = await context.store.get<string>('webhookId');
|
||||
|
||||
if (webhookId) {
|
||||
await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
`/account/webhooks/${webhookId}`,
|
||||
HttpMethod.DELETE
|
||||
);
|
||||
}
|
||||
|
||||
await context.store.delete('webhookId');
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
async test(context) {
|
||||
const response = await makeSenderRequest(
|
||||
context.auth.secret_text,
|
||||
'/subscribers?limit=1',
|
||||
HttpMethod.GET
|
||||
);
|
||||
return response.body.data || [];
|
||||
},
|
||||
sampleData: {},
|
||||
});
|
||||
Reference in New Issue
Block a user