Skip to main content
Building a connector is a loop, and the order matters: every action you write depends on authentication already working. Validate each stage before moving to the next. This assumes you’ve already got the CLI installed and authenticated.

Pull existing or create

Always check whether a connector already exists before writing one, since starting from the registry gives you a working foundation. Files save to ./connectors/[provider]/ by default:
If nothing exists to pull, the agent writes the files for you, laid out as described in File Structure.

Build authentication

Don’t move on until authentication works. Everything else depends on it.
Configure authentication in the main connector file. The common patterns:
Add one simple action — a list_users or equivalent — and use it to prove authentication works before building anything else.

Connect an account

Most providers offer sandbox or developer accounts. Check the provider’s developer portal to sign up and generate credentials, and note any rate limits or restrictions that apply to sandbox access. For local development, keep the account config and credentials in separate files:
Add credentials.json to .gitignore. Keep sandbox credentials separate from production ones.
Then run your test action against those files:

Build actions and iterate

With authentication proven, add your remaining actions to the resource partials. Each action is built from step functions. Then cycle: validate the syntax, run the action with --debug, fix, repeat. If the actions should return a normalized shape rather than the provider’s own, see Defined Output Schemas.
Running validate with --watch keeps checking as you edit, so you catch schema mistakes without rerunning by hand.
The Playground also runs your connector’s actions in natural language, which is handy for a quick check without the CLI.

Debugging

Add --debug to any stackone run to surface:
  • The raw HTTP request sent to the provider — URL, method, headers, body
  • The full response body, before any mapping is applied
  • The inputs and outputs of each step
  • The resolved values of any JSONPath or JEXL expressions
When mapping produces something unexpected, work backwards from the raw response:
1

Check the raw response first

Temporarily return the unmapped data so you can see what the provider actually sent:
2

Verify the response structure

Run with --debug and inspect the real paths:
3

Add fields one at a time

Start with a single field in map_fields, confirm it resolves, then add the rest.
4

Check the expression context

Inline fields in map_fields reference the field directly ($.email), not via the step ($.get_employees.email).

Publish

When the connector behaves, push it to your project’s registry so linked accounts can use it:
For team workflows, connectors are usually published through a Git pipeline rather than a direct push. See GitHub CI/CD.

Connector Versioning

Release new versions without breaking existing linked accounts.

Other ways to test

Once it’s published, stackone run is no longer the only way in. Each of these exercises the deployed version against a linked account’s real credentials, so they need a connector profile and a linked account first:
An action only shows up on these surfaces once it’s enabled on the connector profile.

Next steps

Defined Output Schemas

Map provider responses onto a schema of your own.

Step Functions

The building blocks each action is made of.

StackOne CLI

Full command reference for pull, validate, run, and push.

Implementing Events

Define the events your connector emits.