Skip to content

Commit

Permalink
Merge pull request #1899 from n8n-io/ADO-1844-templates
Browse files Browse the repository at this point in the history
template library semi-removal
  • Loading branch information
Deborah authored Feb 15, 2024
2 parents 4aabc87 + ffec532 commit a7f36b3
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 39 deletions.
23 changes: 23 additions & 0 deletions _snippets/workflows/templates/custom-templates-library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
In your environment variables, set `N8N_TEMPLATES_HOST` to the base URL of your API.

Your API must provide the same endpoints and data structure as n8n's.

The endpoints are:

| Method | Path |
| ------ | ---- |
| GET | /templates/workflows/`<id>` |
| GET | /templates/workflows |
| GET | /templates/collections/`<id>` |
| GET | /templates/collections |
| GET | /templates/categories |
| GET | /health |

To learn about the data structure, try out n8n's API endpoints:

[https://api.n8n.io/templates/categories](https://api.n8n.io/templates/categories){:target=_blank .external-link}
[https://api.n8n.io/templates/collections](https://api.n8n.io/templates/collections){:target=_blank .external-link}
[https://api.n8n.io/templates/workflows](https://api.n8n.io/templates/workflows){:target=_blank .external-link}
[https://api.n8n.io/health](https://api.n8n.io/health){:target=_blank .external-link}

You can also [contact us](mailto:[email protected]) for more support.
1 change: 1 addition & 0 deletions _snippets/workflows/templates/disable-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In your environment variables, set `N8N_TEMPLATES_ENABLED` to false.
File renamed without changes.
Binary file added docs/_images/common-icons/templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following video demonstrates the steps of sharing workflows on the community

## Contribute a workflow template

--8<-- "_snippets/workflows/submit-templates.md"
--8<-- "_snippets/workflows/templates/submit-templates.md"

## Build a node

Expand Down
28 changes: 3 additions & 25 deletions docs/embed/workflow-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,13 @@ n8n provides a library of workflow templates. When embedding n8n, you can:

## Disable workflow templates

In your environment variables, set `N8N_TEMPLATES_ENABLED` to false.
--8<-- "_snippets/workflows/templates/disable-templates.md"

## Use your own workflow templates library

In your environment variables, set `N8N_TEMPLATES_HOST` to the base URL of your API.

Your API must provide the same endpoints and data structure as n8n's.

The endpoints are:

| Method | Path |
| ------ | ---- |
| GET | /templates/workflows/`<id>` |
| GET | /templates/workflows |
| GET | /templates/collections/`<id>` |
| GET | /templates/collections |
| GET | /templates/categories |
| GET | /health |

To learn about the data structure, try out n8n's API endpoints:

[https://api.n8n.io/templates/categories](https://api.n8n.io/templates/categories){:target=_blank .external-link}
[https://api.n8n.io/templates/collections](https://api.n8n.io/templates/collections){:target=_blank .external-link}
[https://api.n8n.io/templates/workflows](https://api.n8n.io/templates/workflows){:target=_blank .external-link}
[https://api.n8n.io/health](https://api.n8n.io/health){:target=_blank .external-link}

You can also [contact us](mailto:[email protected]) for more support.
--8<-- "_snippets/workflows/templates/custom-templates-library.md"

## Add your workflows to the n8n library

--8<-- "_snippets/workflows/submit-templates.md"
--8<-- "_snippets/workflows/templates/submit-templates.md"

4 changes: 2 additions & 2 deletions docs/try-it-out/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ You will:

n8n provides a quickstart template using training nodes. This allows you to work with fake data, and avoids setting up credentials.

1. Select **Templates**.
1. Select **Templates**. n8n opens the templates library on the website.
2. Search for `Very quick quickstart`.
3. Select the **Very quick quickstart** template to preview it.
4. Select **Use this workflow** to open the template in your own editor.
4. Select **Use workflow** to open the template in your own editor.

This workflow:

Expand Down
25 changes: 14 additions & 11 deletions docs/workflows/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ Templates provide:
* Examples of what you can build
* Best practices for creating your own workflows

## Use a workflow template
## Access templates

1. In the sidebar, click **Templates**.
2. Browse or search the workflow templates list.
3. Click a workflow to view more information. n8n opens the workflow details page.
4. On the workflow details page, click **Use this workflow**. n8n opens the workflow.
5. Click **Save** to add the workflow to your workflows.
Select <span class="inline-image">![View templates icon](/_images/common-icons/templates.png)</span> **Templates** to view the templates library.

/// note | Workflow templates are available in 0.165.0 and above
Workflow templates are available on all flavors of n8n. If you can't access workflow templates in n8n, check that your n8n version is 0.165.0 or above, and check whether you are using a self-hosted or embedded version of n8n with templates disabled.
///
If you use n8n's template library, this takes you to browse [Workflows on the n8n website](https://n8n.io/workflows/){:target=_blank .external-link}. If you use a custom library provided by your organization, you'll be able to search and browse the templates within the app.

## Add your workflow to the library

--8<-- "_snippets/workflows/submit-templates.md"
## Add your workflow to the n8n library

--8<-- "_snippets/workflows/templates/submit-templates.md"

## Self-hosted n8n: Disable templates

--8<-- "_snippets/workflows/templates/disable-templates.md"

## Self-hosted n8n: Use your own library

--8<-- "_snippets/workflows/templates/custom-templates-library.md"

0 comments on commit a7f36b3

Please sign in to comment.