मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)7.6k · #13164

integration-webhooks

यह क्या करती है

यह स्किल serverless होस्ट पर चैट और ईमेल इंटीग्रेशन के आने वाले संदेश संभालने का तरीका बताती है। webhook काम सहेजता है और तुरंत जवाब देता है, और धीमा एजेंट काम एक अलग रन करता है। यह मैसेजिंग इंटीग्रेशन जोड़ने वाले डेवलपर्स के लिए है।

कब इस्तेमाल करें

  • ✓जब आप Slack या WhatsApp जैसा नया मैसेजिंग इंटीग्रेशन जोड़ रहे हैं।
  • ✓जब webhook के संदेश गायब हो रहे हों या दो बार जवाब मिल रहे हों।
  • ✓जब एजेंट का जवाब प्लेटफ़ॉर्म की प्रतिक्रिया अवधि से ज़्यादा समय लेता हो।

Skill का लिंक

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/integration-webhooks/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/integration-webhooks/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप हमारे ऐप को Slack से जोड़ सकते हैं, ताकि चैनल के सवालों का जवाब समय-सीमा पार किए बिना मिले?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

webhook आए संदेश को डेटाबेस में सहेजता है और तुरंत सफलता का जवाब लौटाता है। फिर एक अलग रन संदेश को प्रोसेस करता है, और डेटाबेस ही सच्चाई का स्रोत रहता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Integration Webhooks

Rule

Integration webhooks (Slack, Telegram, WhatsApp, email, Google Docs, etc.) must enqueue work to SQL and return 200 immediately, then process the work in a separate fresh function execution kicked off by a self-fired HTTP POST. SQL is always the source of truth. Long-lived hosts use an in-process retry loop as a best-effort safety net; serverless deployments must use an external durable sweep when recovery cannot depend on a process staying alive.

Do not run agent loops inside the webhook handler itself. Do not rely on fire-and-forget Promises after returning from a serverless handler — they get killed when the function freezes.

Why

Messaging platforms expect a 200 response within a tight window — Slack will retry after 3 seconds, and a retried event triggers duplicate agent runs. At the same time, an agent loop replying to the message can take 30–60+ seconds because it may make multiple LLM calls and tool calls.

Past attempts that don't work cross-host:

  • Fire-and-forget Promise.then(...) after returning — Lambda/Vercel/CF freeze the execution context the moment the response goes out. The promise is silently killed, the user gets no reply, and there's no error in the logs.
  • A platform background function as the queue — host-specific execution is useful as a delivery mechanism, but it cannot replace the SQL row or atomic claim shared by every host.
  • Cloudflare event.waitUntil() — CF Workers only, not portable.
  • Vercel Fluid / after() — Vercel-only, gated behind specific runtimes.
  • A long-lived in-process queue — fine on a single Node box, but on serverless every cold start gets a fresh queue and any pending work is lost.

The only universal answer: persist the work, then trigger a brand new function execution to do it. SQL is the queue, a self-webhook is the trigger, and a recurring job is the safety net.

The Flow

┌──────────┐    1. POST /integrations/:platform/webhook
│ Platform │────────────────────────────────────────────►┌──────────────────┐
└──────────┘                                             │ Webhook handler  │
                                                         │ (function exec 1)│
                                                         └──────────────────┘
                                                                  │
                            2. INSERT INTO integration_pending_tasks
                                 (status='pending', payload=...)
                                                                  │
                            3. dispatch POST /integrations/process-task
                                 — portable self-fire by default
                                 — acknowledged background handoff when enabled
                                                                  │
                            4. return 200 to platform ◄───────────┘

                                                         ┌──────────────────┐
                          5. POST arrives at processor   │ Processor        │
                             (separate fresh function)   │ (function exec 2)│
                                                         └──────────────────┘
                                                                  │
                            6. claimPendingTask(id) → status='processing'
                            7. runAgentLoop(...) — full timeout budget here
                            8. adapter.sendResponse(...) back to platform
                            9. markTaskCompleted(id)


                          ┌──────────────────────────────────────────────┐
                          │  Recovery sweep (every 60s) — safety net    │
                          │  Re-fires processor for tasks stuck in       │
                          │  'pending' or 'processing' beyond timeout.   │
                          │  Caps retries at 3 then marks 'failed'.      │
                          └──────────────────────────────────────────────┘

The webhook handler does as little as possible. The fresh function execution that handles _process-task gets its own full timeout budget for the agent loop.

Key Files

File Purpose
अक्सर पूछे जाने वाले सवाल

एजेंट को webhook के अंदर ही क्यों न चलाएं?

स्किल कहती है कि मैसेजिंग प्लेटफ़ॉर्म तेज़ जवाब की अपेक्षा करते हैं, और एजेंट रन में कहीं ज़्यादा समय लग सकता है।

डुप्लिकेट संदेशों का क्या?

हर इवेंट को पहले सहेजने से दोबारा भेजा गया इवेंट दूसरा रन शुरू नहीं करता।

self-fired अनुरोध क्या है?

यह ऐप द्वारा खुद को भेजा गया एक और HTTP अनुरोध है, ताकि धीमा काम एक नए निष्पादन में चले।

जानकारी

लेखक का मूल विवरण

Cross-platform pattern for handling messaging integration webhooks (Slack, Telegram, WhatsApp, email, etc.) on serverless hosts. Use when adding a new integration adapter, debugging dropped messages, or wiring long-running agent work into a webhook handler.

repo: BuilderIO/agent-native

लोकप्रियता

GitHub स्टार
7.6k
रैंकिंग में स्थान
#13164
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

design-exploration

7.6k

यह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।

डिज़ाइनइंटरफ़ेस (UI/UX)

visual-edit

7.6k

यह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।

डिज़ाइनइंटरफ़ेस (UI/UX)

turn-into-app

7.6k

यह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।

कोडिंगसामान्य कोडिंग

visual-plan

7.6k

यह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

मिलती-जुलती skills