---
title: "n8n"
description: "Tswj haujlwm Quire cia li nrog n8n thiab Quire community node."
image: "https://docs.quirelms.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.quirelms.com/hmn/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

<span id="n8n"></span>

Quire community node rau n8n muab action node siv REST API thiab trigger node uas pib workflow thaum muaj xwm txheej hauv Quire. Nws tsis muaj runtime dependency, yog li tsis ntxiv dab tsi rau koj qhov n8n tshwj tsis yog nws tus kheej.

## Nruab <!--quire:install-->

Hauv n8n, qhib **Settings**, ces **Community nodes**, xaiv **Install**, thiab sau `@quire/n8n-node`. Yog siv n8n self-hosted, koj khiav tau `npm install @quire/n8n-node` hauv n8n user folder thiab rov pib.

## Txuas <!--quire:connect-->

<figure class="quire-shot" lang="en" dir="ltr"><img src="/screenshots/admin-api-keys.webp" alt="The API keys page with a key named for an n8n automation." width="944" height="700" loading="lazy" decoding="async"><figcaption>Create a key at /admin/integrations/api-keys and paste it into the Quire credential in n8n.</figcaption></figure>

Tsim credential. Muaj ob hom:

- **Quire API Key**: **Base URL** yog chaw nyob koom haum tsis muaj slash tom qab, xws li `https://acme.quirelms.com`. **API Key** yog key uas tus thawj coj tsim ntawm `/admin/integrations/api-keys`, pib nrog `qk_live_`. Muab cov scope uas workflow xav tau xwb.
- **Quire OAuth2**: rau workflow uas yuav tsum ua sawv cev rau ib tug neeg. Tso npe OAuth client ntawm `/admin/integrations/oauth-clients` nrog n8n redirect address (n8n qhia ntawm credential), ces sau client ID, secret thiab scopes.

## Kev ua <!--quire:actions-->

Node **Quire** siv tau users, courses, enrolments, groups, completions, grades, certificates, submissions, quiz attempts, programs, orders, email thiab organisations. Txhua qhov muaj list, get, create, update thiab delete raws li API muaj, thiab upsert raws external ID; qhov no yog yam sync xav tau: khiav tib workflow ob zaug los tsis tsim duplicates.

Cov haujlwm tsim los ntawm Quire OpenAPI document, yog li phim [API reference](https://docs.quirelms.com/api/) txhua field. Txhua operation siv tau ua cuab yeej rau n8n AI agent; nws cov lus piav los ntawm API reference.

Cov npe rov txhua nplooj raws qhov qub. Rau koom haum loj, tua **Return All** thiab teev limit.

## Trigger <!--quire:trigger-->

Ntxiv **Quire Trigger** node, xaiv credential, thiab xaiv **Events**: ib xwm txheej raws npe xws li `enrolment.created`, ib cheeb tsam xws li `course.*`, lossis txhua yam. Thaum qhib workflow, node tsim webhook subscription hauv Quire rau n8n chaw nyob; thaum tua workflow, subscription raug rho tawm.

Xyuas signature ntawm txhua qhov kev xa ua ntej workflow khiav. Kev xa uas xyuas tsis dhau raug tso tseg nrog node yuam kev, kom kev thov cuav tsis pib workflow. `data` hauv xwm txheej muaj ID; ntxiv Quire node tom qab trigger kom rub ntaub ntawv puv.

## Piv txwv: xa email txais tos thaum tso npe <!--quire:example-welcome-email-on-enrolment-->

1. **Quire Trigger** rau `enrolment.created`.
2. **Quire** node, resource **Users**, operation **Get**, nrog user ID `{{$json.data.user_id}}`.
3. **Quire** node, resource **Courses**, operation **Get**, nrog course ID `{{$json.data.course_id}}`.
4. Koj email lossis chat node, siv tus neeg lub npe thiab chav kawm lub npe.

## Kho teeb meem <!--quire:troubleshooting-->

- **401** txhua qhov hu: Base URL thiab key yog ntawm ob lub koom haum sib txawv, lossis key raug rho lawm.
- **403** rau ib operation: key tsis muaj scope ntawd. Ntxiv ntawm `/admin/integrations/api-keys`.
- Trigger tsis ua haujlwm: Quire yuav tsum ncav n8n webhook address tau hla HTTPS. Xyuas daim ntawv teev kev xa ntawm `/admin/webhooks`.

Source: https://docs.quirelms.com/hmn/integrations/n8n/index.mdx
