What is Directory?
Directory stores reusable regional values for your Letterflows. Values, credentials and private keys are encrypted in the selected region.
Create a Directory variable
Create and edit Directory variables from the dashboard. Each variable has its own form; choose its region when creating it.
Open Directory, choose a region, and save a named variable. Names begin with a letter and contain letters, digits and underscores, up to 60 characters. Region codes are reserved; names are unique within your account and region.
Variable types
Text
Store plain text such as a base URL. Hato uses the text as entered.
Up to 1 MiB, depending on your plan.
Secret text
Store sensitive text such as an API token. The editor hides the value while you type.
Up to 1 MiB, depending on your plan.
JSON
Store a JSON document. Use the whole document or select a field or list item, such as dir.config.items[0].
Up to 1 MiB depending on your plan, with up to 64 levels of nesting.
Document template
Turn on Document template to fill parts of this JSON with other Directory values when the flow runs. In this example, a Text variable named customer supplies Ada.
{"name":"{{ dir.customer }}"}
Result {"name":"Ada"}
XML
Store an XML document. Start a reference path at the root element. For example, dir.profile.customer.name reads the name inside a customer root element. Use @name for attributes, #text for text alongside child elements, and brackets for namespace-qualified names.
Up to 1 MiB depending on your plan, with up to 64 levels of nesting.
Document template
Turn on Document template to fill XML text or attributes from other Directory variables when the flow runs. This example uses the same customer variable.
<customer>{{ dir.customer }}</customer>
Result <customer>Ada</customer>
Basic authentication
Basic authentication stores an ID and password. Use .id or .password, or a whole variable in Directory basic authentication. HTTP receives Basic Authorization; FTP and SFTP receive both fields.
Up to 4 KiB each for the ID and password.
Private key
Private keys can be uploaded or generated as Ed25519, with an optional passphrase. Use .key and .passphrase, or a whole variable in Directory private key (SFTP). Copy the generated public key to your server.
Up to 256 KiB for the key and 4 KiB for the passphrase.
HTTP headers
HTTP headers use text or field editing. Header values may reference other Directory variables; Letterflow step references and dependency cycles are rejected.
Up to 64 KiB for the entire set of headers.
Document template is off by default. With it off, JSON and XML are used as entered. With it on, only Directory variables can be inserted. Hato escapes inserted text for the document format.
Accessing directory variables
Directory values can be shared by several flows. In a Letterflow, dir.base_url uses the Coordinator region. Include a region, for example dir.au.base_url, to use a value from another region your plan allows.
{{ dir.base_url }}
{{ dir.au.base_url }}
{{ dir["us"].base_url }}
Function reference →
Direct header passing
Use a Headers variable or a JSON object of text values in the Letter component's Directory headers input. Local headers override shared names without regard to case. Choose Headers when its values need further Directory interpolation; JSON values remain literal data.
Suppose common_headers contains Authorization and X-Mode. In the Letter, enter this reference in Directory headers.
{{ dir.common_headers }}
To override the shared Authorization header, enter this line in the same Letter’s own headers. This line replaces Authorization with the token from dir.api_token. The shared X-Mode header still applies.
Authorization: Bearer {{ dir.api_token }}
Queued directory variable
When a flow is submitted, Hato records the Coordinator region and the values that run needs before it joins the queue. Editing a variable later affects future runs. Each scheduled run picks up the values available when it is submitted. Deleting a required variable cancels waiting runs that need it. Runs already admitted keep the values they started with.
Integration access
Paid integration keys may explicitly select directory:read to list variables and obtain regional value URLs, including secrets. This permission is never automatic. Directory changes remain dashboard-only.