Skip to content
synthreo.ai

Input Database - Synthreo Builder

Input Database node for Builder - retrieve structured data from connected databases into your workflow, with support for table and column selection, SQL-style filters, and row limits.


The Input Database node connects workflows to your organization’s databases. It retrieves data from tables and makes it available for automation, AI processing, and downstream nodes. Use it to pull customer records, transactions, inventory levels, HR data, or any structured business information stored in a connected database system.


  • Retrieved database rows as structured data objects.
  • Metadata about the selected database, table, and applied filters.

Each row retrieved from the database becomes an item that flows through the rest of the workflow. Downstream nodes can access individual column values from each row using standard variable reference syntax.


NameTypeRequiredDefaultDescription
DatabaseDropdownYesNoneSelect the database connection configured in your ThreoAI credentials. Only databases that have been connected to the platform appear in this list.
TableDropdown (searchable)YesNoneSelect the target table within the chosen database. The dropdown is searchable to support databases with many tables.
ColumnData GridNoEmptyConfigure the purpose of each column. Set a column to Input to include it in the retrieved data. Set it to Predict to mark it for downstream analysis or machine learning steps. Set it to Ignore to exclude it from the query entirely. Excluding irrelevant columns reduces the data volume passed through the workflow.
FilterStringNoEmptyA SQL-style filter condition applied to the query. Only rows matching the condition are returned. Example: status = 'active' or created_date > '2024-01-01' or amount > 100 AND region = 'West'. Multiple conditions can be combined using AND and OR.
LimitNumberNo0Maximum number of rows to retrieve. A value of 0 means no limit - all matching rows are returned. Set a limit when you only need the most recent or top-ranked records, or when working with large tables during development and testing.
SortStringNoEmptySort order for the retrieved rows. Uses SQL-style syntax: specify the column name followed by ASC or DESC. Example: created_date DESC returns the most recent records first. Multiple sort columns can be specified separated by commas: region ASC, revenue DESC.
Disable CacheBooleanNofalseBy default, query results may be cached to improve performance. Enable Disable Cache when the underlying data changes frequently and the workflow must always work with the latest values. Examples include live inventory levels, real-time transaction monitoring, or appointment scheduling where stale data would cause errors.
Manual OrderNumberNo1When a workflow contains multiple Input Database nodes, this setting controls the order in which they execute. Nodes with lower Manual Order values run first. Use this to ensure dependent queries run in the correct sequence.

The Filter field accepts SQL WHERE clause conditions. The database connection evaluates these conditions server-side, so only matching rows are transferred to the workflow.

Supported operators and patterns include:

  • Equality: column = 'value' or column = 123
  • Inequality: column != 'value' or column <> 'value'
  • Comparison: amount > 100, amount >= 100, amount < 100, amount <= 100
  • Range: amount BETWEEN 100 AND 500
  • Pattern matching: name LIKE 'Acme%' (% is wildcard)
  • List membership: status IN ('active', 'pending')
  • Null checks: email IS NULL or email IS NOT NULL
  • Combining conditions: status = 'active' AND region = 'West'
  • Grouping: (status = 'active' OR status = 'pending') AND amount > 500

String values must be enclosed in single quotes. Numeric values do not use quotes.


Once the Input Database node retrieves rows, the data is available to downstream nodes. Each row becomes a data object and the column values within that row are accessible by their column names.

For example, if the table has columns customer_name, email, and status, a downstream LLM prompt can reference these as:

Customer: {{customer_name}}
Email: {{email}}
Status: {{status}}

When the workflow processes multiple rows (e.g., from a query that returns 50 records), the nodes downstream of the Input Database node typically execute once per row unless a batching or aggregation node is used in between.

If you need the full result set as a single array (for example, to pass all records to a Custom Script node), set the column purpose to Input for all relevant columns and handle the array in the script.


  • Customer Service: Query the customer_accounts table with filter status = 'active' to preload customer information for support request handling.
  • Sales Leads: Retrieve new leads using lead_date > '2024-01-01', mark revenue_potential as Predict, and sort by company_size DESC.
  • Inventory Management: Pull low-stock items using current_stock < minimum_threshold and trigger a reorder workflow.
  • Healthcare Records: Fetch upcoming appointments by filtering appointment_date >= TODAY() sorted by appointment_date ASC.
  • Fraud Detection: Load recent transactions with transaction_date >= DATEADD(day, -1, GETDATE()), marking amount and timestamp columns as Predict for anomaly analysis.
  • Daily Reporting: Retrieve all records from the previous day using a date filter and sort by department, then pass the result set to a summarization LLM node.

  • Use filters and limits to reduce query size and improve performance, especially in production workflows running on a schedule.
  • Only configure columns as Input or Predict that are actually needed downstream. Excluding unnecessary columns reduces memory usage and processing time.
  • Enable Disable Cache for any data that changes between workflow runs - such as inventory levels, account balances, or appointment slots.
  • Use Manual Order to sequence multiple Input Database nodes when later queries depend on values from earlier ones.
  • Test filter conditions directly against the database before deploying the workflow to confirm they return the expected rows.
  • Document filter and sort logic in an Annotation node nearby in the canvas so future maintainers understand the query intent.

  • Given: Filter = created_date > '2024-01-01' - Expected: Only records created after January 1, 2024 are retrieved.
  • Given: Limit = 50 - Expected: The first 50 rows are returned in the specified sort order.
  • Given: Column amount set to Predict - Expected: The amount value is available for downstream forecasting or analysis nodes.
  • Given: Disable Cache = true with a live inventory table - Expected: Each workflow run fetches the current stock levels rather than cached values.
  • Given: Sort = created_date DESC, Limit = 1 - Expected: The single most recently created record is returned.