Budibase/budibase · error · Error
Email trigger inputs are required
Error message
Email trigger inputs are required
What it means
getClient guards against being invoked with no inputs at all before doing anything else. Passing null/undefined for the EmailTriggerInputs object means no host, credentials, or connection settings exist, so it throws immediately.
Source
Thrown at packages/server/src/automations/email/utils/getClient.ts:102
return {
user: inputs.username,
accessToken,
}
}
if (!inputs.password) {
throw new Error("IMAP password is required")
}
return {
user: inputs.username,
pass: inputs.password,
}
}
export const getClient = async (inputs: EmailTriggerInputs) => {
if (!inputs) {
throw new Error("Email trigger inputs are required")
}
if (await blacklist.isBlacklisted(inputs.host)) {
throw new Error("IMAP host is blocked or could not be resolved safely")
}
const client = new ImapFlow({
host: inputs.host,
port: inputs.port,
secure: inputs.secure,
auth: await getAuthConfig(inputs),
// imap flow has its own pino instance enabled by default and is very very chatty!
logger: false,
})
return client
}
View on GitHub (pinned to a81a902e9a)
Solutions
- Ensure the automation trigger definition contains a valid inputs object before execution
- Check upstream code that constructs EmailTriggerInputs and confirm it always returns an object
- In custom code, validate inputs exist before calling getClient
Example fix
// before
const client = await getClient(inputs) // inputs may be undefined
// after
if (!inputs) throw new Error("inputs missing")
const client = await getClient(inputs) Defensive patterns
Strategy: validation
Validate before calling
if (!inputs || typeof inputs !== "object") {
throw new Error("Email trigger inputs must be provided")
} Type guard
function hasInputs(inputs: unknown): inputs is EmailTriggerInputs {
return typeof inputs === "object" && inputs !== null && "host" in inputs
} Prevention
- Never call getClient with a possibly-undefined value; validate trigger payloads first
- Keep trigger definition schemas intact when editing automations programmatically
- Add input checks in custom automation code paths
When it happens
Trigger: Calling getClient(null) or getClient(undefined), typically from automation code paths where the trigger's inputs object failed to build or was not passed through.
Common situations: Programmatic/step invocation of the email client with a malformed automation step definition; upstream code that destructures and drops inputs; tests calling getClient directly without fixtures.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Automation ID is required to test a saved password
- No trigger found for automation
- IMAP password is required when connection details change
- Attachments must have both "url" and "filename" keys. You ha
- Unable to split value of type ${typeof value}: ${value}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/7dfa0f2d11fed35e.
Report an issue: GitHub.