Add documentation for the Line node

This commit is contained in:
Harshil 2020-11-11 19:04:49 +05:30
parent fd2599d8cd
commit a98bade43f
7 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,32 @@
---
permalink: /credentials/line
description: Learn to configure credentials for the Line node in n8n
---
# Line
You can use these credentials to authenticate the following nodes with Line.
- [Line](../../nodes-library/nodes/Line/README.md)
## Prerequisites
Create a [Line](https://line.me/en/) account.
## Using OAuth
1. Access the [LINE Notify](https://notify-bot.line.me/en/) page.
2. Click on your name on the top right corner and select 'Manage registered services' from the dropdown list.
3. Click on the ***Add service*** button.
4. Enter all the necessary information.
5. Copy your OAuth Callback URL from the 'Create New Credentials' screen in n8n and paste it in the ***Callback URL*** field.
6. Click on the ***Agree and continue*** button.
7. Click on the ***Add*** button.
8. Check your inbox for the verification email.
9. Click on the link under the ***LINE Notify Registration URL*** in your email.
10. On the LINE Notify page, click on the ***My services*** button.
11. Click on the new service you created.
12. Use the provided ***Client ID*** and ***Client Secret*** with your Line Notify OAuth2 API credentials in n8n.
13. Click on the circle button in the OAuth section to connect a Line account to n8n.
14. Click the ***Save*** button to save your credentials in n8n.
![Getting Line credentials](./using-oauth.gif)

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View File

@ -0,0 +1,68 @@
---
permalink: /nodes/n8n-nodes-base.line
description: Learn how to use the Line node in n8n
---
# Line
[Line](https://line.me/en/) is a mobile messenger app that allows you to make free voice calls and send messages.
::: tip 🔑 Credentials
You can find authentication information for this node [here](../../../credentials/Line/README.md).
:::
## Basic Operations
::: details Notification
- Send
:::
## Example Usage
This workflow allows you to send daily weather updates via a notification using the Line node. You can also find the [workflow](https://n8n.io/workflows/773) on n8n.io. This example usage workflow uses the following nodes.
- [Cron](../../core-nodes/Cron/README.md)
- [OpenWeatherMap](../../nodes/OpenWeatherMap/README.md)
- [Line]()
The final workflow should look like the following image.
![A workflow with the Line node](./workflow.png)
### 1. Cron node
The Cron node will trigger the workflow daily at 9 AM.
1. Click on ***Add Cron Time***.
2. Set hours to 9 in the ***Hour*** field.
3. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the Cron node is configured to trigger the workflow every day at 9 AM.
![Using the Cron node to trigger the workflow daily at 9 am](./Cron_node.png)
### 2. OpenWeatherMap node (Current Weather)
This node will return data about the current weather in Berlin. To get the weather updates for your city, you can enter the name of your city instead.
1. First of all, you'll have to enter credentials for the OpenWeatherMap node. You can find out how to do that [here](../../../credentials/OpenWeatherMap/README.md).
2. Enter `berlin` in the ***City*** field.
3. Click on ***Execute Node*** to run the node.
In the screenshot below, you will notice that the node returns data about the current weather in Berlin.
![Using the OpenWeatherMap node to get weather updates for Berlin](./OpenWeatherMap_node.png)
### 3. Line node (send: notification)
This node will send a notification with the weather update.
1. First of all, you'll have to enter credentials for the Line node. You can find out how to do that [here](../../../credentials/Line/README.md).
2. Click on the gears icon next to the ***Message*** field and click on ***Add Expression***.
::: v-pre
3. Enter the following message in the ***Expression*** field: `Hey! The temperature outside is {{$node["OpenWeatherMap"].json["main"]["temp"]}}°C.`.
4. Click on ***Execute Node*** to run the node.
:::
In the screenshot below, you will notice that the node sends a notification with the weather update.
![Using the Line node to send weather updates via a notification](./Line_node.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB