diff --git a/docs/nodes/credentials/Yourls/README.md b/docs/nodes/credentials/Yourls/README.md new file mode 100644 index 000000000..a05a1178c --- /dev/null +++ b/docs/nodes/credentials/Yourls/README.md @@ -0,0 +1,23 @@ +--- +permalink: /credentials/yourls +description: Learn to configure credentials for the Yourls node in n8n +--- + +# Yourls + +You can use these credentials to authenticate the following nodes with Yourls. +- [Yourls](../../nodes-library/nodes/Yourls/README.md) + +## Prerequisites + +Install [Yourls](https://github.com/YOURLS/YOURLS) on your server. + +## Using API + +1. Access your Yourls Admin dashboard. +2. Click on ***Tools*** on the top left. +3. Scroll down to the ***Secure passwordless API call*** section. +4. Copy the ***signature token***. +5. Use this ***Signature*** and the URL of your Yourls instance with your Yourls node credentials in n8n. + +![Getting Yourls credentials](./using-api.gif) diff --git a/docs/nodes/credentials/Yourls/using-api.gif b/docs/nodes/credentials/Yourls/using-api.gif new file mode 100644 index 000000000..a869adf1c Binary files /dev/null and b/docs/nodes/credentials/Yourls/using-api.gif differ diff --git a/docs/nodes/nodes-library/nodes/Yourls/README.md b/docs/nodes/nodes-library/nodes/Yourls/README.md new file mode 100644 index 000000000..36b41df51 --- /dev/null +++ b/docs/nodes/nodes-library/nodes/Yourls/README.md @@ -0,0 +1,62 @@ +--- +permalink: /nodes/n8n-nodes-base.yourls +description: Learn how to use the Yourls node in n8n +--- + +# Yourls + +[Yourls](http://yourls.org/) is a free and open-source software that allows you to run your URL shortening service. + +::: tip 🔑 Credentials +You can find authentication information for this node [here](../../../credentials/Yourls/README.md). +::: + +## Basic Operations + +::: details URL +- Expand a URL +- Shorten a URL +- Get stats about one short URL +::: + +## Example Usage + +This workflow allows you to create a short URL and get the statistics of the URL. You can also find the [workflow](https://n8n.io/workflows/815) on n8n.io. This example usage workflow uses the following nodes. +- [Start](../../core-nodes/Start/README.md) +- [Yourls]() + +The final workflow should look like the following image. + +![A workflow with the Yourls node](./workflow.png) + +### 1. Start node + +The start node exists by default when you create a new workflow. + +### 2. Yourls node (shorten: url) + +This node will create a short URL for the link we specify. + +1. First of all, you'll have to enter credentials for the Yourls node. You can find out how to do that [here](../../../credentials/Yourls/README.md). +2. Enter the URL that you want to shorten in the ***URL*** field. +3. Click on ***Add Field*** and select 'Title'. +4. Enter a title in the ***Title*** field. +5. Click on ***Execute Node*** to run the node. + +In the screenshot below, you will notice that the node creates a short URL for the URL you specified. + +![Using the Yourls node to create short URL](./Yourls_node.png) + +### 3. Yourls1 node (stats: url) + +This node will give us the statistics of the short URL that we specify. We will get the statistics for the URL that we created in the previous step. +::: v-pre +1. Select the credentials that you entered in the previous node. +2. Select 'Stats' from the ***Operation*** dropdown list. +3. Click on the gears icon next to the ***Short URL*** field and click on ***Add Expression***. +4. Select the following in the ***Variable Selector*** section: Nodes > Yourls > Output Data > JSON > shorturl. You can also add the following expression: `{{$node["Yourls"].json["shorturl"]}}`. +5. Click on ***Execute Node*** to run the node. +::: +In the screenshot below, you will notice that the node gives us the statistics of the short URL that we created in the previous node. + +![Using the Yourls node to get the statistics of a short URL](./Yourls1_node.png) diff --git a/docs/nodes/nodes-library/nodes/Yourls/Yourls1_node.png b/docs/nodes/nodes-library/nodes/Yourls/Yourls1_node.png new file mode 100644 index 000000000..63362b2a7 Binary files /dev/null and b/docs/nodes/nodes-library/nodes/Yourls/Yourls1_node.png differ diff --git a/docs/nodes/nodes-library/nodes/Yourls/Yourls_node.png b/docs/nodes/nodes-library/nodes/Yourls/Yourls_node.png new file mode 100644 index 000000000..4b10a65fd Binary files /dev/null and b/docs/nodes/nodes-library/nodes/Yourls/Yourls_node.png differ diff --git a/docs/nodes/nodes-library/nodes/Yourls/workflow.png b/docs/nodes/nodes-library/nodes/Yourls/workflow.png new file mode 100644 index 000000000..76907a213 Binary files /dev/null and b/docs/nodes/nodes-library/nodes/Yourls/workflow.png differ