Integrations
Connect only the services a real workflow needs. Ask for the smallest permissions, limit the data you send, and plan for failures you can recover from.
Content date: October 21, 2026.
Plain English
An integration crosses a border between two systems that have different credentials, uptime, limits, versions, and records. A screen that says "Connected" does not prove the permissions are right or that delivery is reliable. Before you wire in a provider, write down the operation, how their accounts map to your customers, what data moves, and what each response means. Keep provider-specific code behind a small adapter (one thin layer of code). That makes failures easy to test and upgrades easy to review.
Use this when
Add an integration when a tested workflow needs an outside service. Review it again whenever you change the provider, the scopes (the permissions you request), the API version, how credentials are stored, or which events you subscribe to.
If you are just starting
Pick one needed service and use public or made-up data. Draft the integration contract before you turn on access. Use recorded sample responses for the rest of the app. Use a provider's free sandbox only if its current terms and your account allow it. Label any simulated response, because it does not prove the real connection works. Do not add a CRM, calendar, or marketing tool just because a connector exists.
When your project grows
Use the provider's supported sign-in flow and the fewest scopes you can. Register exact redirect URLs and use PKCE and the state parameter, as the OAuth security best-current-practice document (RFC 9700, January 2025) requires or recommends. OAuth 2.1 was still an Internet-Draft in October 2026, so follow RFC 9700 and your provider's docs. Document how credentials expire, refresh, rotate, and get revoked, and keep secrets out of client code and logs. For incoming webhooks (messages a provider sends to your server), check the signature with the provider's official library on the raw request body, reject old timestamps, and check that the account and resource are yours and the event type is allowed. Save the work durably, then return a 2xx quickly. Track event IDs to skip duplicates, expect events out of order, and use limited retries with a reconciliation check for costly work. Watch for failures, offer a way to disconnect, and keep the rest of the product working during a provider outage.
Worked example
Orchard Club needs reservation receipts, not a CRM. A reservation saves locally together with a pending receipt job. When the email provider times out, the outcome is unknown, so the app does not say "sent" and does not blindly send again. The local practice program proves only the booking and job save. Sending and reconciling a real receipt needs the chosen provider's documented, tested contract.
Practice
Specify one recoverable integration
- Complete the workbook's integration card for one necessary capability, using the provider's current official documentation.
- Run the local booking-and-job exercise and find the line between work you saved and work the provider completed.
- Work through duplicate, out-of-order, wrong-account, revoked, timeout, and outage cases in the worksheet.
- Write down the minimum scopes, credential life cycle, signature and account checks, API version, how to disconnect, and your fallback.
- Mark each behavior as seen locally, documented by the provider, or still waiting for a real sandbox test.
Deliverable: One integration contract and failure table, with your local results and a checklist of what the provider still has to confirm.
Common mistakes to watch for
- A connected Google Calendar is saved under the wrong parent, so one family's tutoring sessions show up on another's calendar.
- A webhook body is trusted before its signature and account are checked, so anyone who finds the URL can mark an invoice paid.
- A timeout leads the app to send a second text-message reminder, which cannot be unsent.
- The app shows "Receipt sent" when the provider only acknowledged the request.
- A revoked API key keeps working in an old script or ends up in a log file.
Prompting
A weak prompt
Connect every useful service and keep retrying failed requests until they work.
A better prompt
Connect the smallest outside capability this workflow needs: [describe it, for example emailing a booking receipt]. Write a contract covering the provider, API version, scopes, data sent, and credential life cycle. Build and test the real sign-in and webhook-signature checks where the provider allows, and label stand-ins clearly. Save accepted work durably, and show separate states for pending, unknown, failed, and completed. Test duplicates, out-of-order events, revoked access, a timeout after the action may have succeeded, and a provider outage. List the provider checks we cannot verify yet.
Writing down who has authority and how each failure behaves, before the connection touches real records, keeps a provider outage or bad event from corrupting your data.
Check before you move on
- A real user task justifies the service.
- You mapped provider accounts to your customers and records.
- You wrote down the scopes and the credential life cycle.
- Incoming events are authenticated.
- Your app shows pending, unknown, and failed states honestly.
- You separated checks against the real provider from checks against stand-ins.
You are done when
- Another builder can find the provider contract and say who may perform each operation.
- Your report does not claim live sign-in, signed-webhook, or delivery testing when you only ran a local stand-in.
Questions to think about
A webhook arrives with a valid signature. Can it update any customer's record in your database?
No. The signature shows the message came from the provider, not that it is about the right account. Check the account, the resource, and the event type against your own records.
Your call to an email provider times out, and the message might have gone out. Should the app send a fresh request right away?
No. A missing response does not prove nothing happened. Keep the state as unknown and use the provider's idempotency key or a status lookup before repeating the action.
Your local database shows a pending receipt job. Does that mean the parent got the email?
No. It shows your app saved the intent to send. Provider acceptance and actual delivery are separate states that need their own evidence.