frappe-external-api-connector_skill

This skill generates robust API client code to connect Frappe with external REST services, handling authentication, errors, and data transformation.

7

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill venkateshvenki404224/frappe-apps-manager --skill frappe-external-api-connector

  • SKILL.md3.9 KB

Overview

This skill generates ready-to-use code to integrate Frappe applications with external REST APIs. It focuses on secure authentication, resilient error handling, and clear data transformation patterns. Use it to produce client classes, OAuth token management, and example request/response logic you can drop into Frappe apps.

How this skill works

The skill outputs a Python API client template that reads configuration from frappe.conf, builds headers, and provides GET/POST helpers with timeout and HTTP error handling. It can also generate an OAuth 2.0 token flow that caches tokens in frappe.cache and refreshes when needed. Generated code includes sensible logging, frappe.throw for user-facing errors, and hooks for custom data mapping and retry policies.

When to use it

  • You need to call third-party REST APIs from a Frappe app.
  • Integrating payment gateways, shipping providers, or external CRMs.
  • When API access requires API keys, bearer tokens, or OAuth 2.0 client credentials.
  • When you want standardized error handling, rate-limit awareness, and token caching.
  • When building maintainable connectors that follow Frappe patterns.

Best practices

  • Store secrets and endpoints in frappe.conf or DocType settings and use get_password for credentials.
  • Cache OAuth tokens in frappe.cache and subtract a safety margin from expires_in before reuse.
  • Wrap external calls with timeouts and handle specific requests.exceptions for clearer feedback.
  • Raise user-friendly errors with frappe.throw and log full tracebacks with frappe.log_error for diagnostics.
  • Include idempotency and retry logic for safe POST operations and respect 429 rate-limit responses.

Example use cases

  • Generate an ExternalAPIClient class to call a shipping provider and map responses into Delivery Note fields.
  • Create an OAuth token helper to authenticate with a payment gateway and cache the access token.
  • Build a connector that polls a third-party CRM, transforms records, and creates Frappe Contacts.
  • Implement a webhook receiver that validates signatures and uses the client class to acknowledge events.
  • Scaffold integrations for inventory systems that require paginated GET requests and error recovery.

FAQ

Yes. The code reads credentials from frappe.conf or a settings DocType and recommends using get_password and frappe.get_site_config to avoid hardcoding secrets.

How does token caching work?

Tokens are cached in frappe.cache with an expires_in minus a safety margin. The helper checks cache first and refreshes when missing or expired to minimize token requests.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational