Skip to content

2043 - MailerLite component added #2370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ private MethodSpec createOptionsMethod(String propertyName, ClassName returnType
.addParameter(ParameterSpec.builder(
ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class),
ClassName.get(String.class)),
"dependencyPaths")
"lookupDependsOnPaths")
.build())
.addParameter(ParameterSpec.builder(String.class, "searchText")
.build())
Expand All @@ -573,7 +573,7 @@ private MethodSpec createPropertiesMethod(String propertyName) {
.addParameter(ParameterSpec.builder(
ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class),
ClassName.get(String.class)),
"dependencyPaths")
"lookupDependsOnPaths")
.build())
.addParameter(ParameterSpec.builder(Context.class, "context")
.build())
Expand Down
320 changes: 320 additions & 0 deletions docs/src/content/docs/reference/components/mailerlite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
---
title: "MailerLite"
description: "MailerLite is an intuitive email marketing platform that offers automation, landing pages, and subscriber management for businesses and creators."
---

MailerLite is an intuitive email marketing platform that offers automation, landing pages, and subscriber management for businesses and creators.


Categories: Marketing Automation


Type: mailerLite/v1

<hr />



## Connections

Version: 1


### bearer_token

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| token | API Token | STRING | API Token needed for authorization. | true |





<hr />



## Actions


### Add Subscriber to Group
Name: addSubscriberToGroup

Adding a subscriber to a selected group.

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| subscriber_id | Subscriber Email | STRING | ID of the user that will be added to the selected group. | true |
| group_id | Group ID | STRING | ID of the group to which the user will be added. | true |

#### Example JSON Structure
```json
{
"label" : "Add Subscriber to Group",
"name" : "addSubscriberToGroup",
"parameters" : {
"subscriber_id" : "",
"group_id" : ""
},
"type" : "mailerLite/v1/addSubscriberToGroup"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> {STRING\(id), STRING\(name), INTEGER\(active_count), INTEGER\(sent_count), INTEGER\(opens_count), {NUMBER\(float), STRING\(string)}\(open_rate), INTEGER\(clicks_count), {NUMBER\(float), STRING\(string)}\(click_rate), INTEGER\(unsubscribed_count), INTEGER\(unconfirmed_count), INTEGER\(bounced_count), INTEGER\(junk_count), STRING\(created_at)} </details> | |




#### Output Example
```json
{
"data" : {
"id" : "",
"name" : "",
"active_count" : 1,
"sent_count" : 1,
"opens_count" : 1,
"open_rate" : {
"float" : 0.0,
"string" : ""
},
"clicks_count" : 1,
"click_rate" : {
"float" : 0.0,
"string" : ""
},
"unsubscribed_count" : 1,
"unconfirmed_count" : 1,
"bounced_count" : 1,
"junk_count" : 1,
"created_at" : ""
}
}
```


### Create or Update Subscriber
Name: createOrUpdateSubscriber

Create new user or update an existing user.

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| email | null | STRING | The email address of the subscriber. | true |
| group_id | Group ID | STRING | ID of the group to which you want to add the subscriber to. | false |

#### Example JSON Structure
```json
{
"label" : "Create or Update Subscriber",
"name" : "createOrUpdateSubscriber",
"parameters" : {
"email" : "",
"group_id" : ""
},
"type" : "mailerLite/v1/createOrUpdateSubscriber"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> {STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)} </details> | |




#### Output Example
```json
{
"data" : {
"id" : "",
"email" : "",
"status" : "",
"source" : "",
"sent" : 1,
"opens_count" : 1,
"clicks_count" : 1,
"open_rate" : 1,
"click_rate" : 1,
"subscribed_at" : "",
"created_at" : "",
"updated_at" : "",
"fields" : [ ],
"groups" : [ ]
}
}
```


### Remove Subscriber from Group
Name: removeSubscriberFromGroup

Remove selected subscriber from the group.

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| subscriber_id | Subscriber | STRING | ID of the user that will be added to the selected group. | true |
| group_id | Group ID | STRING | ID of the group to which the user will be added. | true |

#### Example JSON Structure
```json
{
"label" : "Remove Subscriber from Group",
"name" : "removeSubscriberFromGroup",
"parameters" : {
"subscriber_id" : "",
"group_id" : ""
},
"type" : "mailerLite/v1/removeSubscriberFromGroup"
}
```

#### Output

This action does not produce any output.






## Triggers


### Subscriber Added to the Group
Name: subscriberAddedToGroup

Triggers when a subscriber is added to the group.

Type: DYNAMIC_WEBHOOK


#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> {STRING\(account_id), STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)} </details> | |




