Write Log

cloud_logging.write_log
ActionGoogle Cloudconnection required

Calls POST /entries:write with logName projects/{project}/logs/{log}.

Write one entry to a Cloud Logging log (text or JSON payload).

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Google Cloud Logging
Secret shape
{"client_id", "client_secret", "refresh_token"}
Config it needs
project_id
Resolved by
config.connection_id, else node.connection_id

Configuration

8 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
project_id
GCP project id (overrides connection).
stringNo———
log_id
Log id (e.g. mantle-workflows).
stringYes———
severity
Entry severity.
stringNoINFOone of "DEFAULT", "DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY"—
text_payload
Text message (used when json_payload is empty).
stringNo———
json_payload
Structured payload (JSON object).
objectNo———
labels
Entry labels (JSON object).
objectNo———
resource_type
Monitored resource type.
stringNoglobal——
resource_labels
Labels identifying the monitored resource (JSON object). Required by every type but global/project — gce_instance needs instance_id and zone, cloud_run_revision needs service_name, revision_name and location.
objectNo———
  • At least one of text_payload, json_payload must be set.

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "resource_type": "global",
  "severity": "INFO"
}

Output

One shape.

result

FieldTypeExample
ok
boolean—
log_name
string—
severity
string—
written
number—
resource_type
Monitored resource the entry was written to.
string—
resource_labels
Identifying labels the entry carries, project_id included.
object—
{
  "log_name": "",
  "ok": false,
  "resource_labels": {},
  "resource_type": "",
  "severity": "",
  "written": 0
}

Solutions with Google Cloud Logging

See Write Log run in a workflow.

In a technical demo we add the Google Cloud Logging connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.