feat: add api_integration tracking to Dify and n8n integrations#10
feat: add api_integration tracking to Dify and n8n integrations#10
Conversation
Enables usage attribution by sending api_integration in the request body so the backend can track which integration surface API calls originate from (e.g., "dify", "n8n") in PostHog analytics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes add an 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
Summary
api_integrationfield to the request body payload for both Dify ("dify") and n8n ("n8n") integrationsrequest_originis'api'andapi_integrationspecifies the client (per London's implementation in mino)Changes
dify/tools/base.py— Added"api_integration": "dify"to_build_automation_payload(), coveringrun,run-async, andrun-sseendpointsn8n/nodes/Tinyfish/GenericFunctions.ts— Addedapi_integration: 'n8n'tobuildAutomationPayload(), covering all automation requests including SSETest plan
api_integration: "dify"in request body for all automation endpointsapi_integration: "n8n"in request body for all automation endpointsapi_integrationappears in PostHogrun_completedevents after backend processes these requests🤖 Generated with Claude Code