feat: add Webhook Trigger & Response nodes — opening Node Banana to external automation#56
Open
8digit wants to merge 1 commit intoshrimbly:developfrom
Open
feat: add Webhook Trigger & Response nodes — opening Node Banana to external automation#568digit wants to merge 1 commit intoshrimbly:developfrom
8digit wants to merge 1 commit intoshrimbly:developfrom
Conversation
…ution - Add Webhook Trigger node with configurable image inputs, text, and auth secret - Add Webhook Response node accepting both image and video connections - Implement async execution with callback URL for external platforms - Propagate source URLs from all providers (WaveSpeed, Replicate, Fal) through pipeline - Keep callback payloads small by sending media URLs instead of base64
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This is great! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Why this matters
Until now, Node Banana workflows could only be triggered manually from the canvas. This PR changes that. By adding webhook-based execution, any platform that can send an HTTP request can now trigger a Node Banana workflow — Airtable, n8n, Make, Zapier, custom scripts, or anything else.
This is a meaningful step toward making generative AI workflows more accessible. Creators who already use automation tools can now plug Node Banana into their existing pipelines without writing code or understanding the internals. Design a workflow once on the canvas, expose it via webhook, and let external systems handle the rest.
What's included
Two new nodes:
Webhook Trigger — Exposes a unique URL endpoint (
/api/webhook/{workflow-name}) that accepts POST requests with images, text prompts, and configuration. Supports configurable image inputs (1-5), optional text input, and optional auth secret.Webhook Response — Captures the final output (image or video) and sends it back to a callback URL. Accepts both image and video connections.
Async execution with callback:
Since AI generation takes 30-120+ seconds, the webhook immediately returns a
jobIdand executes in the background. On completion, it POSTs results to the providedcallbackUrlwith the generated media URL.Generic source URL propagation:
/api/generatenow preserves the original media URL from any provider (WaveSpeed, Replicate, Fal, etc.) assourceUrlalongside base64. This keeps callback payloads small and compatible with external platforms that expect URLs.How it works
Files changed
src/types/webhook.ts— AddedrecordIdto webhook request type,sourceUrlto generate responsesrc/app/api/webhook/[workflowId]/route.ts— Async execution with callback, media URL extractionsrc/app/api/generate/route.ts— All providers now returnsourceUrlwhen media was fetched from a URLsrc/lib/executor/headlessExecutor.ts— Generate nodes storesourceUrl, webhookResponse resolves upstream media URL with fallback (image or video)src/components/WorkflowCanvas.tsx— Video input handle for webhookResponsesrc/components/ConnectionDropMenu.tsx— WebhookResponse added to video target optionsTested with
Future improvements (not in this PR)