Integrações
Pipedream
Rode a Thunderbit a partir de um Code step do Pipedream — Node.js ou Python, sua escolha
Pipedream é o primo dev-friendly do Zapier — todo workflow é um script real que você pode editar. Use um Code step para controle total ou a action HTTP / Webhook para o caminho no-code.
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 com fonte HTTP
Para /batch/distill, adicione uma fonte HTTP / Webhook como o trigger de um segundo workflow, depois aponte o callback.url da Thunderbit para a URL de fonte que o Pipedream lhe der. O trigger dispara quando o batch termina — seus passos downstream veem o array completo de resultados.
Dicas
- Armazene a API Key como uma Env Var do Pipedream (por workspace ou por workflow), não no código
- O tier gratuito do Pipedream limita o compute por step — mantenha o Markdown enxuto antes de chamadas LLM downstream