Help Centre › Building Processes
Connect to a database (MySQL, PostgreSQL, SQL Server, Oracle, MongoDB, SQLite, ODBC).
Add it to a process
In the process designer, open the Add step tab. Find Connect to database under Database › Connection, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| Connection name | Yes | A unique name for this connection, e.g. mydb |
| Type | Yes | The database type - this is the value the bot connects with Choices: MySQL, SQL Server, PostgreSQL, SQLite, ODBC, Oracle, MongoDB. |
| Host | No | The database server hostname or IP address Default: 127.0.0.1. |
| Port | No | The database server port |
| Database | No | The database name to connect to |
| Username | No | The database username |
| Variable | Yes | Variable to store connection status Default: connected. |
| Data source name (DSN) | No | ODBC only. Enter just the name, exactly as it appears in the bot machine's ODBC Data Sources - the bot builds DSN=… for you. Leave blank if you are supplying a full connection string instead. |
| Where is the password stored? | No | vault or keychain (default inferred from credentialID: vault if set, else keychain). Choices: Bot local keychain, Vault credential. |
| Vault credential | No | UUID of the vault credential. Required when credentialMode == "vault". |
| Connection string | No | Optional full connection string, e.g. DRIVER={ODBC Driver 18 for SQL Server};SERVER=hostname;DATABASE=dbname. Takes precedence over the DSN field when both are set. |
| Driver-specific options (JSON) | No | Additional connection options as key=value pairs, one per line |
What it gives back
{connected}– True if connected successfully
See all Database steps.
Errors
| Error | Description |
|---|---|
| Connection failed | Unable to establish a connection to the database server |
| Authentication failed | The username or password is incorrect |
| Database not found | The specified database does not exist on the server |
Tips
- Use the connection_string parameter for complex connection configurations such as SSL, trusted connections, or non-standard drivers
- Store database credentials in the Credential Vault for security rather than hardcoding them in the process
- Give connections meaningful names (e.g. "production_db", "staging_db") to keep multi-database processes clear