Skooh.io Logo
Back to blog
IntegrationDeveloper TutorialAugust 27, 20257 min

Using Skooh with Node-RED Behind the Firewall (HTTP In Node)

Receive webhooks in Node-RED flows, acknowledge fast, process in background, and replay for debugging.

Use Case

Node-RED is perfect for webhook-driven automation:

  • Visual flow design
  • Easy integrations
  • Low-code transformations

But Node-RED typically runs internally. Skooh brings external webhooks to it.

Setup

1. Create Skooh Endpoint

Create "Node-RED Webhooks" in Skooh.

2. Run the Skooh Proxy

Using the Desktop App:

  1. Download the Skooh Desktop App
  2. Enter your API key and hook token
  3. Set forwarding URL to your Node-RED (e.g., `http://localhost:1880/webhook\`)
  4. Click Connect

Using Docker:

docker run -d \\
  --name skooh-nodered \\
  -e SKOOH_TOKEN=nodered-webhooks \\
  -e SKOOH_API_KEY=your_api_key \\
  -e FORWARD_URL=http://nodered:1880/webhook \\
  --network nodered-network \\
  --restart unless-stopped \\
  skooh/proxy

3. Node-RED HTTP In Node

Note: See Node-RED's HTTP nodes documentation for details on handling HTTP requests.

Create a flow with HTTP In node:

  • Method: POST
  • URL: /webhook

The Fast-ACK Pattern

Webhook providers expect quick responses. Use this Node-RED pattern:

[HTTP In] → [Function: ACK] → [HTTP Response]
              ↓
         [Function: Process]
              ↓
         [Your Logic...]

ACK Function

// Immediately prepare response
msg.statusCode = 200;
msg.payload = { received: true };

// Clone for async processing
node.send([null, msg]);  // Second output for processing

return msg;  // First output for response

HTTP Response

Connect to first ACK output for immediate response.

Process Function

Connect to second ACK output:

// Process the webhook asynchronously
const webhook = msg.req.body;

msg.payload = {
    source: 'webhook',
    event: webhook.event,
    data: webhook.data,
    timestamp: new Date().toISOString()
};

return msg;

Example: Stripe → Node-RED → Slack

Flow:

[HTTP In] → [ACK] → [HTTP Response]
              ↓
        [Switch: event]
              ↓
   ┌────────────────────┐
   ↓                    ↓
[payment.success]  [payment.failed]
   ↓                    ↓
[Slack: Success]   [Slack: Alert]

Switch Node

Route by webhook type:

  • Property: `payload.type`
  • Rules:
    • == "payment_intent.succeeded" → Output 1
    • == "payment_intent.payment_failed" → Output 2

Slack Node

Use the Slack node to post messages.

Signature Verification

Add a function node before processing:

const crypto = require('crypto');

const sig = msg.req.headers['stripe-signature'];
const payload = JSON.stringify(msg.req.body);
const secret = env.get('STRIPE_WEBHOOK_SECRET');

// Parse signature
const parts = sig.split(',').reduce((acc, part) => {
    const [key, value] = part.split('=');
    acc[key] = value;
    return acc;
}, {});

// Verify
const expectedSig = crypto
    .createHmac('sha256', secret)
    .update(\`\${parts.t}.\${payload}\`)
    .digest('hex');

if (parts.v1 !== expectedSig) {
    node.error('Invalid signature');
    return null;
}

return msg;

Debugging with Replay

Node-RED debugging is visual, but triggering webhooks repeatedly is tedious.

Use Skooh Replay:

  1. Trigger a real webhook
  2. Find it in Skooh dashboard
  3. Click Replay
  4. Watch the flow execute in Node-RED
  5. Check debug panel
  6. Fix issues, replay again

No need to trigger real events!

Docker Compose

version: '3.8'

services:
  nodered:
    image: nodered/node-red
    ports:
      - "1880:1880"
    volumes:
      - nodered-data:/data

  skooh-proxy:
    image: skooh/proxy
    environment:
      SKOOH_TOKEN: nodered-webhooks
      SKOOH_API_KEY: \${SKOOH_API_KEY}
      FORWARD_URL: http://nodered:1880/webhook
    depends_on:
      - nodered
    restart: unless-stopped

volumes:
  nodered-data:

Production Tips

  1. Use flows for ACK: Always respond quickly
  2. Error handling: Add Catch nodes for failures
  3. Logging: Use Debug nodes liberally
  4. Replay testing: Test edge cases without real events
  5. Multiple endpoints: Create separate Skooh endpoints for different webhook sources

Set up Node-RED webhooks →

Written by Skooh Team

Share:

Ready to try Skooh?

Start receiving webhooks in your local environment in under 5 minutes.

Skooh | Using Skooh with Node-RED Behind the Firewall (HTTP In Node)