Merge branch 'harshil1712-docs/mailerLite'

This commit is contained in:
Tanay Pant 2020-11-02 09:09:52 +01:00
commit 17df536efd
7 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,23 @@
---
permalink: /credentials/mailerLite
description: Learn to configure credentials for the MailerLite node in n8n
---
# MailerLite
You can use these credentials to authenticate the following nodes with MailerLite.
- [MailerLite](../../nodes-library/nodes/MailerLite/README.md)
## Prerequisites
Create a [MailerLite](https://MailerLite.com) account.
## Using API Key
1. Access the [MailerLite](https://app.mailerlite.com/dashboard/) dashboard.
2. Click on the profile icon on the top right corner.
3. Select 'Integrations' from the dropdown list.
4. Click on 'Developer API' in the ***MailerLite API*** section.
5. Copy the ***API key*** that is displayed and use it with your MailerLite node credentials in n8n.
![Getting MailerLite credentials](./using-api-key.gif)

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -0,0 +1,86 @@
---
permalink: /nodes/n8n-nodes-base.mailerLite
description: Learn how to use the MailerLite node in n8n
---
# MailerLite
[MailerLite](https://www.mailerlite.com/) is an email marketing solution that provides you with a user-friendly content editor, simplified subscriber management, and campaign reports with the most important statistics.
::: tip 🔑 Credentials
You can find authentication information for this node [here](../../../credentials/MailerLite/README.md).
:::
## Basic Operations
::: details Subscriber
- Create a new subscriber
- Get a subscriber
- Get all subscribers
- Update a subscriber
:::
## Example Usage
This workflow allows you to create, update, and get a subscriber using the MailerLite node. You can also find the [workflow](https://n8n.io/workflows/751) on n8n.io. This example usage workflow uses the following nodes.
- [Start](../../core-nodes/Start/README.md)
- [MailerLite]()
The final workflow should look like the following image.
![A workflow with the MailerLite node](./workflow.png)
### 1. Start node
The Start node exists by default when you create a new workflow.
### 2. MailerLite node (create: subscriber)
This node will create a new subscriber in MailerLite. We will add the name of the subscriber along with their email.
1. First of all, you'll have to enter credentials for the MailerLite node. You can find out how to do that [here](../../../credentials/MailerLite/README.md).
::: v-pre
2. Enter the email address in the ***Email*** field.
3. Click on the ***Add Field*** button and select 'Name' from the dropdown list.
4. Enter the name of the subscriber in the ***Name*** field.
5. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node creates a new subscriber with their name and email.
![Using the MailerLite node to create a room](./MailerLite_node.png)
### 3. MailerLite1 node (update: subscriber)
This node will update the information of the subscriber that we created in the previous node. We will add the information about the city of the subscriber using this node.
::: v-pre
1. Select the credentials that you entered in the previous node.
2. Select 'Update' from the ***Operation*** dropdown list.
3. Click on the gears icon next to the ***Subscriber Email*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > MailerLite > Output Data > JSON > email. You can also add the following expression: `{{$node["MailerLite"].json["email"]}}`.
5. Click on the ***Add Field*** button and select 'Custom Fields' from the dropdown list.
6. Click on the ***Add Custom Field*** button.
7. Select 'city' from the ***Field ID*** dropdown list.
8. Enter the name of the city in the ***Value*** field.
9. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node updates the information of the subscriber that we created in the previous node. Here, the node has added information about the city of the subscriber.
![Using the MailerLite node to update the subscriber](./MailerLite1_node.png)
### 3. MailerLite2 node (get: subscriber)
This node will return the information of the subscriber that we created using the MailerLite node.
::: v-pre
1. Select the credentials that you entered in the previous node.
2. Select 'Get' from the ***Operation*** dropdown list.
3. Click on the gears icon next to the ***Subscriber Email*** field and click on ***Add Expression***.
4. Select the following in the ***Variable Selector*** section: Nodes > MailerLite > Output Data > JSON > email. You can also add the following expression: `{{$node["MailerLite"].json["email"]}}`.
5. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node returns the information of the subscriber that we created using the MailerLite node.
![Using the MailerLite node to get the information of the subscriber](./MailerLite2_node.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB