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:
Build authentication
Configure authentication in the main connector file. The common patterns:- API Key (Bearer)
- API Key (Header)
- Basic Auth
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:Alternative: push and link an account instead
Alternative: push and link an account instead
Rather than local credential files, you can push the connector and link an account in the dashboard, then run against that account by ID:
[profile] is the name you set with stackone init.A pushed connector appears in the dashboard alongside the StackOne ones, so linking an account against it is the same flow as any other connector: create a connector profile, then link an account. Other linking methods are covered in Linking Accounts.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.
validate with --watch keeps checking as you edit, so you catch schema mistakes without rerunning by hand.
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
Empty or incorrect results
Empty or incorrect results
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: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:
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.