تخطَّ إلى المحتوى

ابنِ فوق Fatrina

اقرأ الطلبات والمنتجات والعملاء، وحدّث الطلبات والمخزون، واستقبل إشعارات Webhooks موقّعة عند حدوث أي شيء في متجرك. أنشئ مفتاح API من الإعدادات > المطورون في لوحة التحكم.

المرجع التالي بالإنجليزية، مثل الشيفرة التي يشرحها.

Fatrina for n8n

The private community-node source provides a Fatrina action node and a signed event trigger. No npm publication or n8n verification has been performed.

Connect a store

Create a separate store API key with the scopes needed by the workflow. Actions use products:write or orders:write. Triggers require webhooks:write and the source read scope: orders:read for orders, fulfilments and returns, or customers:read for customers. Save the token only in the Fatrina credential’s password field. One credential selects one store.

Events and actions

The trigger supports order created/updated, customer created, fulfilment status changed and return requested. Activation registers a dedicated callback; deactivation removes it. The trigger keeps its signing secret in node static data, verifies the exact raw bytes and five-minute timestamp, rejects a wrong event, and remembers recent event ids. Keep a persistent event-id deduplication record when downstream side effects must survive workflow reinstalls or concurrent executions.

The action node creates a product with a default variant, updates product details, adjusts inventory, changes order status or adds an internal note. IDs belong to the connected store. Money is integer piastres; metadata updates preserve the variant matrix. Normal stock, permission, order-state and plan rules apply.

Private installation

The source package is integrations/connectors/n8n. It declares the credential and both native node modules in its n8n manifest. Install it only in an authorized isolated n8n instance and validate against the pinned workflow peer before a private trial. The trigger requires a publicly reachable HTTPS n8n webhook URL and access to the request’s original raw body; it fails closed if the runtime does not provide it. No custom SSRF exemption is used by Fatrina.

Failure handling

The node makes one request for each write and stops on an ambiguous outcome. Leave workflow retry-on-failure disabled for writes unless you have independently reconciled the outcome. Revoking the token or removing its creator also stops queued webhook deliveries. Native host/import validation and public community-node review remain release steps.

See the API reference and official n8n node authoring documentation.