gastownhall/beads · error

target is missing required Notion properties

Error message

target is missing required Notion properties: %s

What it means

`bd notion connect` validates that the target Notion data source has the schema bd requires. notion.ValidateDataSourceSchema computes a list of missing required properties; if any are absent, connect is refused with the list so the user can fix the Notion database schema rather than failing later during sync.

Solutions

  1. Add the missing properties listed in the error to the Notion database (the message enumerates them).
  2. Instead, run `bd notion init --parent <page-id>` to create a correctly-schemaed database automatically.
  3. Re-run `bd notion connect --url <notion-url>` after the schema is fixed.
  4. Confirm you connected to the bd-managed database, not a similarly named one.
Defensive patterns

Strategy: validation

Validate before calling

// Preflight the target database schema before connecting
resolved, err := notion.ResolveDataSourceReference(ctx, client, url)
if err != nil { return err }
schema := notion.ValidateDataSourceSchema(resolved.DataSource)
if len(schema.Missing) > 0 {
    return fmt.Errorf("add missing properties to the Notion database first: %s", strings.Join(schema.Missing, ", "))
}

Try / catch

if _, err := runNotionConnect(cmd, args); err != nil {
    if strings.Contains(err.Error(), "missing required Notion properties") {
        // guide user to add the listed properties or use `bd notion init`
    }
    return err
}

Prevention

When it happens

Trigger: Running `bd notion connect --url <notion-url>` (or tests resolving a database URL) where the resolved data source lacks one or more required properties — e.g. a plain Notion database without the status/priority/title properties bd expects.

Common situations: Connecting an arbitrary pre-existing Notion database created by hand; a database created by an older bd version with an outdated schema; duplicating a database into a workspace that dropped properties; selecting a data source of the wrong type.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/d355686e12d91b27. Report an issue: GitHub.

Appendix: source

Thrown at cmd/bd/notion.go:682

		DatabaseID:   strings.TrimSpace(db.ID),
		DataSourceID: strings.TrimSpace(db.DataSources[0].ID),
		ViewURL:      strings.TrimSpace(db.URL),
		Message:      "Notion target initialized",
	}
	if err := saveNotionTargetConfigWithWriter(ctx, setter, deleter, result.DataSourceID, result.ViewURL); err != nil {
		return notionSetupResult{}, err
	}
	return result, nil
}

func runNotionConnectAfterValidation(ctx context.Context, client *notion.Client, url string, setter notionConfigSetter, deleter notionConfigDeleter) (notionSetupResult, error) {
	resolved, err := notion.ResolveDataSourceReference(ctx, client, url)
	if err != nil {
		return notionSetupResult{}, err
	}
	schema := notion.ValidateDataSourceSchema(resolved.DataSource)
	if len(schema.Missing) > 0 {
		return notionSetupResult{}, fmt.Errorf("target is missing required Notion properties: %s", strings.Join(schema.Missing, ", "))
	}
	result := notionSetupResult{
		Action:       "connect",
		DataSourceID: resolved.DataSourceID,
		ViewURL:      strings.TrimSpace(url),
		Message:      "Notion target connected",
	}
	if resolved.Database != nil {
		result.DatabaseID = strings.TrimSpace(resolved.Database.ID)
	}
	if err := saveNotionTargetConfigWithWriter(ctx, setter, deleter, result.DataSourceID, result.ViewURL); err != nil {
		return notionSetupResult{}, err
	}
	return result, nil
}

func notionConfigDeleteTarget() notionConfigDeleter {
	if store == nil {

View on GitHub (pinned to 71377f2769)