Docs

Data & connections

Native data tables and column types, MySQL/PostgreSQL sources, managed connections, shared tenant datasets, imports and exports.

Workcraft apps are data-driven. This page covers where data lives — native data tables and the records forms produce — and how apps connect to external databases and APIs.

Two kinds of data

Data tableForm records (DataStore)
What it isA defined table: named columns with types, plus seed rowsRows created when users submit forms
Good forLookup lists, reference data, imported datasets, configTransactions and entities users create (orders, tickets, employees)
Read byDropdowns, embedded tables, grids, dashboards, flowsList pages, record views, kanban, calendar, dashboards, workflows, My Tasks
Written byTable editor, imports, flowsForm submissions (and flows), with full change history

A typical app uses both: entity tables define the shape, forms collect records, and lookup tables feed dropdowns.

Data tables

Create tables under the app's Data section. Each table has a name (PascalCase plural — Customers, LeaveRequests) and typed columns.

Data Master DATA panel listing an app's data stores and data tables, with the Account Form records grid open

Column types

TypeStoresNotes
TextStringsAlso the base for Email/Phone/URL validation variants
NumberNumeric valuesCurrency adds a currency code
DateDates (and date-times)Format d-m-y family
SelectA fixed option listOptions defined on the column
RefA link to another table's rowPicks a target table + label/value columns; optional refOnDelete: RESTRICT (default), CASCADE or SET_NULL
UserA platform userSystem users or a people table you define
AutoIdAuto-generated record numberStrategy uuid/nanoid, optional prefix and length — renders as a record-number field on forms
BooleanTrue/falseCheckbox on forms
AttachmentFile referencesPairs with File upload
FormulaComputed valueExpression over other columns

Each column can also be marked required (not null) and given a default value — used when a new record is created without that field. Set these in the column editor alongside the type.

Modeling rules that matter

  • One entity per table. Don't mix an employee's leave data into the Employees table — transactions get their own tables.
  • AutoId for identity, Ref for relationships. A customer's own ID is AutoId; an order's customerId is a Ref to Customers.
  • Lookup tables are single-purpose. A "Project Status" table holds only status options — entity fields live on the entity's table.
  • Never build user tables. Workcraft has built-in users; reference them with a User column.

Shared (tenant) datasets

A table can be marked shared: it becomes readable by every app in your workspace (tenant) — ideal for Departments, Countries or a Products catalog. Tenant admins control sharing and which apps may edit; everyone else is read-only. Deleting a shared row enforces the same refOnDelete rules across all apps.

External data sources

The New data source dialog (app Data section) offers three types:

TypeWhat it connects
In-Built TableA table managed inside Workcraft — the native data tables described above
MySQLAn external MySQL database — host, port, database, credentials
PostgreSQLAn external PostgreSQL database — host, port, database, credentials (schema defaults to public)

Data Source Builder offering In-Built Table, MySQL and PostgreSQL source types

For MySQL and PostgreSQL you can enter connection details directly or pick a saved credential, and Test connection verifies before you save. External sources appear in the app's Data section alongside native tables.

Every other service — MongoDB, SQL Server, Oracle, Elasticsearch, Redis, REST APIs, Google Sheets, Airtable, Salesforce, Slack and the rest of the provider list — is reached through managed connections inside automation flows: a flow node calls the service with a stored connection and writes the result into a data table or form records your pages then display.

Managed connections

Connections (App Settings → Connections) store credentials once — API keys, OAuth2, basic auth, database logins — encrypted at rest, and are referenced by flows, data sources and nodes instead of pasting secrets everywhere.

  1. Open the app's Settings → Connections → New connection.
  2. Pick a provider and fill the guided form — non-secret fields in config, secrets encrypted. The form adapts to the provider: OAuth providers get an Authorize button that runs the consent flow; database providers take a connection URL; API-key providers take the key fields.
  3. Use Test to verify; edit or delete connections from the same list.
  4. Reference the connection in flow nodes via the connection picker — nodes then get credentials injected automatically.

App Settings Connections list where managed integration credentials are stored

Secrets are write-only: after saving, the API returns masks, never values. Expiring OAuth tokens refresh automatically.

Connection providers

The provider picker offers these families — pick the one your integration needs; flow nodes and data sources then reference it by name.

FamilyProvidersAuth style
DatabasesMySQL, PostgreSQL, MongoDB, SQL Server, Oracle, Elasticsearch, RedisConnection URL / credentials
GoogleGoogle APIs (Sheets, Drive, Calendar…), GmailOAuth2 consent
MicrosoftMicrosoft 365 / Graph (Outlook, OneDrive, SharePoint, Excel, Teams)OAuth2 consent
CommunicationSlack, Twilio, SendGrid, IMAP (inbound email polling)API key / app credentials
CRM & supportSalesforce, HubSpot, Jira, Zendesk, ServiceNowOAuth2 or API token / basic
ERP & industrySAP (OData), Workday, NetSuiteBasic / API key
Payments & documentsStripe, Razorpay, DocuSignAPI key / OAuth2
Dev & dataGitHub, AWS, Airtable, Notion, Firecrawl, AnthropicAPI key / token
GenericHTTP / Webhook, Generic RESTAPI key or none — for any REST API

Provider coverage gates apply per plan — enterprise connectors unlock on higher tiers; see Plans & limits.

Scheduled imports & export templates

  • Scheduled imports pull a CSV/XLSX from a URL into a data table on a cron schedule, with column mappings and optional fail-fast. Set one up from the table's import options (or the common Scheduled Imports modal in the Data view); each job shows last-run status and counts against your plan's schedule quota.
  • Export templates save a column selection + filters as a named CSV/XLSX export for a table — reuse it instead of rebuilding the export each time.
  • Manual CSV import — upload a CSV/XLSX file to any data table; map columns to table columns and review before committing (progress modal shows row counts).
  • App export/import (whole-app JSON) carries tables, pages, flows, roles and settings to another app or environment — IDs are remapped automatically.

Tips

  • Start with lookup tables (Status, Priority, Category) before entity tables — forms reference them immediately.
  • Give Ref columns an explicit delete behavior; the default RESTRICT prevents orphaned links.
  • Use the DataGrid/Table field elements to embed read-only or editable slices of other tables inside a form.
  • Flows can read/write both data tables (datatable node) and form records (datastore node) — see Automation flows.