Help us improve
Share bugs, ideas, or general feedback.
This skill should be used when the user asks about "connector planning", "code patterns", "defining schema", "best practices workato", "error handling workato", "connector architecture", "object_definitions patterns", "reusable methods", or needs advanced guidance for building production-quality Workato connectors.
npx claudepluginhub grailautomation/claude-plugins --plugin workato-connector-sdkHow this skill is triggered — by the user, by Claude, or both
Slash command
/workato-connector-sdk:workato-connector-sdk-advancedThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for advanced connector development patterns, architecture planning, and best practices.
references/guides__advanced-connector-guide__connector-building-building-actions.mdreferences/guides__advanced-connector-guide__connector-building-building-triggers.mdreferences/guides__advanced-connector-guide__connector-building-code-patterns.mdreferences/guides__advanced-connector-guide__connector-building-defining-schema.mdreferences/guides__advanced-connector-guide__connector-planning.mdreferences/guides__advanced-connector-guide__introduction.mdreferences/guides__best-practices.mdreferences/guides__debugging.mdreferences/guides__error-handling.mdCreates new API connectors or providers that match a repository's exact existing integration pattern—layout, config, auth, error handling, tests—without inventing a second architecture.
Generates system-to-system API connectors with authentication (OAuth, API key, JWT), rate limit handling, data mapping, error recovery with circuit breakers, and sync monitoring.
Documents the Airbyte per-connector typed SDK packages: public API, connector discovery, PydanticAI patterns, and Anthropic SDK integration.
Share bugs, ideas, or general feedback.
Guide for advanced connector development patterns, architecture planning, and best practices.
Building production-quality connectors requires:
Before building a connector, analyze:
Authentication
Data Model
Operations
Webhooks/Events
Rate Limits
Organize connector code logically:
{
title: 'My Connector',
# 1. Connection & Auth
connection: { ... },
# 2. Reusable Methods
methods: { ... },
# 3. Object Definitions (Schemas)
object_definitions: { ... },
# 4. Pick Lists
pick_lists: { ... },
# 5. Actions
actions: { ... },
# 6. Triggers
triggers: { ... },
# 7. Streams (if needed)
streams: { ... }
}
Extract common logic into methods:
methods: {
# Pagination helper
paginate: lambda do |endpoint, params = {}|
results = []
page = 1
loop do
response = get(endpoint).params(params.merge(page: page, per_page: 100))
results.concat(response['items'])
break unless response['has_more']
page += 1
end
results
end,
# Error handling wrapper
safe_request: lambda do |&block|
block.call
.after_error_response(/4\d{2}/) do |code, body, headers, message|
error("API Error (#{code}): #{body['error'] || message}")
end
.after_error_response(/5\d{2}/) do |code, body, headers, message|
error("Server Error (#{code}): Please try again later")
end
end,
# Field mapping
map_fields: lambda do |record, field_map|
field_map.each_with_object({}) do |(api_field, workato_field), result|
result[workato_field] = record[api_field] if record[api_field]
end
end
}
execute: lambda do |connection, input|
records = call('paginate', '/api/records', { status: 'active' })
records.map { |r| call('map_fields', r, { 'id' => 'record_id', 'name' => 'title' }) }
end
Define reusable schemas:
object_definitions: {
# Base record schema
record: {
fields: lambda do |connection, config_fields|
[
{ name: 'id', label: 'Record ID' },
{ name: 'name', label: 'Name' },
{ name: 'created_at', label: 'Created At', type: 'date_time' },
{ name: 'updated_at', label: 'Updated At', type: 'date_time' }
]
end
},
# Input-specific schema (writable fields only)
record_input: {
fields: lambda do |connection, config_fields|
[
{ name: 'name', label: 'Name', optional: false },
{ name: 'email', label: 'Email', control_type: 'email' },
{ name: 'status', control_type: 'select', pick_list: 'statuses' }
]
end
},
# Dynamic schema based on config
dynamic_record: {
fields: lambda do |connection, config_fields|
object_type = config_fields['object_type']
get("/api/schemas/#{object_type}")['fields'].map do |field|
{
name: field['name'],
label: field['label'],
type: field['type'],
optional: !field['required']
}
end
end
}
}
Combine schemas:
input_fields: lambda do |object_definitions|
[
{ name: 'id', optional: false }
].concat(object_definitions['record_input'])
end
execute: lambda do |connection, input|
post('/api/records')
.payload(input)
.after_error_response(400) do |code, body, headers, message|
# Validation errors
errors = body['errors']&.map { |e| e['message'] }&.join(', ')
error("Validation failed: #{errors || body['message']}")
end
.after_error_response(401) do |code, body, headers, message|
error("Authentication failed. Please reconnect.")
end
.after_error_response(403) do |code, body, headers, message|
error("Permission denied: #{body['message']}")
end
.after_error_response(404) do |code, body, headers, message|
error("Resource not found")
end
.after_error_response(429) do |code, body, headers, message|
retry_after = headers['Retry-After']
error("Rate limited. Retry after #{retry_after} seconds")
end
.after_error_response(/5\d{2}/) do |code, body, headers, message|
error("Server error (#{code}). Please try again later.")
end
end
actions: {
create_with_retry: {
execute: lambda do |connection, input|
post('/api/records').payload(input)
end,
retry_on_response: [429, 503],
max_retries: 3
}
}
create_record, search_contacts)new_ prefix (new_record, new_event)control_type: 'password'# Add debug output
execute: lambda do |connection, input|
workato.log("Input: #{input.inspect}")
response = get('/api/records')
workato.log("Response: #{response.inspect}")
response
end
| Issue | Cause | Solution |
|---|---|---|
| "undefined method" | Method not defined | Check method name spelling |
| Empty response | Wrong endpoint/params | Log request, check API docs |
| Auth fails | Token expired | Implement token refresh |
| Missing fields | Schema mismatch | Update object_definitions |
For detailed documentation:
references/guides__advanced-connector-guide__introduction.md - Guide overviewreferences/guides__advanced-connector-guide__connector-planning.md - Planning checklistreferences/guides__advanced-connector-guide__connector-building-defining-schema.md - Schema designreferences/guides__advanced-connector-guide__connector-building-building-actions.md - Action patternsreferences/guides__advanced-connector-guide__connector-building-building-triggers.md - Trigger patternsreferences/guides__advanced-connector-guide__connector-building-code-patterns.md - Code patternsreferences/guides__best-practices.md - General best practicesreferences/guides__error-handling.md - Error handling patternsreferences/guides__debugging.md - Debugging techniques