Integrating with n8n
Integrating DataTrails Authentication and Workflows with n8n
n8n is a workflow automation platform with visual editing capabilities.
Integrating DataTrails with n8n is easy, utilizing OAuth2 credentials and the DataTrails API Reference documentation.
Authentication & Credentials
DataTrails uses an OAuth2 provider, making it easy to integrate client credentials into n8n.
- Create a new
DataTrails Access Token, saving the Client_IDandClient_Secret
- Create a new n8n Credential, clicking the [+] button on the workflow designer.
- Choose “OAuth2 API” from the app services list
- Name the credential for reference within the workflow
- Grant Type: select “Client Credentials”
- Access Token URL: set to:https://app.datatrails.ai/archivist/iam/v1/appidp/token
- Client ID: set to the DataTrails Client_IDfrom step 1
- Client Secret: set to the DataTrails Client_Secretfrom step 1
- Save the credential configuration and close the dialog
Executing DataTrails APIs
To execute a DataTrails API:
- Add a new n8n nodeAdd an HTTP node 
- Select the HTTP node
- Authentication: select “Generic Credential Type”HTTP Node Configuration 
- Generic Auth Type: select “OAuth2 API”
- OAuth2 API: select the named credential from the previous step
- URL: configure using the DataTrails API Reference documentation
- Query Parameters: configure per the API docs



