Skip to content

Commit

Permalink
Merge pull request #960 from datatrails/steve/n8n-integration
Browse files Browse the repository at this point in the history
Add n8n integration docs
  • Loading branch information
JAG-UK authored Jan 6, 2025
2 parents c0807a8 + 719e20a commit 2ce07e7
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/_default/menus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
weight = 15
identifier = "templates"
url = "/developers/templates/"
[[developers]]
name = "integrations"
weight = 18
identifier = "integrations"
url = "/developers/integrations/"


[[platform]]
Expand Down
21 changes: 21 additions & 0 deletions content/developers/integrations/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Integrations"
description: ""
lead: ""
date: 2023-05-31T10:14:18+01:00
lastmod: 2023-05-31T10:14:18+01:00
draft: false
images: []
weight: 900
toc: true
aliases:
- /docs/integrations/
---
<div class= "row justify-content-center">
<div class="col-md-12 col-lg-10 col-xl-10">
<h1>DataTrails Integrations</h1>
<p>How to integrate DataTrails into partners and platforms
<p> Check out the articles below for more information:</p>
<a href="/developers/integrations/n8n/">Integrating DataTrails with n8n&rarr;</a><br>
</div>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions content/developers/integrations/n8n/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "Integrating with n8n"
description: "Integrating DataTrails Authentication and Workflows with n8n"
lead: "Integrating DataTrails Authentication and Workflows with n8n"
date: 2021-06-09T13:49:35+01:00
lastmod: 2021-06-09T13:49:35+01:00
draft: false
images: []
menu:
developers:
parent: "integrations"
weight: 10
toc: true
aliases:
---
[n8n](https://n8n.io/) is a workflow automation platform with visual editing capabilities.

Integrating DataTrails with n8n is easy, utilizing OAuth2 credentials and the [DataTrails API Reference](/developers/api-reference/) documentation.

## Authentication & Credentials

DataTrails uses an OAuth2 provider, making it easy to integrate client credentials into n8n.

1. Create a new [DataTrails Access Token](/developers/developer-patterns/getting-access-tokens-using-app-registrations/), saving the `Client_ID` and `Client_Secret`
1. Create a new [n8n Credential](https://docs.n8n.io/credentials/), clicking the [+] button on the workflow designer.
1. Choose "OAuth2 API" from the app services list
{{< img src="credentials-auth-type.png" alt="Credential Flow" caption="" class="border-0" >}}
1. Name the credential for reference within the workflow
{{< img src="credentials-connection.png" alt="Credential Configuration" caption="" class="border-0" >}}
1. **Grant Type**: select "Client Credentials"
1. **Access Token URL**: set to:
```http
https://app.datatrails.ai/archivist/iam/v1/appidp/token
```
1. **Client ID**: set to the DataTrails `Client_ID` from step 1
1. **Client Secret**: set to the DataTrails `Client_Secret` from step 1
1. **Save** the credential configuration and close the dialog

## Executing DataTrails APIs

To execute a DataTrails API:

1. Add a new n8n node
{{< img src="http-node.png" alt="HTTP Node" caption="<em>Add an HTTP node</em>" class="border-0" >}}
1. Select the HTTP node
1. **Authentication**: select "Generic Credential Type"
{{< img src="http-node-configuration.png" alt="HTTP Node Configuration" caption="<em>HTTP Node Configuration</em>" class="border-0" >}}
1. **Generic Auth Type**: select "OAuth2 API"
1. **OAuth2 API**: select the named credential from the previous step
1. **URL**: configure using the [DataTrails API Reference](/developers/api-reference/) documentation
1. **Query Parameters**: configure per the API docs

### More Info:

- [DataTrails API Reference](/developers/api-reference/)
- [n8n Documentation](https://docs.n8n.io/)
- [vCon Templates](/developers/templates/vcons)

0 comments on commit 2ce07e7

Please sign in to comment.