n8n
Automate Aceversity with n8n: HTTP Request nodes with an API key or OAuth2, an AI Agent with the MCP Client Tool, polling triggers, and an importable example workflow.
1. Credentials
Simplest — API key (Bearer Auth)
- Create a key at
https://api.aceversity.com/keys(read-only unless the workflow writes). - n8n → Credentials → Add credential → Bearer Auth → paste the key. Name it
Aceversity API key.
For workflows shared with other members — OAuth2
- n8n → Credentials → OAuth2 API. Copy the OAuth Redirect URL n8n shows (e.g.
https://your-n8n.example.com/rest/oauth2-credential/callback). - Register a client for it:
curl -X POST https://api.aceversity.com/oauth/register -H "Content-Type: application/json" -d '{ "client_name": "n8n (your-n8n.example.com)", "redirect_uris": ["https://your-n8n.example.com/rest/oauth2-credential/callback"], "token_endpoint_auth_method": "client_secret_post" }' - Fill in the credential: Grant Type PKCE, Authorization URL
https://api.aceversity.com/oauth/authorize, Access Token URLhttps://api.aceversity.com/oauth/token, Client ID/Secret from step 2, Scoperead write, Authentication Send in body. Press Connect my account and approve.
2. Call any endpoint — HTTP Request node
| Field | Value |
|---|---|
| Method | GET |
| URL | https://api.aceversity.com/v1/agenda |
| Authentication | Generic Credential Type → Bearer Auth (or OAuth2 API) |
| Query Parameters | days = 7 |
Tip: in the HTTP Request node choose Import cURL and paste any example from the reference.
For lists, enable Pagination → Response contains next URL is not used; instead use Update a parameter in each request: cursor = {{ $response.body.next_cursor }}, complete when {{ !$response.body.has_more }}.
3. Let an AI Agent use Aceversity — MCP Client Tool
- Add an AI Agent node with your chat model.
- Under Tools, add MCP Client Tool:
- Endpoint:
https://api.aceversity.com/mcp - Server Transport: HTTP Streamable
- Authentication: Bearer Auth → your Aceversity credential
- Tools to include: Selected → e.g.
get_agenda,list_courses,get_practice_stats(keep agents read-only unless you need writes)
- Endpoint:
- Ask the agent: "Write me a study plan for this week based on my deadlines and weak topics."
4. Trigger on new deadlines (polling)
There are no webhooks yet, so poll:
- Schedule Trigger every 15 minutes.
- HTTP Request
GET https://api.aceversity.com/v1/itemswithcreated_after={{ $now.minus({ minutes: 15 }).toISO() }}. - Split Out the
datafield → one item per new deadline → send to Google Calendar, Slack, Notion…
Polling windows can overlap or miss a few seconds; for exactly-once, store the newest created_at in workflow static data and pass it as created_after.
5. Example workflow
aceversity-weekly-digest.json (download) — every Sunday at 6 pm it fetches the agenda and weak topics and builds a digest message. In n8n: Workflows → Import from File, then pick your Aceversity credential on both HTTP Request nodes and connect the last node to email/Slack.
6. A dedicated n8n node (optional, for the n8n directory)
To appear as "Aceversity" in n8n's node list, publish a community node:
- Scaffold:
npm create @n8n/node@latest→ namen8n-nodes-aceversity, declarative style, credential type API key (+ OAuth2 if you want). - Map resources/operations to the REST endpoints (Agenda; Course: list/get/create/update/delete; Item: …). Base URL
https://api.aceversity.com,Authorization: Bearer {{$credentials.apiKey}}. Add a credential test request:GET /v1/me. - Add a polling trigger node backed by
GET /v1/items?created_after=…. - Run
npm run lintandnpx @n8n/scan-community-package n8n-nodes-aceversitybefore publishing. - Publish to npm (with provenance, from GitHub Actions) and submit for verification — see Submission checklists.