Common Integration Patterns
Tool-to-tool glue: Connecting SaaS tools your team uses. Examples:- Meeting transcription tool (Granola, Otter) → CRM (Attio) to automatically log conversations
- CRM → data warehouse for analysis
- Email → CRM to track outreach
- Calendar → CRM to log meetings
Validating API Responses
The investment team usually sees a filled-in field or an empty one. On the engineering side there are at least three possibilities: the vendor had no estimate, the lookup failed, or the company genuinely reported zero. Preserve the difference. If a request fails, keep the last successful observation and its date. Turning a failed request into a zero can make a company look like it lost its entire team overnight. The biggest source of problems in integrations is trusting external APIs to return what you expect. API schemas change. Vendors return errors in unexpected formats. Required fields are sometimes null. Data types don’t match documentation. For TypeScript: Zod. For Python: Pydantic. These libraries let you define schemas for your data and automatically validate objects against them.Webhook Handling
Many vendors (especially CRM systems) provide webhooks: they call your HTTP endpoint when events happen (company updated, deal stage changed, meeting logged). This is more efficient than polling their API constantly. Register an HTTPS endpoint with the vendor. For local testing with dummy data, webhook.site lets you inspect an incoming request. Verify signatures: Always verify that webhooks actually came from the vendor. They send a signature (usually HMAC of the body using a shared secret). Verify this before processing. Handle idempotency: Vendors may send the same webhook multiple times (network retries, their infrastructure issues). Make your webhook handler idempotent: processing the same event twice should be safe. Track event IDs you’ve seen and skip duplicates. Return quickly: Webhook handlers should return 200 OK within a few seconds. Don’t do expensive processing in the handler itself. Accept the webhook, queue the work, and return success. Process asynchronously. Consider the handoff between your endpoint and the worker that updates the CRM. If you acknowledge the webhook before saving anything and the process exits, the vendor thinks the update succeeded. If you save the job and the acknowledgement gets lost, the vendor may send it again. Store the event ID with the job and enforce uniqueness when you enqueue it. A second delivery should find the work already recorded. Have the worker use the same ID for any downstream write that supports idempotency. For someone running the pipeline meeting, the difference is visible: the company moves stages once, and the notes stay attached even if the CRM took a minute to respond. Keep failed jobs inspectable so you can replay one company’s update without importing the whole pipeline again.Rate Limits and API Costs
Your vendor might give the whole fund one request budget. If the nightly market-map refresh uses it up, an investor opening a company before a meeting hits the same limit. Have the background jobs share a rate limiter and leave room for interactive lookups. Check whether the quota counts requests or companies returned. Batching a hundred companies into one call can save you ninety-nine requests while costing exactly the same number of credits. If you have to stop a long import, save the next page cursor after the current page is stored. On restart, a repeated page should be cheap to process and a failed page should still be waiting for you. This also gives you something useful to tell the deal team when only part of their watchlist has been refreshed. Other ways to keep API costs down:- Only request data you actually need
- Cache responses so you don’t request the same data repeatedly
- Batch requests when possible
- Validate input before making API calls (don’t waste money on requests that will fail)
Retry failures selectively
Categorize errors- Retriable: 429 (rate limit), 503 (service unavailable), 504 (timeout), network errors. Retry with backoff.
- Non-retriable: 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found). Fix the problem or skip the request.
- Context-dependent: 500 (server error) might be temporary or might indicate a vendor bug. Retry a few times, but not indefinitely.