record_comment()

Post a comment on a record's activity thread. The comment is posted as the System user (flows have no human author).

Syntax

record_comment(table, id, content, opts?)

Parameters

Name Type Required Description
table string yes Table name or database table id.
id int yes The record's primary key.
content string yes The comment text (must be non-empty).
opts array no Options. ["silent" => true] suppresses notifications to the record's followers.

Returns

The created comment as an array. Returns an empty array [] if comments are disabled for the account.

Example

record_comment("orders", $record["_meta"]["id"],
    "Shipped via " . $record["carrier"] . " on " . sys_current_date());

Example output

[
    "id" => 9021,
    "record_id" => 305,
    "user_name" => "System",
    "content" => "Shipped via UPS on 2026-06-12",
    ...
]

Notes

  • Mention a teammate with the @{userId:Name} token in content to notify them — @mentions still fire even when ["silent" => true] is set (silent only mutes followers).
  • Requires comments to be enabled for the account.

See also: record_email_send(), Notifications