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,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "All-in-one E-Mail-Marketing und Automatisierungsplattform",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Bitte geben Sie Ihren Anwendungs-öffentlichen Schlüssel an, indem Sie einen in Ihren Zagomail-Kontoeinstellungen generieren oder indem Sie direkt auf https://app.zagomail.com/user/api-keys/index klicken.",
|
||||
"Create Subscriber": "Abonnent erstellen",
|
||||
"Tag Subscriber": "Schlagwort-Abonnent",
|
||||
"Update Subscriber": "Abonnent aktualisieren",
|
||||
"Search Subscriber": "Abonnent suchen",
|
||||
"Get Subscriber": "Abonnent erhalten",
|
||||
"Get Campaign": "Holen Sie sich Kampagne",
|
||||
"Creates a new subscriber in a list.": "Erstellt einen neuen Abonnenten in einer Liste.",
|
||||
"Adds A Tag to A Subscriber.": "Fügt einen Tag einem Abonnenten hinzu.",
|
||||
"Updates an existing subscriber.": "Aktualisiert einen bestehenden Abonnenten.",
|
||||
"Finds a subscriber by their email address.": "Findet einen Abonnenten nach seiner E-Mail-Adresse.",
|
||||
"Gets the details of a subscriber.": "Ruft die Details eines Abonnenten ab.",
|
||||
"Gets the details of a campaign.": "Ruft die Details einer Kampagne ab.",
|
||||
"List": "Liste",
|
||||
"List Fields": "Listenfelder",
|
||||
"Tags": "Tags",
|
||||
"Subscriber ID": "Abonnenten-ID",
|
||||
"Email": "E-Mail",
|
||||
"Campaign": "Kampagne",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Fügen Sie einen oder mehrere Tags hinzu, die Sie diesem Abonnenten hinzufügen möchten.",
|
||||
"The ID of the subscriber you want to add the tag to.": "Die ID des Abonnenten, dem Sie das Tag hinzufügen möchten.",
|
||||
"The ID of the subscriber you want to update.": "Die ID des Abonnenten, den Sie aktualisieren möchten.",
|
||||
"The ID of the subscriber you want to get the details for.": "Die ID des Abonnenten, für die Sie die Details erhalten möchten.",
|
||||
"Subscriber Added": "Abonnent hinzugefügt",
|
||||
"Unsubscribed Subscriber": "Abgemeldeter Abonnent",
|
||||
"Tagged Subscriber": "Tagged Abonnent",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Trigger wenn Abonnent angemeldet oder bestätigt wird.",
|
||||
"Triggers when subscriber is unsubscribed.": "Wird ausgelöst, wenn der Abonnent abgemeldet ist.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Triger, wenn Abonnent mit einem Tag markiert wird.",
|
||||
"Tag Name": "Tag-Name",
|
||||
"An Arbitrary name you would like to call this tag.": "Ein willkürlicher Name, den Sie dieses Tag nennen möchten."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "Plataforma de automatización y marketing de correo electrónico todo en uno",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Por favor, proporcione la clave pública de su aplicación generando una en la configuración de su cuenta de zagomail o visitando directamente https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Crear suscriptor",
|
||||
"Tag Subscriber": "Suscriptor de etiqueta",
|
||||
"Update Subscriber": "Actualizar suscriptor",
|
||||
"Search Subscriber": "Buscar suscriptor",
|
||||
"Get Subscriber": "Obtener suscriptor",
|
||||
"Get Campaign": "Obtener Campaña",
|
||||
"Creates a new subscriber in a list.": "Crea un nuevo suscriptor en una lista.",
|
||||
"Adds A Tag to A Subscriber.": "Añade una etiqueta a un suscriptor.",
|
||||
"Updates an existing subscriber.": "Actualiza un suscriptor existente.",
|
||||
"Finds a subscriber by their email address.": "Encuentra un suscriptor por su dirección de correo electrónico.",
|
||||
"Gets the details of a subscriber.": "Obtiene los detalles de un suscriptor.",
|
||||
"Gets the details of a campaign.": "Obtiene los detalles de una campaña.",
|
||||
"List": "Lista",
|
||||
"List Fields": "Lista de campos",
|
||||
"Tags": "Etiquetas",
|
||||
"Subscriber ID": "ID del suscriptor",
|
||||
"Email": "E-mail",
|
||||
"Campaign": "Campaña",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Añade una o más etiquetas que te gustaría añadir a este suscriptor.",
|
||||
"The ID of the subscriber you want to add the tag to.": "El ID del suscriptor al que desea agregar la etiqueta.",
|
||||
"The ID of the subscriber you want to update.": "El ID del suscriptor que desea actualizar.",
|
||||
"The ID of the subscriber you want to get the details for.": "El ID del suscriptor al que quieres recibir los detalles.",
|
||||
"Subscriber Added": "Suscriptor añadido",
|
||||
"Unsubscribed Subscriber": "Suscriptor no suscrito",
|
||||
"Tagged Subscriber": "Suscriptor etiquetado",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Dispara cuando el suscriptor está registrado o confirmado.",
|
||||
"Triggers when subscriber is unsubscribed.": "Se activa cuando el suscriptor es cancelado.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Activadores cuando el suscriptor está etiquetado con una etiqueta.",
|
||||
"Tag Name": "Nombre de la etiqueta",
|
||||
"An Arbitrary name you would like to call this tag.": "Un nombre de árbitro que te gustaría llamar a esta etiqueta."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "Plateforme de marketing et d'automatisation par e-mail tout-en-un",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Veuillez fournir votre clé publique d'application en en générant une dans les paramètres de votre compte zagomail ou en visitant directement https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Créer un abonné",
|
||||
"Tag Subscriber": "Abonné à la balise",
|
||||
"Update Subscriber": "Mettre à jour l'abonné",
|
||||
"Search Subscriber": "Rechercher un abonné",
|
||||
"Get Subscriber": "Obtenir l'abonné",
|
||||
"Get Campaign": "Obtenir la campagne",
|
||||
"Creates a new subscriber in a list.": "Crée un nouvel abonné dans une liste.",
|
||||
"Adds A Tag to A Subscriber.": "Ajoute un tag à un abonné.",
|
||||
"Updates an existing subscriber.": "Met à jour un abonné existant.",
|
||||
"Finds a subscriber by their email address.": "Trouve un abonné par son adresse e-mail.",
|
||||
"Gets the details of a subscriber.": "Obtient les détails d'un abonné.",
|
||||
"Gets the details of a campaign.": "Renvoie les détails d'une campagne.",
|
||||
"List": "Liste",
|
||||
"List Fields": "Liste des champs",
|
||||
"Tags": "Tags",
|
||||
"Subscriber ID": "Identifiant de l'abonné",
|
||||
"Email": "Courriel",
|
||||
"Campaign": "Campagnes",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Ajoutez une ou plusieurs balises que vous souhaitez ajouter à cet abonné.",
|
||||
"The ID of the subscriber you want to add the tag to.": "L'ID de l'abonné auquel vous voulez ajouter le tag.",
|
||||
"The ID of the subscriber you want to update.": "L'ID de l'abonné que vous voulez mettre à jour.",
|
||||
"The ID of the subscriber you want to get the details for.": "L'ID de l'abonné pour lequel vous voulez obtenir les détails.",
|
||||
"Subscriber Added": "Abonné ajouté",
|
||||
"Unsubscribed Subscriber": "Abonné non abonné",
|
||||
"Tagged Subscriber": "Abonné taggé",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Déclenche lorsque l'abonné est inscrit ou confirmé.",
|
||||
"Triggers when subscriber is unsubscribed.": "Déclenche lorsque l'abonné est désabonné.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Trigers lorsque l'abonné est marqué avec un tag.",
|
||||
"Tag Name": "Nom de l'étiquette",
|
||||
"An Arbitrary name you would like to call this tag.": "Un nom arbitraire que vous souhaitez appeler ce tag."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "オールインワンのメールマーケティングと自動化プラットフォーム",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "zagomail アカウント設定で公開鍵を生成するか、https://app.zagomail.com/user/api-keys/indexに直接アクセスしてください。",
|
||||
"Create Subscriber": "購読者を作成",
|
||||
"Tag Subscriber": "購読者にタグを付ける",
|
||||
"Update Subscriber": "購読者を更新",
|
||||
"Search Subscriber": "購読者を検索",
|
||||
"Get Subscriber": "購読者を取得",
|
||||
"Get Campaign": "キャンペーンを取得",
|
||||
"Creates a new subscriber in a list.": "新しい購読者をリストに作成します。",
|
||||
"Adds A Tag to A Subscriber.": "登録者にタグを追加します。",
|
||||
"Updates an existing subscriber.": "既存の購読者を更新します。",
|
||||
"Finds a subscriber by their email address.": "メールアドレスから購読者を検索します。",
|
||||
"Gets the details of a subscriber.": "購読者の詳細を取得します。",
|
||||
"Gets the details of a campaign.": "キャンペーンの詳細を取得します。",
|
||||
"List": "リスト",
|
||||
"List Fields": "リストフィールド",
|
||||
"Tags": "タグ",
|
||||
"Subscriber ID": "購読者ID",
|
||||
"Email": "Eメールアドレス",
|
||||
"Campaign": "キャンペーン",
|
||||
"Add one or more tags you would like to add to this subscriber.": "この購読者に追加したいタグを1つ以上追加してください。",
|
||||
"The ID of the subscriber you want to add the tag to.": "タグを追加したい購読者のID。",
|
||||
"The ID of the subscriber you want to update.": "更新したい購読者のID。",
|
||||
"The ID of the subscriber you want to get the details for.": "詳細を取得したい購読者のID。",
|
||||
"Subscriber Added": "購読者が追加されました",
|
||||
"Unsubscribed Subscriber": "購読解除された購読",
|
||||
"Tagged Subscriber": "タグ付けされた購読",
|
||||
"Triggers when subscriber is signed up or confirmed.": "登録者がサインアップまたは確認されたときに発生します。",
|
||||
"Triggers when subscriber is unsubscribed.": "購読者が購読解除されたときにトリガーします。",
|
||||
"Trigers when subscriber is tagged with a tag.": "サブスクライバーがタグでタグ付けされたときにトリガーされます。",
|
||||
"Tag Name": "タグ名",
|
||||
"An Arbitrary name you would like to call this tag.": "このタグを呼び出す任意の名前です。"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "All-in-één e-mailmarketing en automatiseringsplatform",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Geef de openbare sleutel van je applicatie door er een te genereren in je zagomail.com/gebruiker/api-keys/index.",
|
||||
"Create Subscriber": "Ontvanger aanmaken",
|
||||
"Tag Subscriber": "Tag Abonnee",
|
||||
"Update Subscriber": "Abonnee bijwerken",
|
||||
"Search Subscriber": "Zoek abonnee",
|
||||
"Get Subscriber": "Ontvang abonnee",
|
||||
"Get Campaign": "Verkrijg campagne",
|
||||
"Creates a new subscriber in a list.": "Maakt een nieuwe abonnee aan in een lijst.",
|
||||
"Adds A Tag to A Subscriber.": "Voegt een Tag toe aan een abonnee.",
|
||||
"Updates an existing subscriber.": "Werkt een bestaande abonnee bij.",
|
||||
"Finds a subscriber by their email address.": "Vindt een abonnee met zijn e-mailadres.",
|
||||
"Gets the details of a subscriber.": "Haalt de details van een abonnee op.",
|
||||
"Gets the details of a campaign.": "Haalt de details van een campagne op.",
|
||||
"List": "Klantenlijst",
|
||||
"List Fields": "Lijst velden",
|
||||
"Tags": "Labels",
|
||||
"Subscriber ID": "Abonnee ID",
|
||||
"Email": "E-mail",
|
||||
"Campaign": "Campagne",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Voeg een of meer tags toe die je aan deze ontvanger wilt toevoegen.",
|
||||
"The ID of the subscriber you want to add the tag to.": "Het ID van de abonnee waar u de tag aan wilt toevoegen.",
|
||||
"The ID of the subscriber you want to update.": "Het ID van de abonnee die u wilt bijwerken.",
|
||||
"The ID of the subscriber you want to get the details for.": "Het ID van de abonnee waarvoor u de gegevens wilt ontvangen.",
|
||||
"Subscriber Added": "Abonnee toegevoegd",
|
||||
"Unsubscribed Subscriber": "Abonnee uitgeschreven",
|
||||
"Tagged Subscriber": "Getagde abonnee",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Triggert wanneer de abonnee is aangemeld of bevestigd.",
|
||||
"Triggers when subscriber is unsubscribed.": "Triggert wanneer abonnee is uitgeschreven.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Trigers wanneer een abonnee een tag heeft.",
|
||||
"Tag Name": "Tag naam",
|
||||
"An Arbitrary name you would like to call this tag.": "Een willekeurige naam die je deze tag wilt aanroepen."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "Plataforma de e-mail de marketing e automação completa",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Por favor, forneça a chave pública do seu aplicativo gerando uma nas configurações da conta do zagomail ou acessando diretamente https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Criar Assinante",
|
||||
"Tag Subscriber": "Assinante de Tag",
|
||||
"Update Subscriber": "Atualizar Assinante",
|
||||
"Search Subscriber": "Pesquisar Assinante",
|
||||
"Get Subscriber": "Obter Assinante",
|
||||
"Get Campaign": "Obter Campanha",
|
||||
"Creates a new subscriber in a list.": "Cria um novo assinante em uma lista.",
|
||||
"Adds A Tag to A Subscriber.": "Adiciona uma etiqueta a um assinante.",
|
||||
"Updates an existing subscriber.": "Atualiza um assinante existente.",
|
||||
"Finds a subscriber by their email address.": "Localiza um assinante com seu endereço de e-mail.",
|
||||
"Gets the details of a subscriber.": "Obtém os detalhes de um assinante.",
|
||||
"Gets the details of a campaign.": "Obtém os detalhes de uma campanha.",
|
||||
"List": "Lista",
|
||||
"List Fields": "Lista de Campos",
|
||||
"Tags": "Etiquetas",
|
||||
"Subscriber ID": "Identificação do assinante",
|
||||
"Email": "e-mail",
|
||||
"Campaign": "Campanha",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Adicionar uma ou mais tags que você gostaria de adicionar a este inscrito.",
|
||||
"The ID of the subscriber you want to add the tag to.": "O ID do assinante ao qual você deseja adicionar o marcador.",
|
||||
"The ID of the subscriber you want to update.": "A ID do assinante que você deseja atualizar.",
|
||||
"The ID of the subscriber you want to get the details for.": "O ID do assinante para o qual você deseja obter os detalhes.",
|
||||
"Subscriber Added": "Inscrito Adicionado",
|
||||
"Unsubscribed Subscriber": "Assinante não inscrito",
|
||||
"Tagged Subscriber": "Assinante Marcado",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Dispara quando o assinante for registrado ou confirmado.",
|
||||
"Triggers when subscriber is unsubscribed.": "Dispara quando o assinante for cancelado.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Dispara quando um assinante é marcado com uma tag.",
|
||||
"Tag Name": "Nome do Marcador",
|
||||
"An Arbitrary name you would like to call this tag.": "Um nome arbitrário que você gostaria de chamar esta tag."
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"Zagomail": "Zagomail",
|
||||
"All-in-one email marketing and automation platform": "Все в одном почтовом маркетинге и платформе автоматизации",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Пожалуйста, предоставьте публичный ключ вашего приложения, создав его в настройках аккаунта zagomail или непосредственно посетив https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Создать подписчика",
|
||||
"Tag Subscriber": "Подписчик тегов",
|
||||
"Update Subscriber": "Обновить подписчика",
|
||||
"Search Subscriber": "Поиск Абонента",
|
||||
"Get Subscriber": "Получить подписчика",
|
||||
"Get Campaign": "Получить Кампанию",
|
||||
"Creates a new subscriber in a list.": "Создает нового подписчика в списке.",
|
||||
"Adds A Tag to A Subscriber.": "Добавляет тег подписчику.",
|
||||
"Updates an existing subscriber.": "Обновление существующего подписчика.",
|
||||
"Finds a subscriber by their email address.": "Находит подписчика по их электронному адресу.",
|
||||
"Gets the details of a subscriber.": "Получает информацию о подписчике.",
|
||||
"Gets the details of a campaign.": "Возвращает детали кампании.",
|
||||
"List": "Список",
|
||||
"List Fields": "Поля списка",
|
||||
"Tags": "Теги",
|
||||
"Subscriber ID": "ID подписчика",
|
||||
"Email": "Почта",
|
||||
"Campaign": "Кампания",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Добавьте один или несколько тегов, которые вы хотите добавить к этому подписчику.",
|
||||
"The ID of the subscriber you want to add the tag to.": "ID подписчика, к которому вы хотите добавить тэг.",
|
||||
"The ID of the subscriber you want to update.": "ID подписчика, который вы хотите обновить.",
|
||||
"The ID of the subscriber you want to get the details for.": "ID подписчика, для которого вы хотите получить информацию.",
|
||||
"Subscriber Added": "Абонент добавлен",
|
||||
"Unsubscribed Subscriber": "Подписчик отписан",
|
||||
"Tagged Subscriber": "Отмеченный подписчик",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Включает при регистрации или подтверждении подписчика.",
|
||||
"Triggers when subscriber is unsubscribed.": "Триггеры при отписке от подписки.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Триггеры, когда подписчик помечен меткой.",
|
||||
"Tag Name": "Имя тега",
|
||||
"An Arbitrary name you would like to call this tag.": "Произвольное имя, которое вы хотите назвать этот тег."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "All-in-one email marketing and automation platform",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Create Subscriber",
|
||||
"Tag Subscriber": "Tag Subscriber",
|
||||
"Update Subscriber": "Update Subscriber",
|
||||
"Search Subscriber": "Search Subscriber",
|
||||
"Get Subscriber": "Get Subscriber",
|
||||
"Get Campaign": "Get Campaign",
|
||||
"Creates a new subscriber in a list.": "Creates a new subscriber in a list.",
|
||||
"Adds A Tag to A Subscriber.": "Adds A Tag to A Subscriber.",
|
||||
"Updates an existing subscriber.": "Updates an existing subscriber.",
|
||||
"Finds a subscriber by their email address.": "Finds a subscriber by their email address.",
|
||||
"Gets the details of a subscriber.": "Gets the details of a subscriber.",
|
||||
"Gets the details of a campaign.": "Gets the details of a campaign.",
|
||||
"List": "List",
|
||||
"List Fields": "List Fields",
|
||||
"Tags": "Tags",
|
||||
"Subscriber ID": "Subscriber ID",
|
||||
"Email": "Email",
|
||||
"Campaign": "Campaign",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Add one or more tags you would like to add to this subscriber.",
|
||||
"The ID of the subscriber you want to add the tag to.": "The ID of the subscriber you want to add the tag to.",
|
||||
"The ID of the subscriber you want to update.": "The ID of the subscriber you want to update.",
|
||||
"The ID of the subscriber you want to get the details for.": "The ID of the subscriber you want to get the details for.",
|
||||
"Subscriber Added": "Subscriber Added",
|
||||
"Unsubscribed Subscriber": "Unsubscribed Subscriber",
|
||||
"Tagged Subscriber": "Tagged Subscriber",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Triggers when subscriber is signed up or confirmed.",
|
||||
"Triggers when subscriber is unsubscribed.": "Triggers when subscriber is unsubscribed.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Trigers when subscriber is tagged with a tag.",
|
||||
"Tag Name": "Tag Name",
|
||||
"An Arbitrary name you would like to call this tag.": "An Arbitrary name you would like to call this tag."
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"Zagomail": "Zagomail",
|
||||
"All-in-one email marketing and automation platform": "All-in-one email marketing and automation platform",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Create Subscriber",
|
||||
"Tag Subscriber": "Tag Subscriber",
|
||||
"Update Subscriber": "Update Subscriber",
|
||||
"Search Subscriber": "Search Subscriber",
|
||||
"Get Subscriber": "Get Subscriber",
|
||||
"Get Campaign": "Get Campaign",
|
||||
"Creates a new subscriber in a list.": "Creates a new subscriber in a list.",
|
||||
"Adds A Tag to A Subscriber.": "Adds A Tag to A Subscriber.",
|
||||
"Updates an existing subscriber.": "Updates an existing subscriber.",
|
||||
"Finds a subscriber by their email address.": "Finds a subscriber by their email address.",
|
||||
"Gets the details of a subscriber.": "Gets the details of a subscriber.",
|
||||
"Gets the details of a campaign.": "Gets the details of a campaign.",
|
||||
"List": "List",
|
||||
"List Fields": "List Fields",
|
||||
"Tags": "Tags",
|
||||
"Subscriber ID": "Subscriber ID",
|
||||
"Email": "Email",
|
||||
"Campaign": "Campaign",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Add one or more tags you would like to add to this subscriber.",
|
||||
"The ID of the subscriber you want to add the tag to.": "The ID of the subscriber you want to add the tag to.",
|
||||
"The ID of the subscriber you want to update.": "The ID of the subscriber you want to update.",
|
||||
"The ID of the subscriber you want to get the details for.": "The ID of the subscriber you want to get the details for.",
|
||||
"Subscriber Added": "Subscriber Added",
|
||||
"Unsubscribed Subscriber": "Unsubscribed Subscriber",
|
||||
"Tagged Subscriber": "Tagged Subscriber",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Triggers when subscriber is signed up or confirmed.",
|
||||
"Triggers when subscriber is unsubscribed.": "Triggers when subscriber is unsubscribed.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Trigers when subscriber is tagged with a tag.",
|
||||
"Tag Name": "Tag Name",
|
||||
"An Arbitrary name you would like to call this tag.": "An Arbitrary name you would like to call this tag."
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"All-in-one email marketing and automation platform": "All-in-one email marketing and automation platform",
|
||||
"Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.": "Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.",
|
||||
"Create Subscriber": "Create Subscriber",
|
||||
"Tag Subscriber": "Tag Subscriber",
|
||||
"Update Subscriber": "Update Subscriber",
|
||||
"Search Subscriber": "Search Subscriber",
|
||||
"Get Subscriber": "Get Subscriber",
|
||||
"Get Campaign": "Get Campaign",
|
||||
"Creates a new subscriber in a list.": "Creates a new subscriber in a list.",
|
||||
"Adds A Tag to A Subscriber.": "Adds A Tag to A Subscriber.",
|
||||
"Updates an existing subscriber.": "Updates an existing subscriber.",
|
||||
"Finds a subscriber by their email address.": "Finds a subscriber by their email address.",
|
||||
"Gets the details of a subscriber.": "Gets the details of a subscriber.",
|
||||
"Gets the details of a campaign.": "Gets the details of a campaign.",
|
||||
"List": "List",
|
||||
"List Fields": "List Fields",
|
||||
"Tags": "标签",
|
||||
"Subscriber ID": "Subscriber ID",
|
||||
"Email": "电子邮件地址",
|
||||
"Campaign": "Campaign",
|
||||
"Add one or more tags you would like to add to this subscriber.": "Add one or more tags you would like to add to this subscriber.",
|
||||
"The ID of the subscriber you want to add the tag to.": "The ID of the subscriber you want to add the tag to.",
|
||||
"The ID of the subscriber you want to update.": "The ID of the subscriber you want to update.",
|
||||
"The ID of the subscriber you want to get the details for.": "The ID of the subscriber you want to get the details for.",
|
||||
"Subscriber Added": "Subscriber Added",
|
||||
"Unsubscribed Subscriber": "Unsubscribed Subscriber",
|
||||
"Tagged Subscriber": "Tagged Subscriber",
|
||||
"Triggers when subscriber is signed up or confirmed.": "Triggers when subscriber is signed up or confirmed.",
|
||||
"Triggers when subscriber is unsubscribed.": "Triggers when subscriber is unsubscribed.",
|
||||
"Trigers when subscriber is tagged with a tag.": "Trigers when subscriber is tagged with a tag.",
|
||||
"Tag Name": "Tag Name",
|
||||
"An Arbitrary name you would like to call this tag.": "An Arbitrary name you would like to call this tag."
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { addedSubscriber } from './lib/triggers/added-subscriber';
|
||||
import { unsubscribedSubscriber } from './lib/triggers/unsubscribed-subscriber';
|
||||
import { taggedSubscriber } from './lib/triggers/tagged-subscriber';
|
||||
import { createSubscriber } from './lib/actions/create-subscriber';
|
||||
import { tagSubscriber } from './lib/actions/tag-subscriber';
|
||||
import { updateSubscriber } from './lib/actions/update-subscriber';
|
||||
import { searchSubscriberByEmail } from './lib/actions/search-subscriber-by-email';
|
||||
import { getSubscriberDetails } from './lib/actions/get-subscriber-details';
|
||||
import { getCampaignDetails } from './lib/actions/get-campaign-details';
|
||||
import { zagoMailApiService } from './lib/common/request';
|
||||
|
||||
export const zagomailAuth = PieceAuth.SecretText({
|
||||
displayName: 'Application Public Key',
|
||||
required: true,
|
||||
description:
|
||||
'Please provide your application public key by generating one in your zagomail account settings or by directly visiting https://app.zagomail.com/user/api-keys/index.',
|
||||
validate: async ({ auth }) => {
|
||||
try {
|
||||
const response = await zagoMailApiService.getAllLists(auth);
|
||||
|
||||
if (response.status !== 'success') {
|
||||
return {
|
||||
valid: false,
|
||||
error: 'Invalid Public Key.',
|
||||
};
|
||||
}
|
||||
return {
|
||||
valid: true,
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
valid: false,
|
||||
error: 'Invalid Public Key.',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export const zagomail = createPiece({
|
||||
displayName: 'Zagomail',
|
||||
description: 'All-in-one email marketing and automation platform',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/zagomail.png',
|
||||
authors: ['gs03dev'],
|
||||
auth: zagomailAuth,
|
||||
actions: [
|
||||
createSubscriber,
|
||||
tagSubscriber,
|
||||
updateSubscriber,
|
||||
|
||||
searchSubscriberByEmail,
|
||||
|
||||
getSubscriberDetails,
|
||||
getCampaignDetails,
|
||||
],
|
||||
triggers: [addedSubscriber, unsubscribedSubscriber, taggedSubscriber],
|
||||
categories: [PieceCategory.MARKETING],
|
||||
});
|
||||
@@ -0,0 +1,41 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { listFields, listUId } from '../common/props';
|
||||
import { isNil } from '@activepieces/shared';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const createSubscriber = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'createSubscriber',
|
||||
displayName: 'Create Subscriber',
|
||||
description: 'Creates a new subscriber in a list.',
|
||||
props: {
|
||||
listUId: listUId,
|
||||
fields: listFields(true),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const listUId = propsValue.listUId;
|
||||
const listFields = propsValue.fields ?? {};
|
||||
|
||||
const payload: Record<string, any> = {};
|
||||
|
||||
for (const [key, value] of Object.entries(listFields)) {
|
||||
if (isNil(value) || value === '') continue;
|
||||
|
||||
const [field, type] = key.split(':::');
|
||||
|
||||
let formattedValue = value;
|
||||
|
||||
if (type === 'Date') {
|
||||
formattedValue = dayjs(value).format('YYYY-MM-DD');
|
||||
} else if (type === 'Datetime') {
|
||||
formattedValue = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
|
||||
payload[field] = formattedValue;
|
||||
}
|
||||
|
||||
return await zagoMailApiService.createSubscriber(auth.secret_text, listUId, payload);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { campaignUid } from '../common/props';
|
||||
|
||||
export const getCampaignDetails = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'getCampaignDetails',
|
||||
displayName: 'Get Campaign',
|
||||
description: 'Gets the details of a campaign.',
|
||||
props: {
|
||||
campaignUid: campaignUid,
|
||||
},
|
||||
async run({propsValue, auth}) {
|
||||
const campaignUid = propsValue.campaignUid;
|
||||
|
||||
return await zagoMailApiService.getCampaignDetails(auth.secret_text, campaignUid)
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { listUId } from '../common/props';
|
||||
|
||||
export const getSubscriberDetails = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'getSubscriberDetails',
|
||||
displayName: 'Get Subscriber',
|
||||
description: 'Gets the details of a subscriber.',
|
||||
props: {
|
||||
listUId: listUId,
|
||||
subscriberUid: Property.ShortText({
|
||||
displayName: 'Subscriber ID',
|
||||
description: 'The ID of the subscriber you want to get the details for.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const listUId = propsValue.listUId;
|
||||
const subsriberUid = propsValue.subscriberUid;
|
||||
|
||||
return await zagoMailApiService.getSubscriberDetails(
|
||||
auth.secret_text,
|
||||
listUId,
|
||||
subsriberUid
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { listUId } from '../common/props';
|
||||
|
||||
export const searchSubscriberByEmail = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'searchSubscriberByEmail',
|
||||
displayName: 'Search Subscriber',
|
||||
description: 'Finds a subscriber by their email address.',
|
||||
props: {
|
||||
listUId: listUId,
|
||||
email: Property.ShortText({
|
||||
displayName: 'Email',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const listUId = propsValue.listUId;
|
||||
const email = propsValue.email;
|
||||
|
||||
const response = await zagoMailApiService.searchSubscriberByEmail(
|
||||
auth.secret_text,
|
||||
listUId,
|
||||
{
|
||||
email,
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
found: response.status === 'success',
|
||||
result: response.data ?? null,
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { Tag } from '../common/constants';
|
||||
import { listUId } from '../common/props';
|
||||
|
||||
export const tagSubscriber = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'tagSubscriber',
|
||||
displayName: 'Tag Subscriber',
|
||||
description: 'Adds A Tag to A Subscriber.',
|
||||
props: {
|
||||
tags: Property.Array({
|
||||
displayName: 'Tags',
|
||||
description:
|
||||
'Add one or more tags you would like to add to this subscriber.',
|
||||
required: true,
|
||||
}),
|
||||
listUId:listUId,
|
||||
subscriberUid: Property.ShortText({
|
||||
displayName: 'Subscriber ID',
|
||||
description: 'The ID of the subscriber you want to add the tag to.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const providedTags = propsValue.tags as string[];
|
||||
|
||||
if (providedTags.length < 1)
|
||||
throw new Error('You must provide atleast one tag');
|
||||
|
||||
const tags = (await zagoMailApiService.getTags(auth.secret_text)) as Tag[];
|
||||
|
||||
return await Promise.all(
|
||||
providedTags.map(async (providedTag) => {
|
||||
const tagExists = tags.find((t) => t.ztag_name === providedTag);
|
||||
|
||||
let tag;
|
||||
|
||||
if (tagExists) {
|
||||
tag = tagExists;
|
||||
} else {
|
||||
tag = (await zagoMailApiService.createTag(auth.secret_text, providedTag)) as Tag;
|
||||
}
|
||||
|
||||
return await zagoMailApiService.addTagToSubscriber(auth.secret_text, {
|
||||
listUid: propsValue.listUId,
|
||||
subscriberUid: propsValue.subscriberUid,
|
||||
tagId: tag.ztag_id,
|
||||
});
|
||||
})
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { listUId } from '../common/props';
|
||||
|
||||
export const unsubscribeSubscriber = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'unsubscribeSubscriber',
|
||||
displayName: 'Unsubscribe Subscriber',
|
||||
description: 'Unsubscribes a subscriber.',
|
||||
props: {
|
||||
listUId: listUId,
|
||||
subscriberUid: Property.ShortText({
|
||||
displayName: 'Subscriber ID',
|
||||
description: 'The ID of the subscriber you want to unsubscribe.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const listUId = propsValue.listUId;
|
||||
const subsriberUid = propsValue.subscriberUid;
|
||||
|
||||
return await zagoMailApiService.unsubscribeSubscriber(
|
||||
auth.secret_text,
|
||||
listUId,
|
||||
subsriberUid
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { listFields, listUId } from '../common/props';
|
||||
import { isNil } from '@activepieces/shared';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const updateSubscriber = createAction({
|
||||
auth: zagomailAuth,
|
||||
name: 'updateSubscriber',
|
||||
displayName: 'Update Subscriber',
|
||||
description: 'Updates an existing subscriber.',
|
||||
props: {
|
||||
listUId: listUId,
|
||||
subsriberUid: Property.ShortText({
|
||||
displayName: 'Subscriber ID',
|
||||
description: 'The ID of the subscriber you want to update.',
|
||||
required: true,
|
||||
}),
|
||||
fields: listFields(false),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const listUId = propsValue.listUId;
|
||||
const subsriberUid = propsValue.subsriberUid;
|
||||
const listFields = propsValue.fields ?? {};
|
||||
|
||||
const payload: Record<string, any> = {};
|
||||
|
||||
for (const [key, value] of Object.entries(listFields)) {
|
||||
if (isNil(value) || value === '') continue;
|
||||
|
||||
const [field, type] = key.split(':::');
|
||||
|
||||
let formattedValue = value;
|
||||
|
||||
if (type === 'Date') {
|
||||
formattedValue = dayjs(value).format('YYYY-MM-DD');
|
||||
} else if (type === 'Datetime') {
|
||||
formattedValue = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
|
||||
payload[field] = formattedValue;
|
||||
}
|
||||
|
||||
return await zagoMailApiService.updateSubscriber(
|
||||
auth.secret_text,
|
||||
listUId,
|
||||
subsriberUid,
|
||||
payload
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
export const BASE_URL = 'https://api.zagomail.com';
|
||||
|
||||
export const API_ENDPOINTS = {
|
||||
CREATE_SUBSCRIBER: '/lists/subscriber-create',
|
||||
UPDATE_SUBSCRIBER: '/lists/subscriber-update',
|
||||
UNSUBSCRIBE_SUBSCRIBER: '/lists/unsubscribe-subscriber',
|
||||
SEARCH_SUBSCRIBER_BY_EMAIL: '/lists/search-by-email',
|
||||
GET_SUBSCRIBER: '/lists/get-subscriber',
|
||||
GET_CAMPAIGNS: '/campaigns/get-stats',
|
||||
ADD_TAG_TO_SUBSCRIBER: '/lists/add-tag',
|
||||
GET_TAGS: '/tags/get-tags',
|
||||
CREATE_TAG: '/tags/create-tag',
|
||||
CREATE_WEBHOOK: '/webhooks/create',
|
||||
DELETE_WEBHOOK: '/webhooks/delete',
|
||||
LIST_ALL_LISTS : '/lists/all-lists',
|
||||
GET_LIST_FIELDS:'/lists/get-fields'
|
||||
};
|
||||
|
||||
|
||||
export type WebhookResponse = {
|
||||
id: string;
|
||||
event_type: string;
|
||||
target_url: string;
|
||||
form_id: string | null;
|
||||
tag_id: string | null;
|
||||
link_url: string | null;
|
||||
};
|
||||
|
||||
export type StoredWebhookId = {
|
||||
webhookId: string;
|
||||
};
|
||||
|
||||
export interface Tag {
|
||||
ztag_id: string;
|
||||
ztag_name: string;
|
||||
customer_id: number;
|
||||
created_on: Date;
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
import { DynamicPropsValue, Property } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from './request';
|
||||
import { zagomailAuth } from '../..';
|
||||
|
||||
export const listUId = Property.Dropdown({
|
||||
auth: zagomailAuth,
|
||||
displayName: 'List',
|
||||
refreshers: [],
|
||||
required: true,
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please connect your account first.',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
const response = await zagoMailApiService.getAllLists(auth.secret_text);
|
||||
|
||||
const lists = response.data as {
|
||||
records: Array<{ general: { list_uid: string; name: string } }>;
|
||||
};
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: lists.records.map((list) => ({
|
||||
label: list.general.name,
|
||||
value: list.general.list_uid,
|
||||
})),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export const campaignUid = Property.Dropdown({
|
||||
auth: zagomailAuth,
|
||||
displayName: 'Campaign',
|
||||
refreshers: [],
|
||||
required: true,
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please connect your account first.',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
const response = await zagoMailApiService.getCampaigns(auth.secret_text);
|
||||
|
||||
const campaigns = response as {
|
||||
records: Array<{ campaign_uid: string; name: string }>;
|
||||
};
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: campaigns.records.map((campaign) => ({
|
||||
label: campaign.name,
|
||||
value: campaign.campaign_uid,
|
||||
})),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export const listFields = (isCreate=false) => Property.DynamicProperties({
|
||||
auth: zagomailAuth,
|
||||
displayName: 'List Fields',
|
||||
refreshers: ['listUId'],
|
||||
required: true,
|
||||
props: async ({ auth, listUId }) => {
|
||||
if (!auth || !listUId) return {};
|
||||
|
||||
const fields: DynamicPropsValue = {};
|
||||
|
||||
const response = await zagoMailApiService.getListFields(
|
||||
auth.secret_text,
|
||||
listUId as unknown as string,
|
||||
);
|
||||
|
||||
const customFields = response as {
|
||||
records: { tag: string; label: string; required: string; type: { name: string } }[];
|
||||
};
|
||||
|
||||
for (const field of customFields.records) {
|
||||
switch (field.type.name) {
|
||||
case 'Text':
|
||||
case 'Country':
|
||||
case 'State':
|
||||
fields[`${field.tag}:::${field.type.name}`] = Property.ShortText({
|
||||
displayName: field.label,
|
||||
required: field.required === 'yes' && isCreate,
|
||||
});
|
||||
break;
|
||||
case 'Date':
|
||||
case 'Datetime':
|
||||
fields[`${field.tag}:::${field.type.name}`] = Property.DateTime({
|
||||
displayName: field.label,
|
||||
required: field.required === 'yes' && isCreate,
|
||||
});
|
||||
break;
|
||||
case 'Textarea':
|
||||
fields[`${field.tag}:::${field.type.name}`] = Property.LongText({
|
||||
displayName: field.label,
|
||||
required: field.required === 'yes' && isCreate,
|
||||
});
|
||||
break;
|
||||
case 'Checkbox':
|
||||
fields[`${field.tag}:::${field.type.name}`] = Property.StaticDropdown({
|
||||
displayName: field.label,
|
||||
required: field.required === 'yes' && isCreate,
|
||||
options: {
|
||||
disabled: false,
|
||||
options: [
|
||||
{ label: 'Yes', value: '1' },
|
||||
{ label: 'No', value: '0' },
|
||||
],
|
||||
},
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
return fields;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,225 @@
|
||||
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
|
||||
import { API_ENDPOINTS, BASE_URL } from './constants';
|
||||
|
||||
async function fireHttpRequest({
|
||||
method,
|
||||
path,
|
||||
body,
|
||||
}: {
|
||||
method: HttpMethod;
|
||||
path: string;
|
||||
body?: unknown;
|
||||
}) {
|
||||
return await httpClient.sendRequest({
|
||||
method,
|
||||
url: `${BASE_URL}${path}`,
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body,
|
||||
}).then(res => res.body)
|
||||
}
|
||||
|
||||
export const zagoMailApiService = {
|
||||
createSubscriber: async (
|
||||
publicKey: string,
|
||||
listUid: string,
|
||||
body: any
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.CREATE_SUBSCRIBER}?list_uid=${listUid}`,
|
||||
body: {
|
||||
...body,
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data.record;
|
||||
},
|
||||
updateSubscriber: async (
|
||||
publicKey: string,
|
||||
listUid: string,
|
||||
subscriberUid: string,
|
||||
body: any
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.UPDATE_SUBSCRIBER}?list_uid=${listUid}&subscriber_uid=${subscriberUid}`,
|
||||
body: {
|
||||
...body,
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data.record;
|
||||
},
|
||||
unsubscribeSubscriber: async (
|
||||
publicKey: string,
|
||||
listUid: string,
|
||||
subscriberUid: string
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.UNSUBSCRIBE_SUBSCRIBER}?list_uid=${listUid}&subscriber_uid=${subscriberUid}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data;
|
||||
},
|
||||
searchSubscriberByEmail: async (
|
||||
publicKey: string,
|
||||
listUid: string,
|
||||
body: {
|
||||
email: string;
|
||||
}
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.SEARCH_SUBSCRIBER_BY_EMAIL}?list_uid=${listUid}`,
|
||||
body: {
|
||||
...body,
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
getSubscriberDetails: async (
|
||||
publicKey: string,
|
||||
listUid: string,
|
||||
subscriberUid: string
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.GET,
|
||||
path: `${API_ENDPOINTS.GET_SUBSCRIBER}?list_uid=${listUid}&subscriber_uid=${subscriberUid}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data;
|
||||
},
|
||||
getCampaignDetails: async (
|
||||
publicKey: string,
|
||||
campaignUid: string,
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.GET,
|
||||
path: `${API_ENDPOINTS.GET_CAMPAIGNS}?campaign_uid=${campaignUid}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.data;
|
||||
},
|
||||
addTagToSubscriber: async (
|
||||
publicKey: string,
|
||||
{
|
||||
listUid,
|
||||
tagId,
|
||||
subscriberUid,
|
||||
}: { listUid: string; subscriberUid: string; tagId: string }
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.ADD_TAG_TO_SUBSCRIBER}?ztag_id=${tagId}&list_uid=${listUid}&subscriber_uid=${subscriberUid}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
createTag: async (publicKey: string, tagName: string) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.CREATE_TAG}?tag_name=${tagName}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return response.tag;
|
||||
},
|
||||
getTags: async (publicKey: string) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.GET,
|
||||
path: API_ENDPOINTS.GET_TAGS,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
})
|
||||
|
||||
return response.tags;
|
||||
},
|
||||
createWebhook: async (
|
||||
publicKey: string,
|
||||
webhookUrl: string,
|
||||
event_type: 'subscriber-activate' | 'subscriber-unsubscribe' | 'tag-added',
|
||||
extraParams?: {
|
||||
formID?: string;
|
||||
tagID?: string;
|
||||
linkUrl?: string;
|
||||
}
|
||||
) => {
|
||||
const response = await fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: API_ENDPOINTS.CREATE_WEBHOOK,
|
||||
body: {
|
||||
publicKey,
|
||||
event_type,
|
||||
target_url: webhookUrl,
|
||||
...extraParams,
|
||||
},
|
||||
});
|
||||
|
||||
return response.webhook;
|
||||
},
|
||||
deleteWebhook: async (publicKey: string, webhookId: string) => {
|
||||
return fireHttpRequest({
|
||||
method: HttpMethod.POST,
|
||||
path: `${API_ENDPOINTS.DELETE_WEBHOOK}?id=${webhookId}`,
|
||||
body: {
|
||||
publicKey,
|
||||
},
|
||||
});
|
||||
},
|
||||
getAllLists:async (publicKey:string) =>{
|
||||
const response = await fireHttpRequest({
|
||||
method:HttpMethod.GET,
|
||||
path:`${API_ENDPOINTS.LIST_ALL_LISTS}`,
|
||||
body:{
|
||||
publicKey
|
||||
}
|
||||
})
|
||||
|
||||
return response;
|
||||
},
|
||||
getListFields:async (publicKey:string,listUid:string)=>{
|
||||
const response = await fireHttpRequest({
|
||||
method:HttpMethod.GET,
|
||||
path:`${API_ENDPOINTS.GET_LIST_FIELDS}?list_uid=${listUid}`,
|
||||
body:{
|
||||
publicKey
|
||||
}
|
||||
})
|
||||
|
||||
return response.data
|
||||
},
|
||||
getCampaigns:async (publicKey:string)=>{
|
||||
const response = await fireHttpRequest({
|
||||
method:HttpMethod.GET,
|
||||
path:`${API_ENDPOINTS.GET_CAMPAIGNS}`,
|
||||
body:{
|
||||
publicKey
|
||||
}
|
||||
})
|
||||
|
||||
return response.data
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
createTrigger,
|
||||
TriggerStrategy,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { isNil } from '@activepieces/shared';
|
||||
import { zagomailAuth } from '../../index';
|
||||
import { zagoMailApiService, } from '../common/request';
|
||||
import { StoredWebhookId, WebhookResponse } from '../common/constants';
|
||||
|
||||
const CACHE_KEY = 'zagomail_added_subscriber_trigger';
|
||||
|
||||
export const addedSubscriber = createTrigger({
|
||||
auth: zagomailAuth,
|
||||
name: 'addedSubscriber',
|
||||
displayName: 'Subscriber Added',
|
||||
description: 'Triggers when subscriber is signed up or confirmed.',
|
||||
props: {},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
sampleData: {
|
||||
action: 'subscriber-activate',
|
||||
subscriber_uid: 'dg307jyx044e1',
|
||||
list_uid: 'or449cjkqqfb2',
|
||||
email: 'gs03dev@gmail.com',
|
||||
status: 'confirmed',
|
||||
created_at: '2025-05-11 08:26:16',
|
||||
custom_fields: {
|
||||
FNAME: 'gs03',
|
||||
LNAME: 'dev',
|
||||
},
|
||||
},
|
||||
async onEnable(context) {
|
||||
const response = (await zagoMailApiService.createWebhook(
|
||||
context.auth.secret_text,
|
||||
context.webhookUrl,
|
||||
'subscriber-activate'
|
||||
)) as WebhookResponse;
|
||||
|
||||
await context.store.put<StoredWebhookId>(CACHE_KEY, {
|
||||
webhookId: response.id,
|
||||
});
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhook = await context.store.get<StoredWebhookId>(CACHE_KEY);
|
||||
if (!isNil(webhook) && !isNil(webhook.webhookId)) {
|
||||
await zagoMailApiService.deleteWebhook(context.auth.secret_text, webhook.webhookId);
|
||||
}
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,76 @@
|
||||
import { zagomailAuth } from '../../';
|
||||
import {
|
||||
createTrigger,
|
||||
Property,
|
||||
TriggerStrategy,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { StoredWebhookId, Tag, WebhookResponse } from '../common/constants';
|
||||
import { isNil } from '@activepieces/shared';
|
||||
|
||||
const CACHE_KEY = 'zagomail_tagged_subscriber_trigger';
|
||||
|
||||
export const taggedSubscriber = createTrigger({
|
||||
auth: zagomailAuth,
|
||||
name: 'taggedSubscriber',
|
||||
displayName: 'Tagged Subscriber',
|
||||
description: 'Trigers when subscriber is tagged with a tag.',
|
||||
props: {
|
||||
tagName: Property.ShortText({
|
||||
displayName: 'Tag Name',
|
||||
description: 'An Arbitrary name you would like to call this tag.',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
sampleData: {
|
||||
action: 'tag-added',
|
||||
subscriber_uid: 'dg307jyx044e1',
|
||||
list_uid: 'or449cjkqqfb2',
|
||||
tagID: '38185',
|
||||
email: 'gs03dev@gmail.com',
|
||||
status: 'confirmed',
|
||||
created_at: '2025-05-11 08:26:16',
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
const tagName = context.propsValue.tagName;
|
||||
|
||||
const tags = (await zagoMailApiService.getTags(context.auth.secret_text)) as Tag[];
|
||||
|
||||
const tagExists = tags.find((t) => t.ztag_name === tagName);
|
||||
|
||||
let tag;
|
||||
|
||||
if (tagExists) {
|
||||
tag = tagExists;
|
||||
} else {
|
||||
tag = (await zagoMailApiService.createTag(context.auth.secret_text, tagName)) as Tag;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = (await zagoMailApiService.createWebhook(
|
||||
context.auth.secret_text,
|
||||
context.webhookUrl,
|
||||
'tag-added',
|
||||
{
|
||||
tagID: tag.ztag_id,
|
||||
}
|
||||
)) as WebhookResponse;
|
||||
|
||||
await context.store.put<StoredWebhookId>(CACHE_KEY, {
|
||||
webhookId: response.id,
|
||||
});
|
||||
} catch (err: any) {
|
||||
throw new Error(err);
|
||||
}
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhook = await context.store.get<StoredWebhookId>(CACHE_KEY);
|
||||
if (!isNil(webhook) && !isNil(webhook.webhookId)) {
|
||||
await zagoMailApiService.deleteWebhook(context.auth.secret_text, webhook.webhookId);
|
||||
}
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
import { zagomailAuth } from '../../';
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { zagoMailApiService } from '../common/request';
|
||||
import { StoredWebhookId, WebhookResponse } from '../common/constants';
|
||||
import { isNil } from '@activepieces/shared';
|
||||
|
||||
const CACHE_KEY = 'zagomail_unsubscribed_subscriber_trigger_store';
|
||||
|
||||
export const unsubscribedSubscriber = createTrigger({
|
||||
auth: zagomailAuth,
|
||||
name: 'unsubscribedSubscriber',
|
||||
displayName: 'Unsubscribed Subscriber',
|
||||
description: 'Triggers when subscriber is unsubscribed.',
|
||||
props: {},
|
||||
sampleData: {
|
||||
action: 'subscriber-unsubscribe',
|
||||
subscriber_uid: 'dg307jyx044e1',
|
||||
list_uid: 'or449cjkqqfb2',
|
||||
email: 'gs03dev@gmail.com',
|
||||
status: 'unsubscribed',
|
||||
created_at: '2025-05-11 08:26:16',
|
||||
custom_fields: {
|
||||
FNAME: 'gs03',
|
||||
LNAME: 'dev',
|
||||
},
|
||||
},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
const response = (await zagoMailApiService.createWebhook(
|
||||
context.auth.secret_text,
|
||||
context.webhookUrl,
|
||||
'subscriber-unsubscribe'
|
||||
)) as WebhookResponse;
|
||||
|
||||
await context.store.put<StoredWebhookId>(CACHE_KEY, {
|
||||
webhookId: response.id,
|
||||
});
|
||||
},
|
||||
async onDisable(context) {
|
||||
const webhook = await context.store.get<StoredWebhookId>(CACHE_KEY);
|
||||
if (!isNil(webhook) && !isNil(webhook.webhookId)) {
|
||||
await zagoMailApiService.deleteWebhook(context.auth.secret_text, webhook.webhookId);
|
||||
}
|
||||
},
|
||||
async run(context) {
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user