Summary
In Terracotta workflows, a tool node running the Extract Field from Object action (extract-field-from-object, package 4299091f-3cd3-4d68-b198-0143575f471d) fails at the tool-result delivery layer whenever the extracted value is not a string. Since a very common use of this action is extracting numeric record ids (CRM ids, sequencer prospect ids, etc.), those workflows fail even though the extraction itself succeeds.
Reproduction (verified 2026-08-05)
Tool node configured with:
jsonObject (reference): {"result": {"data": [{"id": 123}]}}
fieldPath (static): result.data.0.id
Run the workflow. The node fails with:
Tool execution failed with status: ERROR — Failed to deliver tool result to workflow: [
{
"expected": "string",
"code": "invalid_type",
"path": [
"actionInvocationOutput",
"metadata",
"textPreview"
],
"message": "Invalid input: expected string, received number"
}
]
Evidence that it's the envelope, not the value:
| Extracted value |
Result |
0 (number) |
fails — metadata.textPreview invalid_type |
-1 (number) |
fails — same error (rules out a falsiness bug) |
"-1" (string) |
delivers fine; downstream number-typed conditional inputs coerce it correctly |
So actionInvocationOutput.metadata.textPreview appears to be validated as string but is populated with the raw extracted value.
Related edge case
The same action fails with ERROR_MISSING_INPUT — Input is invalid. Check that your JSON object has keys when jsonObject resolves to an empty object {} (e.g. an upstream lookup miss). A structured "no match" result would make lookup-miss branches expressible without a guard node in front.
Expected
- Extracted non-string primitives (numbers, booleans) should be deliverable — presumably by stringifying
textPreview while preserving the typed value in result.foundData.
- Empty-object input ideally yields an empty/no-match result rather than a node failure.
Workarounds we're using
- Extract numeric fields in a code node instead of this action.
- A guard code node that substitutes a string-typed sentinel before the extractor on lookup-miss paths.
Built/observed via the Clay plugin's workflow MCP (edit_node) + CLI on Claude Code. Happy to provide more detail.
Summary
In Terracotta workflows, a tool node running the Extract Field from Object action (
extract-field-from-object, package4299091f-3cd3-4d68-b198-0143575f471d) fails at the tool-result delivery layer whenever the extracted value is not a string. Since a very common use of this action is extracting numeric record ids (CRM ids, sequencer prospect ids, etc.), those workflows fail even though the extraction itself succeeds.Reproduction (verified 2026-08-05)
Tool node configured with:
jsonObject(reference):{"result": {"data": [{"id": 123}]}}fieldPath(static):result.data.0.idRun the workflow. The node fails with:
Evidence that it's the envelope, not the value:
0(number)metadata.textPreviewinvalid_type-1(number)"-1"(string)So
actionInvocationOutput.metadata.textPreviewappears to be validated asstringbut is populated with the raw extracted value.Related edge case
The same action fails with
ERROR_MISSING_INPUT — Input is invalid. Check that your JSON object has keyswhenjsonObjectresolves to an empty object{}(e.g. an upstream lookup miss). A structured "no match" result would make lookup-miss branches expressible without a guard node in front.Expected
textPreviewwhile preserving the typed value inresult.foundData.Workarounds we're using
Built/observed via the Clay plugin's workflow MCP (
edit_node) + CLI on Claude Code. Happy to provide more detail.