qorfechi

n8n nodes for Qorfechi portals: CRM cards and activities, tasks, orders, products, invoices, bookings, tickets, notifications, and a trigger for the portal's events

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.2
Author: Arsha Plus

Documentation

@arshaplus/n8n-nodes-qorfechi

npm
CI
License: MIT

n8n nodes for Qorfechi portals. Use them to work with your portal's CRM, tasks, store,
bookings, support and notifications from a workflow, and to start a workflow when something happens in the portal.

  • Qorfechi: reads and changes records of the portal. It also works as a tool of an n8n AI Agent.
  • Qorfechi Trigger: starts a workflow on the portal's events, such as a new lead, a paid order or a finished task.
    It registers its webhook with the portal by itself and removes it when the workflow is turned off.

Installation · Credentials · Operations · Trigger ·
Example workflows · Limits · Compatibility

Installation

In a self-hosted n8n, open Settings → Community Nodes → Install and enter @arshaplus/n8n-nodes-qorfechi.
See n8n's community nodes guide for other ways.

Credentials

The Qorfechi API credential has three fields:

Field What to enter
Portal URL Your portal's address, such as https://shop.example.ir (without /api)
API Key A key made in the portal's admin panel (see below). Live keys start with qc_live_, test keys with qc_test_.
Response Language Language of error messages: Persian or English

When you save it, n8n checks the key against the portal's GET /api/v1/key, which answers for any key.

Making a key

  • For CRM and tasks (recommended): in the admin panel open Connections and channels → Assistants and
    automations → Connect an assistant or automation
    , pick n8n, keep the Automation role and copy the key.
    The key gets its own user, never sees contacts' phone numbers or emails, cannot delete anything, and can be
    disconnected in one click.
  • For orders, products, invoices, bookings, tickets and notifications: open Connections and channels → API
    keys
    and make a key with the scopes of the resources you use (table below).

Start with a test key (qc_test_…) while you build: it checks everything and writes nothing.

Operations

Resource Operations Scopes the key needs
CRM Card Create, Get, Get Many, Update (move the stage, close as won or lost) crm.cases:read, crm.cases:write; crm.cases:assign to give a card to someone
CRM Activity Create, Get, Get Many, Update (mark done with the result and the next follow-up) crm.activities:read, crm.activities:write
CRM Contact Create, Get, Get Many, Update crm:read, crm.contacts:write
Task Create, Get, Get Many, Update, Add Comment, Get Comments work.tasks:read, work.tasks:write, work.tasks.comments:*; work.tasks:assign to give a task to someone
Order Get, Get Many orders:read
Product Create or Update (by product code), Get, Get Many, Update products:read, products:write
Invoice Get, Get Many invoices:read
Booking Get, Get Many, Update (confirm, cancel, mark arrived) booking.bookings:read, booking.bookings:write
Ticket Create, Get, Get Many, Update, Add Message support.tickets:read, support.tickets:write
Notification Send (an approved SMS, Bale or Telegram template), Get notifications:read, notifications:write

Dropdowns (pipeline stages, projects, team members, lost reasons, activity types, templates) are filled from your
portal. Get Many returns one page with Limit, or every page with Return All.

Anything else in the portal's API (the full reference is at https://<your portal>/developers) is one
HTTP Request node away: choose Predefined Credential Type → Qorfechi API where your n8n lists it, or send
the header Authorization: Bearer <key> yourself.

Good to know:

  • Task → Create takes an External ID. Run the same workflow twice with the same ID and you still get one
    task: the portal answers 409 with the first one.
  • Errors come back with the portal's own reason, such as a locked stage or a task that waits for another one.
  • Dates are sent as you enter them. Without a time zone the portal reads them in its own time zone (Tehran).

Trigger

  1. Add Qorfechi Trigger and pick the events. The list shows only what your portal sends: entity events such as
    work_task.updated or case.created, and events such as order.paid, crm.lead.created and
    form.submitted.
  2. Activate the workflow. The trigger registers its address in the portal's webhooks. Turning the workflow off
    removes it.

Each run gets:

{
  "event": "work_task.updated",
  "event_id": "evt_01k…",
  "created_at": "2026-11-27T10:15:00+03:30",
  "livemode": true,
  "data": { "object": "work_task", "id": 42 },
  "record": { "id": 42, "title": "Call the new lead", "status": "DONE" }
}

The portal's events carry only ids. With Fetch Full Record (on by default) the trigger reads the whole record
with the same key, so a run never holds more than the key may see. If the key cannot read it, record_error says
why and the run still happens. Every delivery is checked against the portal's
Standard Webhooks signature. The portal sends a failed delivery again with the
same id, and Drop Repeats skips it.

Example workflows

  • New lead → task for tomorrow: Qorfechi Trigger (crm.lead.created) → Qorfechi: Task → Create (project,
    assignee, due tomorrow, External ID lead-{{ $json.data.id }}).
  • Task done → message to the manager: Qorfechi Trigger (work_task.updated) → IF {{ $json.record.status_category }}
    is done → Telegram.
  • Paid order → sheet and SMS: Qorfechi Trigger (order.paid) → Google Sheets: Append → Qorfechi: Notification →
    Send (template order_paid, the customer's mobile).
  • Nightly report: Schedule → Qorfechi: CRM Card → Get Many (Updated After yesterday, Return All) → Email.

Limits

  • Public address: the portal calls n8n, so n8n needs a public https address. localhost and private
    networks are refused. Use a domain or a tunnel while testing.
  • Webhooks feature: the trigger needs the webhooks feature on the portal and the key's webhooks:read and
    webhooks:write scopes. A role's events also need that module's API on the portal.
  • Ten addresses: a portal has up to 10 webhook addresses in all, and each active trigger uses one.
  • Test keys: a test key's webhook address receives only the test ping, never real events.
  • Rate limit: each key has its own requests-per-minute limit (60 for connections, 120 by default for keys).

Compatibility

Built with @n8n/node-cli 0.58 for n8n 1.x (self-hosted). Node.js 20 or newer.

Development

npm install
npm run dev     # n8n with these nodes at http://localhost:5678
npm run lint
npm run build && npm test

nodes/QorfechiTrigger/objects.json maps the portal's objects to their API paths. After the portal adds entities,
make it again from the portal's manifest:

node scripts/sync-objects.mjs <path to qorfechi>/Modules/Integration/Resources/api/entities.json

Releases: npm run release tags a version, and GitHub Actions publishes it to npm with provenance.

License

MIT

Discussion