openaec-foundation/frappe_claude_skill_package/frappe-impl-integrations
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing OAuth providers, Connected Apps, Webhooks, Payment Gateways, or Data Import/Export in Frappe. Prevents authentication failures from wrong OAuth flow, missed webhook deliveries, and data corruption during bulk imports. Covers OAuth2 provider/client, Connected App DocType, Webhook DocType, Payment Gateway integration, Data Import, Data Export, frappe.integrations module. Keywords: OAuth, Connected App, Webhook, Payment Gateway, Data Import, Data Export, integration, API key, OAuth2, webhook trigger, connect to external service, OAuth setup, webhook configuration, import data, export data..
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-impl-integrationsSKILL.md
The same SKILL.md was published earlier as openaec-foundation/frappe_claude_skill_package/frappe-impl-integrations.
Frappe Integrations
Step-by-step workflows for OAuth, Webhooks, Payment Gateways, Data Import/Export, and external API calls.
Version: v14/v15/v16
Decision Tree: Which Integration Pattern?
Workflow 1: OAuth 2.0: Frappe as Provider
Use when external applications need "Sign in with Frappe" or API access on behalf of users.
Step 1: Configure OAuth Provider Settings
Navigate to Setup > Integrations > OAuth Provider Settings:
- Force: ALWAYS asks user for confirmation
- Auto: Asks only if no active token exists
Step 2: Create OAuth Client
Navigate to Setup > Integrations > OAuth Client:
| Field | Value | |
|---|---|---|
| App Name | External app identifier | |
| Scopes | Space-separated (e.g., openid all) | |
| Redirect URIs | Space-separated callback URLs | |
| Default Redirect URI | Primary callback URL | |
| Grant Type | Authorization Code (RECOMMENDED) or Implicit | |
| Response Type | Code (for Auth Code) or Token (for Implicit) | |
| Skip Authorization | Check for trusted first-party apps only |
Step 3: Use the Generated Endpoints
| Endpoint | URL | |
|---|---|---|
| Authorize | /api/method/frappe.integrations.oauth2.authorize | |
| Token | /api/method/frappe.integrations.oauth2.get_token | |
| Profile | /api/method/frappe.integrations.oauth2.openid_profile |
Step 4: Configure External App
Critical Rules
- NEVER use
Implicitgrant type for server-side apps — useAuthorization Code - ALWAYS use HTTPS in production for all OAuth endpoints
- NEVER expose
client_secretin client-side JavaScript
Workflow 2: Connected App: Frappe as OAuth Consumer
Use when your Frappe instance needs to access external services (Google, Microsoft, etc.) on behalf of users.
Step 1: Create Connected App DocType
| Field | Purpose | |
|---|---|---|
| Name | Identifier for the connection | |
| OpenID Configuration URL | Auto-fetches endpoints (e.g., /.well-known/openid-configuration) | |
| Authorization URI | Consent screen URL (auto-filled from OpenID) | |
| Token URI | Token exchange URL (auto-filled from OpenID) | |
| Redirect URI | Auto-generated — copy this to external provider | |
| Client ID | From external provider | |
| Client Secret | From external provider | |
| Scopes | Permissions needed (e.g., https://mail.google.com/) |
Step 2: Register Redirect URI with Provider
Copy the auto-generated Redirect URI and register it in the external provider's OAuth console.
Step 3: Add Extra Parameters (if needed)
Step 4: Use in Code
Critical Rules
- ALWAYS add
access_type=offlinefor Google APIs to get refresh tokens - NEVER store tokens manually — Connected App manages token lifecycle
- ALWAYS handle
TokenExpiredError— callsession.refresh_token()or reconnect
Workflow 3: Webhooks: Push Notifications to External Services
Step 1: Create Webhook DocType
Navigate to Integrations > Webhook:
| Field | Value | |
|---|---|---|
| DocType | Target document type | |
| Doc Event | on_update, after_insert, on_submit, on_cancel, on_trash | |
| Request URL | External endpoint | |
| Request Method | POST (default) | |
| Conditions | Optional Jinja filter (e.g., doc.status == "Approved") | |
| Enabled | Check to activate |
Step 2: Configure Headers
Add custom headers for authentication:
Step 3: Configure Data: Choose Format
Form URL-encoded: Select specific fields from a table.
JSON: Use Jinja templates for structured payloads:
Step 4: Enable Webhook Secret (HMAC Verification)
Set a Webhook Secret — Frappe adds X-Frappe-Webhook-Signature header with base64-encoded HMAC-SHA256 hash of the payload.
Receiver verification (Python example):
Critical Rules
- ALWAYS enable Webhook Secret for production webhooks
- NEVER rely on webhooks for guaranteed delivery — implement idempotency on the receiver
- ALWAYS use
| tojsonfilter for child table data in JSON payloads - Webhook logs are created for every delivery — check Webhook Request Log for debugging
Workflow 4: External API Calls from Frappe
Using frappe.integrations.utils
Using requests Library Directly
Critical Rules
- ALWAYS set a
timeouton external requests (30s recommended) - ALWAYS wrap external calls in try/except and log errors with
frappe.log_error() - NEVER call external APIs inside
validateorbefore_save— useon_update+frappe.enqueue() - ALWAYS use
frappe.enqueue()for slow external calls to avoid blocking the web request
Workflow 5: Data Import
Via UI (Data Import DocType)
- Navigate to Home > Data Import > New
- Select DocType and Import Type (
InsertorUpdate) - Download template CSV/XLSX
- Fill in data following the template format
- Upload and preview
- Start Import
CSV Format Rules
- First row: field labels or API field names
- Leave
ID/nameempty for Insert (auto-generated) - For Update:
IDcolumn MUST contain existing document names - Child tables: repeat parent row data, add child fields as extra columns
Programmatic Import
Critical Rules
- ALWAYS download and use the template — column order and names must match exactly
- NEVER import more than 5,000 rows at once — split into batches
- ALWAYS test with 5-10 rows first before bulk import
- ALWAYS check Import Log for row-level errors after import completes
Workflow 6: Data Export
Via Report Builder
- Open any DocType list view
- Apply filters
- Menu > Export (CSV/Excel)
Via CLI
Programmatic Export
Workflow 7: Frappe REST API Authentication
API Key + Secret (Server-to-Server)
OAuth Bearer Token
Session-Based (Login)
Integration Patterns: Sync vs Async
| Pattern | When to Use | Implementation | |
|---|---|---|---|
| Synchronous | Response needed immediately | Direct API call in controller | |
| Async (enqueue) | External call > 5s | frappe.enqueue("myapp.api.sync_record", doc_name=doc.name) | |
| Webhook | Push on event | Webhook DocType configuration | |
| Scheduled sync | Periodic batch | scheduler_events in hooks.py | |
| Real-time | Live updates | Socket.IO + frappe.publish_realtime() |
Retry Pattern
Version Differences
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/impl/frappe-impl-integrations/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 26
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openaec-foundation/frappe_claude_skill_package/frappe-impl-integrations)