Adding an integration
Describe what you want to connect:“Connect to Slack so the care team gets notified in #intake.”or
“I need to call our EHR API when a patient is admitted.”The system identifies the integration type, prompts for credentials and required configuration (API key, base URL, auth scopes), and creates the integration at the project level. Once created, any workflow in the project can reference it.
Available integration types
AI Studio ships these first-class integration types:
For anything not on this list — a billing provider, an SMS gateway — use
custom_http: provide the base URL, auth scheme, and endpoint schema, and the system wraps it as a standard integration adapter with the same policy, audit, and sandbox behavior as a first-class type. Credentials and bindings for custom_http integrations can also be managed programmatically via the integrations API.
FHIR (EHR) connector
Thefhir integration reads FHIR R4 resources from your own EHR. It is read-only: there is no create or update operation, so nothing built on it writes back to the EHR. Because every EHR response is PHI, reads run only for an organization on a paid plan with an active BAA — workflow steps and agent tools alike; sandbox previews use synthetic resources and are unaffected.
Connect it in Settings → Integrations → FHIR (EHR):
- Generate a client key (ES384 or RS384) — or upload your own PEM private key. The page shows the key’s public JWK; the private key is write-only and never shown again.
- Register the public JWK with your EHR as a SMART Backend Services (system-level,
private_key_jwt) client. Your EHR issues a client ID and decides which resources the client may read. - Enter the FHIR base URL and client ID. The token endpoint is discovered from the server’s
.well-known/smart-configuration; set it explicitly if your server does not publish one. The default scope issystem/*.read.
/metadata.
The EHR is your own third-party system, reached with credentials you register: HASP orchestrates, gates, and audits each call, and the EHR vendor’s billing stays between you and them.
The access token is only ever sent to the FHIR server’s own origin, and
page_url / status_url must point back at it. SMART access tokens are cached for their lifetime, so paging and status polling don’t request a new token every time. Each response is capped at 10 MB, including a single Bulk Data output file. Use _type and _since to keep export files under that size.
Every call is an integration call like any other — rate-limited and recorded on the audit chain — except that its request is not PHI-redacted (see above). Agents reach the same connector through the fhir.read and fhir.search tools, which require PHI read access. To start an app from EHR data, use the EHR Records (FHIR) template — FHIR-shaped Patients, Practitioners, Appointments and Coverages, plus an Import from EHR workflow whose fhir.import steps upsert records by FHIR id. A fhir.import search follows the server’s next links up to max_pages (default 20, at most 100); if the cap stops it early, the step output’s next_page_url is set.
Using integrations in workflows
Reference an integration by name in chat:“When the intake form is submitted, use the email integration to send a confirmation to the patient.”The system compiles a workflow step with:
- The integration adapter bound to this project’s email credentials
- Input schema derived from the entity fields you specify
- Output schema declared by the adapter (for downstream step use)
Sandbox behavior
In sandbox mode, integration calls are edge-sandboxed: the runtime never makes real outbound calls. Instead, each integration adapter declares a response schema; the sandbox produces schema-derived mock responses. Thefhir integration’s mock responses are schema-valid FHIR R4 resources (Patient, Practitioner, Appointment, Coverage, DocumentReference), so a workflow that reads from the EHR previews end to end before any EHR is connected.
Trace view in sandbox shows side-effect markers as “would have sent X” rather than “sent X.” You see the exact payload that would have been sent and a plausible mock response without touching any real external system.
Real provider sandbox credentials (a provider’s own test keys or sandbox accounts) are not used. Edge-sandboxing is the sandbox behavior for every integration.
Data-change events from integrations
Some integrations expose inbound data-change events — for example, a HubSpot contact updated or a file added to a Drive folder. When the integration adapter supports it, these manifest as data-change events on integration-cached entities, and workflows can trigger on them.Credential management
Integration credentials are stored encrypted at the project level. They are:- Not exposed to workflow contracts (the contract references the integration by name, not by credential)
- Accessible only to workflows within the project
- Audited on every use