#### JSON Example
```json
{
"label" : "Subscriber Added to the Group",
"name" : "subscriberAddedToGroup",
"type" : "mailerLite/v1/subscriberAddedToGroup"
}
```


### Subscriber Created
Name: subscriberCreated

Triggers when a subscriber is created.

Type: DYNAMIC_WEBHOOK


#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> {STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), {}\(ip_address), STRING\(subscribed_at), STRING\(unsubscribed_at), STRING\(created_at), STRING\(updated_at), STRING\(deleted_at), STRING\(forget_at), []\(fields), []\(groups), STRING\(account_id)} </details> | |




#### JSON Example
```json
{
"label" : "Subscriber Created",
"name" : "subscriberCreated",
"type" : "mailerLite/v1/subscriberCreated"
}
```


### Subscriber Unsubscribed
Name: subscriberUnsubscribed

Triggers when a subscriber unsubscribes.

Type: DYNAMIC_WEBHOOK


#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> {STRING\(account_id), STRING\(id), STRING\(email), STRING\(status), STRING\(source), INTEGER\(sent), INTEGER\(opens_count), INTEGER\(clicks_count), INTEGER\(open_rate), INTEGER\(click_rate), STRING\(subscribed_at), STRING\(created_at), STRING\(updated_at), []\(fields), []\(groups)} </details> | |




#### JSON Example
```json
{
"label" : "Subscriber Unsubscribed",
"name" : "subscriberUnsubscribed",
"type" : "mailerLite/v1/subscriberUnsubscribed"
}
```


<hr />

<hr />

# Additional instructions
<hr />

1 change: 1 addition & 0 deletions server/apps/server-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ dependencies {
implementation(project(":server:libs:modules:components:keap"))
implementation(project(":server:libs:modules:components:logger"))
implementation(project(":server:libs:modules:components:mailchimp"))
implementation(project(":server:libs:modules:components:mailerlite"))
implementation(project(":server:libs:modules:components:map"))
implementation(project(":server:libs:modules:components:math-helper"))
implementation(project(":server:libs:modules:components:microsoft:microsoft-excel"))
Expand Down
1 change: 1 addition & 0 deletions server/ee/apps/worker-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ dependencies {
implementation(project(":server:libs:modules:components:keap"))
implementation(project(":server:libs:modules:components:logger"))
implementation(project(":server:libs:modules:components:mailchimp"))
implementation(project(":server:libs:modules:components:mailerlite"))
implementation(project(":server:libs:modules:components:map"))
implementation(project(":server:libs:modules:components:math-helper"))
implementation(project(":server:libs:modules:components:microsoft:microsoft-excel"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public abstract class AbstractAcceloUtils {
public static List<Option<String>> getCompanyIdOptions(
Parameters inputParameters,
Parameters connectionParameters, Map<String, String> dependencyPaths, String searchText,
Parameters connectionParameters, Map<String, String> lookupDependsOnPaths, String searchText,
Context context) {

return List.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ private AcceloUtils() {
}

public static List<Option<String>> getAgainstIdOptions(
Parameters inputParameters, Parameters connectionParameters, Map<String, String> dependencyPaths,
Parameters inputParameters, Parameters connectionParameters, Map<String, String> lookupDependsOnPaths,
String searchText, ActionContext context) {

String againstType = inputParameters.getRequiredString(AGAINST_TYPE);

if (Objects.equals("company", againstType)) {
return getCompanyIdOptions(inputParameters, connectionParameters, dependencyPaths, searchText, context);
return getCompanyIdOptions(inputParameters, connectionParameters, lookupDependsOnPaths, searchText,
context);
} else {
Map<String, ?> body = context
.http(http -> http.get(againstType + "s"))
Expand All @@ -70,7 +71,7 @@ public static List<Option<String>> getAgainstIdOptions(
}

public static List<Option<String>> getCompanyIdOptions(
Parameters inputParameters, Parameters connectionParameters, Map<String, String> dependencyPaths,
Parameters inputParameters, Parameters connectionParameters, Map<String, String> lookupDependsOnPaths,
String searchText, Context context) {

Map<String, ?> body = context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private AiImageUtils() {
}

public static List<? extends Option<String>> getModelOptions(
Parameters inputParameters, Parameters connectionParameters, Map<String, String> dependencyPaths,
Parameters inputParameters, Parameters connectionParameters, Map<String, String> lookupDependsOnPaths,
String searchText, ActionContext context) {

Provider provider = Provider.valueOf(inputParameters.getRequiredString(PROVIDER));
Expand Down
Loading
Loading