Priority Gateway

Interact with Priority ERP via WebSDK Gateway

SQLI

AI-generated

Summary

Builds a Priority SQLI query from form-based settings or runs raw SQLI. Returns structured rows or the raw FORMAT output, with optional query metadata.

Inputs

  • Query Mode (required) — Choose Visual Builder or Raw SQLI. Visual Builder uses a form name, optional source-table override, selected columns, filters, joins, and aggregates to construct the query. If no columns or aggregates are selected, it uses discovered fields unless a source-table override is set; with an override, specify columns.
  • Form Name (required) — In Visual Builder mode, select or enter the Priority form. The Gateway uses it to resolve the source table and discover fields.
  • Source Table (override) — Set the FROM table directly when automatic resolution is unavailable. When using an override, provide columns explicitly.
  • Columns — Choose fields to return; leave empty to use all discovered fields when available.
  • Filter Conditions — Add WHERE conditions on base or joined-table fields. Prefix values with >, <, >=, <=, or <> for comparisons; use * or % for wildcard matching. Filter Logic in SQLI Options combines multiple conditions with AND or OR.
  • Joins — Add tables with left and right join-key columns and optionally select columns from each joined table. Join predicates are combined with filters using AND; joined-field filters can resolve required join paths automatically.
  • Aggregates — Add COUNT, SUM, MIN, or MAX expressions with an optional alias. When aggregates are present, GROUP BY is inferred from selected non-aggregate columns unless overridden.
  • GROUP BY (override) — Choose grouping columns when aggregates are used; replaces the inferred GROUP BY.
  • SQLI Query (required) — In Raw SQLI mode, enter the SQLI statement. The Gateway validator blocks mutating verbs including INSERT, UPDATE, DELETE, EXECUTE, LINK, UNLINK, CREATE, and DROP.
  • SQLI Options — Set output format (JSON rows or one raw FORMAT text item), maximum rows (0 uses the Gateway default of 500), timeout in seconds (0 uses the Gateway default of 30), sort field and direction, and whether to attach execution metadata as _meta on the first row. Filter Logic applies to Builder mode.
  • Connection Overrides — Optionally override Priority and WCF/OData URLs, company, credentials, language, app credentials, Cloudflare Access token, or Priority connector token for this node.

Output shape

A list of items in JSON mode, or one item containing raw FORMAT output in text mode.

JSON mode emits one n8n item per returned row. If enabled, _meta containing stage, execution time, generated SQL, row count, and columns is attached to the first row. The Gateway's default maximum is 500 rows when Max Rows is 0; output can also be truncated by SQLI_MAX_OUTPUT_CHARS.

Links

Discussion