fetch, while input and output schemas keep the rest of your automation typed.
Add Zod as a direct project dependency for the action schemas:
automations/look-up-pokemon.automation.ts
getPokemon registers durable work and returns a signal; it does not call the API during composition. The handler runs later with schema-validated input, and Automate.ax validates its result before making the output available to respondToHttpRequest.
Handle provider failures
Throw when the provider does not return a usable response. Automate.ax retries execution failures before recording a failed action outcome, so use provider-supported idempotency keys for custom actions that create or change data. Parse untrusted response data with a maintained schema library. Do not castresponse.json() to the expected type.
Use authenticated APIs safely
Do not hardcode API keys in source code or pass credentials through action inputs or signals. If Automate.ax supports the service but not a particular operation, declare that service with the action builder’s.account(...) method and use the authenticated API helper exported by the integration subpath. The platform then resolves and refreshes the selected account privately for the handler.
If the service itself is not supported and requires credentials, request a new integration rather than embedding its secret in the automation. Credential-free endpoints, like the example above, can be called directly.