Integration
Python
Webhook Trigger

Webhook Relay (Python)

Receive a webhook, transform the payload, and forward to another URL using Python.

Why this automation is needed

Native HubSpot workflows often struggle with complex multi-object traversals, conditional lookback attribution windows, custom phone format standardizations, and custom scoring calculations.

With Workflood, this recipe runs in a secure gVisor container sandbox with pre-authenticated HubSpot SDK injection, avoiding HubSpot Data Hub execution limits, memory bottlenecks, and per-seat fees.

Action Source Code (Python)

webhook-relay-python.py
Python
import datetime

def main(input_data, hs_client, http_client, secret, console):
    # Transform the incoming payload
    transformed = {
        "source": "wackyflow",
        "receivedAt": datetime.datetime.utcnow().isoformat() + "Z",
        "data": input_data
    }

    dest_url = secret('DESTINATION_URL') or 'https://hooks.example.com/incoming'
    dest_auth = secret('DESTINATION_AUTH')

    opts = {
        "headers": { "X-Source": "wackyflow" }
    }
    if dest_auth:
        opts["auth"] = dest_auth

    response = http_client.post(dest_url, transformed, opts)

    return {"forwarded": True, "status": response.get("status")}

How to deploy in Workflood

1

Connect your HubSpot Portal

Add your HubSpot Private App token once. Workflood securely encrypts it via libsodium XChaCha20 and injects pre-authenticated SDK clients.

2

Create Action from Template

Select this recipe in Workflood. Edit variables, customize logic in Monaco editor, or execute dry runs with sample JSON payloads.

3

Trigger via Webhook or Cron

Trigger from standard HubSpot workflows via Webhook action, or schedule recurring batch syncs with cron expressions and timezone handling.

Ready to run

Deploy in Workflood

Single Portal is $79/mo flat with unlimited team seats, 50,000 runs/mo, and no per-seat costs.

Node 20 & Python 3.11 runtimes
gVisor micro-container sandbox
60s execution timeout (vs HubSpot 20s)
Two-way GitHub repository sync
Instant rollback & version history