Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gainable.dev/llms.txt

Use this file to discover all available pages before exploring further.

What Connect does

Gainable Connect is the integration layer between your Gainable app and external systems. For Gaia Autopilot, Connect plays two roles:
  • Outbound. The targets agents can reach when they call tools like send_slack or call_external.
  • Inbound. The sources that fire webhook triggers.
If you’ve used datasets for ingesting data, Connect is the same idea applied to action and event flow. Datasets bring data in for the Copilot and the build agents to read. Connect routes outbound work and inbound events for agents.

Outbound channels

Every outbound integration lives behind a typed tool and inherits a default risk tier. The org configures credentials once; the agent calls the tool.

Slack

- tool: send_slack
  channel: "#sales-ops"
  text: "Pipeline summary"
  blocks: "{{ rendered }}"
CapabilityNotes
ChannelsPublic, private (with bot installed)
DMsYes, to bot-installed users
Threadingthread_ts parameter
Default risk tierHigh (draft-and-approve)
Common graduationInternal channels can graduate to auto_with_undo

SMS

- tool: send_sms
  to: "{{ contact.phone }}"
  body: "{{ message }}"
CapabilityNotes
ProviderTwilio (default), configurable
Delivery receiptsLogged in action log
Default risk tierHigh (draft-and-approve), no auto-with-undo path
NotesSMS undo isn’t possible. Always draft-and-approve unless explicitly opted-in

Calendar

Outbound calendar operations through the configured calendar provider (Google Calendar, Microsoft 365).
- tool: call_external
  via: calendar
  action: create_event
  calendar_id: "{{ user.calendar_id }}"
  event:
    title: "Follow-up: {{ deal.name }}"
    start: "{{ next_business_day_at_2pm }}"
    duration_minutes: 30
    attendees:
      - "{{ contact.email }}"
CapabilityNotes
Create eventYes, draft-and-approve by default
Update eventYes, with undo window
Delete eventYes, draft-and-approve only
Default risk tierHigh (calendars are user-visible)

DocuSign

- tool: call_external
  via: docusign
  action: send_envelope
  template_id: "{{ template_id }}"
  recipients:
    - email: "{{ contact.email }}"
      name: "{{ contact.name }}"
      role: "Signer"
CapabilityNotes
Send envelopeAlways draft-and-approve. No exceptions.
VoidingAllowed with explicit user action
Default risk tierHigh (legally binding), no auto path

Stripe

- tool: call_external
  via: stripe
  action: create_invoice
  customer: "{{ stripe_customer_id }}"
  items:
    - amount: "{{ amount_cents }}"
      currency: usd
      description: "{{ description }}"
CapabilityNotes
Create invoiceDraft-and-approve
Capture paymentDraft-and-approve only
RefundDraft-and-approve only
Default risk tierHigh (financial operations), no auto path

Generic webhooks (call_external)

When the registry doesn’t have a dedicated tool, use call_external.
- tool: call_external
  method: POST
  url: "https://api.example.com/notify"
  headers:
    Authorization: "Bearer {{ secrets.example_key }}"
  body:
    event: "deal_lost"
    deal_id: "{{ deal.id }}"
The runtime can’t reason about what an arbitrary endpoint does, so the default tier is high. If the call is well-understood and idempotent, it can be graduated.

Inbound webhooks (as triggers)

Inbound webhooks become webhook triggers on a playbook. The runtime provisions a unique URL per trigger and verifies signatures where the source supports it.

Provisioning

When you add a webhook trigger, Connect generates a URL:
https://api.gainable.dev/webhooks/{app_id}/{trigger_id}
You configure the source system to POST to that URL.

Signature verification

SourceVerification method
StripeStripe-Signature header, HMAC-SHA256
GitHubX-Hub-Signature-256 header
SendGridPublic key signature on each event
TwilioX-Twilio-Signature header
GenericHMAC if shared secret is configured, else IP allow-list
The runtime rejects unverified webhooks before the playbook runs. Rejections are logged in the action log for debugging.

Common inbound sources

SourceExample eventsCommon playbook
Stripeinvoice.payment_failedDraft a payment-failure recovery email
Stripecustomer.subscription.deletedDraft a churn outreach
SendGridbounce, spamreportMark contact as undeliverable, exclude from future drafts
GitHubissue.openedRoute to engineering Autopilot
Calendarevent.createdDraft a pre-meeting briefing
Twilioinbound SMSDraft a reply suggestion to the assigned rep

Configuring credentials

Credentials are stored at the org level, not per-app. To add a Slack workspace, a Stripe key, or a Twilio account, the org admin connects it once. All apps in the org can use the connected services through the tool registry.
Connect our Slack workspace so agents in the
sales app can post to #sales-ops.
Add the Stripe production key for the
billing app's invoice playbook.
Credentials never appear in the action log. They’re referenced by name (e.g. secrets.stripe_key); the runtime resolves them at call time and never logs the resolved value.

Allow-lists for outbound recipients

For external messaging tools (send_email, send_slack to external workspaces, send_sms), Connect supports allow-lists at the org level:
Allow-listWhat it does
Allowed email domainsDrafts to other domains are blocked at send time
Allowed phone country codesDrafts to other countries are blocked at send time
Allowed Slack workspacesDrafts to other workspaces are blocked at send time
do_not_contact collectionA list of recipients excluded regardless of domain
The allow-list is applied after the draft is approved but before the underlying tool runs. A user can approve a draft and still see it blocked if the recipient isn’t allowed.

Best practices

Inbound webhooks without signature verification are an attack surface. Configure the secret on the source side and the runtime will reject anything unsigned.
A new sales agent can email acmecorp.com and gainable.dev. After a clean approval history, expand. Loud allow-lists invite mistakes.
Every call_external is a system the runtime can’t reason about. Prefer a first-class tool when one exists. If you find yourself using call_external for the same target repeatedly, that target is a candidate for promotion.
Capture a real payload from the source, then replay it through Simulate on last 30 days. It’s the safest way to verify your filter and steps.

Learn more

Tools

The fixed registry, including outbound tools

Triggers

Webhook trigger configuration

Risk tiers

Default tiers per outbound channel

Datasets

Inbound data ingestion (different from action and event flow)