Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Lindy AI integration patterns for webhook handling, HTTP actions, and Run Code. Use when building integrations, calling Lindy agents from code, or implementing the Run Code action with Python/JavaScript. Trigger with phrases like "lindy SDK patterns", "lindy best practices", "lindy API patterns", "lindy Run Code", "lindy HTTP Request".
.claude/skills/jeremylongshore-lindy-sdk-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 56% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 45% | 0% |
Lindy is primarily a no-code platform. External integration happens through three channels: Webhook triggers (inbound), HTTP Request actions (outbound), and Run Code actions (inline Python/JS execution via E2B sandbox). This skill covers patterns for each.
lindy-install-auth setupYour application fires webhooks to wake Lindy agents:
typescript// lindy-client.ts — Reusable Lindy webhook trigger client class LindyClient { private webhookUrl: string; private secret: string; constructor(webhookUrl: string, secret: string) { this.webhookUrl = webhookUrl; this.secret = secret; } async trigger(payload: Record<string, unknown>): Promise<{ status: number }> { const response = await fetch(this.webhookUrl, { method: 'POST', headers: { 'Authorization': `Bearer ${this.secret}`, 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }); if (!response.ok) { throw new Error(`Lindy webhook failed: ${response.status} ${response.statusText}`); } return { status: response.status }; } async triggerWithCallback( payload: Record<string, unknown>, callbackUrl: string ): Promise<{ status: number }> { return this.trigger({ ...payload, callbackUrl }); } } // Usage const lindy = new LindyClient( 'https://public.lindy.ai/api/v1/webhooks/YOUR_ID', process.env.LINDY_WEBHOOK_SECRET! ); await lindy.trigger({ event: 'lead.created', name: 'Jane Doe', email: 'jane@co.com' });
Configure a Lindy agent to call your API as an action step:
In Lindy Dashboard — Add HTTP Request action:
https://api.yourapp.com/processAuthorization: Bearer {{your_api_key}}, Content-Type: application/json Send the processed data as JSON with fields matching the API schema. Include: name from {{trigger.data.name}}, analysis from previous step.
Your API endpoint receives the call:
typescript// Your API receiving Lindy agent calls app.post('/process', async (req, res) => { const { name, analysis } = req.body; const result = await processData(name, analysis); res.json({ result, processedAt: new Date().toISOString() }); });
Execute Python or JavaScript directly in Lindy workflows. Code runs in isolated Firecracker microVMs with ~150ms startup time.
Python example (data transformation in a workflow):
python# Run Code action — Python # Input variables: raw_data (string from previous step) import json data = json.loads(raw_data) # Input vars are always strings # Process cleaned = [ {"name": item["name"].strip(), "score": float(item["score"])} for item in data["items"] if float(item["score"]) > 0.5 ] # Sort by score descending cleaned.sort(key=lambda x: x["score"], reverse=True) # Return value accessible as {{run_code.result}} in next step return json.dumps({"filtered_count": len(cleaned), "items": cleaned})
JavaScript example (API call + processing):
text// Run Code action — JavaScript // Input variables: query (string), api_key (string) const response = await fetch(`https://api.example.com/search?q=${query}`, { headers: { 'Authorization': `Bearer ${api_key}` } }); const data = await response.json(); const summary = data.results.map(r => `${r.title}: ${r.snippet}`).join('\n'); return JSON.stringify({ count: data.results.length, summary });
Run Code outputs (available to subsequent steps):
| Output | Contents | |--------|----------| | {{run_code.result}} | Value from return statement | | {{run_code.text}} | stdout from print() / console.log() | | {{run_code.stderr}} | Error output for debugging |
Available Python libraries: pandas, numpy, scipy, scikit-learn, matplotlib, requests, aiohttp, beautifulsoup4, nltk, spacy, openpyxl, python-docx
Key constraint: All input variables arrive as strings. Cast explicitly: count = int(count_str), data = json.loads(json_str)
Send a callbackUrl in your webhook payload. Lindy can respond back using the Send POST Request to Callback action:
typescript// Your app triggers Lindy with a callback URL await lindy.trigger({ event: 'analyze.request', data: { text: 'Analyze this quarterly report...' }, callbackUrl: 'https://api.yourapp.com/lindy-callback' }); // Your callback handler receives Lindy's response app.post('/lindy-callback', (req, res) => { const { analysis, sentiment, summary } = req.body; saveAnalysis(analysis); res.sendStatus(200); });
typescriptasync function triggerWithRetry( client: LindyClient, payload: Record<string, unknown>, maxRetries = 3 ): Promise<void> { for (let attempt = 0; attempt <= maxRetries; attempt++) { try { await client.trigger(payload); return; } catch (error: any) { if (attempt === maxRetries) throw error; const delay = Math.pow(2, attempt) * 1000; // 1s, 2s, 4s console.warn(`Retry ${attempt + 1}/${maxRetries} in ${delay}ms`); await new Promise(r => setTimeout(r, delay)); } } }
| Pattern | Failure Mode | Solution | |---------|-------------|----------| | Webhook trigger | 401 Unauthorized | Verify Bearer token matches dashboard secret | | HTTP Request action | Target API unreachable | Check URL, verify HTTPS, test with curl | | Run Code | Timeout | Avoid infinite loops; keep execution under 30s | | Run Code | Import error | Use only pre-installed libraries (see list above) | | Callback | Callback URL unreachable | Ensure HTTPS endpoint is publicly accessible |
Proceed to lindy-core-workflow-a for full agent creation workflows.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 21,046 | 16,047 | -24% | 1 | 1 | 0% | 3,182 | 3,965 | +25% | 0 | 0 | — |
case-02 | fail→pass | 24,791 | 20,028 | -19% | 1 | 1 | 0% | 3,961 | 5,106 | +29% | 0 | 0 | — |
case-03 | pass→pass | 24,826 | 17,439 | -30% | 1 | 1 | 0% | 3,864 | 3,859 | -0% | 0 | 0 | — |
case-04 | fail→pass | 17,999 | 16,068 | -11% | 1 | 1 | 0% | 2,571 | 3,925 | +53% | 0 | 0 | — |
case-05 | fail→pass | 16,682 | 13,519 | -19% | 1 | 1 | 0% | 2,161 | 3,367 | +56% | 0 | 0 | — |
case-06 | fail→pass | 16,079 | 9,484 | -41% | 1 | 1 | 0% | 1,779 | 2,581 | +45% | 0 | 0 | — |
case-07 | fail→pass | 20,087 | 11,459 | -43% | 1 | 1 | 0% | 2,677 | 3,039 | +14% | 0 | 0 | — |
case-08 | fail→pass | 19,860 | 11,932 | -40% | 1 | 1 | 0% | 2,479 | 3,472 | +40% | 0 | 0 | — |
case-09 | pass→pass | 16,825 | 13,587 | -19% | 1 | 1 | 0% | 1,912 | 3,307 | +73% | 0 | 0 | — |
case-10 | pass→pass | 26,231 | 20,242 | -23% | 1 | 1 | 0% | 3,254 | 5,125 | +57% | 0 | 0 | — |
case-11 | fail→pass | 9,859 | 8,532 | -13% | 1 | 1 | 0% | 1,275 | 2,407 | +89% | 0 | 0 | — |
case-12 | pass→pass | 16,500 | 19,132 | +16% | 1 | 1 | 0% | 2,627 | 3,722 | +42% | 0 | 0 | — |
case-13 | fail→pass | 20,353 | 9,156 | -55% | 1 | 1 | 0% | 2,219 | 3,085 | +39% | 0 | 0 | — |
case-14 | fail→pass | 15,161 | 8,378 | -45% | 1 | 1 | 0% | 2,479 | 2,936 | +18% | 0 | 0 | — |
case-15 | pass→pass | 13,841 | 14,547 | +5% | 1 | 1 | 0% | 2,455 | 3,135 | +28% | 0 | 0 | — |
case-16 | pass→pass | 16,003 | 14,633 | -9% | 1 | 1 | 0% | 2,287 | 3,456 | +51% | 0 | 0 | — |
case-17 | pass→pass | 13,229 | 10,956 | -17% | 1 | 1 | 0% | 1,840 | 2,541 | +38% | 0 | 0 | — |
case-18 | fail→pass | 10,167 | 2,689 | -74% | 1 | 1 | 0% | 1,614 | 2,064 | +28% | 0 | 0 | — |
case-19 | fail→pass | 9,934 | 14,705 | +48% | 1 | 1 | 0% | 1,865 | 3,254 | +74% | 0 | 0 | — |
case-20 | pass→pass | 18,566 | 10,816 | -42% | 1 | 1 | 0% | 2,217 | 3,578 | +61% | 0 | 0 | — |
case-21 | pass→pass | 19,064 | 19,296 | +1% | 1 | 1 | 0% | 2,605 | 5,217 | +100% | 0 | 0 | — |
case-22 | fail→pass | 20,878 | 25,096 | +20% | 1 | 1 | 0% | 3,015 | 5,503 | +83% | 0 | 0 | — |
case-23 | pass→pass | 17,171 | 8,356 | -51% | 1 | 1 | 0% | 1,987 | 2,313 | +16% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +57 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.