Integrations

Pipedream

Run Thunderbit from a Pipedream Code step — Node.js or Python, your call

Pipedream is the developer-friendly cousin of Zapier — every workflow is a real script you can edit. Use a Code step for full control or the HTTP / Webhook action for the no-code path.

Code step (Node.js)

import { defineComponent } from '@pipedream/core';

export default defineComponent({
  props: {
    thunderbit: { type: 'app', app: 'thunderbit' }, // or use an env var
    url:        { type: 'string' },
  },
  async run({ steps, $ }) {
    const res = await fetch(
      'https://openapi.thunderbit.com/openapi/v1/distill',
      {
        method: 'POST',
        headers: {
          Authorization: `Bearer ${process.env.THUNDERBIT_API_KEY}`,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({ url: this.url, renderMode: 'basic' }),
      },
    );
    const json = await res.json();
    return json.data.markdown;
  },
});

Code step (Python)

import os, httpx

def handler(pd: "pipedream"):
    res = httpx.post(
        "https://openapi.thunderbit.com/openapi/v1/distill",
        headers={"Authorization": f"Bearer {os.environ['THUNDERBIT_API_KEY']}"},
        json={"url": pd.steps["trigger"]["event"]["url"], "renderMode": "basic"},
        timeout=60.0,
    )
    return res.json()["data"]["markdown"]

Batch with HTTP source

For /batch/distill, add an HTTP / Webhook source as the trigger of a second workflow, then point Thunderbit's callback.url at the source URL Pipedream gives you. The trigger fires when the batch finishes — your downstream steps see the full results array.

Tips

  • Store the API key as a Pipedream Env Var (per-workspace or per-workflow), not in code
  • Pipedream's free tier limits compute per step — keep the Markdown trim before downstream LLM calls