Budibase/budibase · error · HTTPError
IMAP password is required
Error message
IMAP password is required
What it means
The email trigger exists and is the right type, but its saved inputs contain no password field. There is nothing stored to hydrate the masked password from, so testing with a masked password is impossible and HTTP 400 is thrown.
Source
Thrown at packages/server/src/api/controllers/automation.ts:255
)
}
const automation = await context
.getWorkspaceDB()
.tryGet<Automation>(automationId)
if (!automation) {
throw new HTTPError("Automation not found", 404)
}
const trigger = automation.definition.trigger
if (!trigger) {
throw new HTTPError("No trigger found for automation", 400)
}
if (!isEmailTrigger(trigger)) {
throw new HTTPError("Automation trigger is not an email trigger", 400)
}
if (!trigger.inputs.password) {
throw new HTTPError("IMAP password is required", 400)
}
const stored = trigger.inputs
const connectionMatches =
emailInputs.host === stored.host &&
emailInputs.port === stored.port &&
emailInputs.username === stored.username &&
emailInputs.secure === stored.secure
if (!connectionMatches) {
throw new HTTPError(
"IMAP password is required when connection details change",
400
)
}
return {
...emailInputs,
password: stored.password,View on GitHub (pinned to a81a902e9a)
Solutions
- Open the automation's email trigger and re-enter the IMAP password, then save
- Send the plaintext password in the test request instead of the masked value
- Re-create the trigger inputs if the definition is corrupt
Example fix
// before
// trigger.inputs saved without password
// after
await api.saveAutomation({ ...automation, definition: { trigger: { ...trigger, inputs: { ...trigger.inputs, password: 'real-password' } } } }) Defensive patterns
Strategy: validation
Validate before calling
const trigger = automation.definition?.trigger
if (trigger && !trigger.inputs?.password) throw new Error('Saved email trigger has no stored password; re-enter it before testing with a masked password') Type guard
function hasStoredPassword(t: { inputs?: { password?: string } }): t is { inputs: { password: string } } {
return typeof t.inputs?.password === 'string' && t.inputs.password.length > 0
} Try / catch
try {
await testEmailConnection({ emailInputs, automationId })
} catch (e) {
if (e.status === 400 && e.message.includes('IMAP password is required')) {
// prompt user to re-enter the IMAP password on the trigger
}
} Prevention
- Always save a password with email trigger inputs
- Re-enter credentials after importing or migrating automations
- Validate trigger inputs (password present) before save
When it happens
Trigger: The saved email trigger was configured without a password (empty field at save time) or the password was stripped/cleared, and the caller now sends a masked password for testEmailConnection.
Common situations: Older automations saved before password capture; password cleared during an edit; imported automations with sanitized inputs.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- IMAP password is required when connection details change
- Automation ID is required to test a saved password
- Automation trigger is not an email trigger
- Email trigger inputs are required
- Unexpected response ${response.statusText}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/b8f575fb57bcea45.
Report an issue: GitHub.