docs(send-table-data): expand listData error causes and JSON.parse sources#1483
Open
george-dilthey wants to merge 1 commit into
Open
docs(send-table-data): expand listData error causes and JSON.parse sources#1483george-dilthey wants to merge 1 commit into
george-dilthey wants to merge 1 commit into
Conversation
Two gaps identified from Intercom conversation 215475012970109: 1. The listData troubleshooting note treated the error as a single case (empty column) with a single fix (run condition). Added a second cause: when a formula column holds a stringified JSON array (received: "string"), the fix is JSON.parse() in formula mode, not a run condition. 2. The JSON.parse paragraph attributed stringified arrays only to HTTP API calls and webhooks. Added formula columns that use JSON.stringify() as a third source of this pattern.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Expanded two sections in
docs/send-table-data.mdto document a second cause of the"Invalid send table data inputs … 'listData' … 'Required'"error and its fix.Change 1 —
listDatatroubleshooting bullet (Best practices & troubleshooting): The existing note described only one cause (no data for the row,received: "undefined") with one fix (add a run condition). Added a second cause: the list column holds a stringified JSON array from a formula column that usesJSON.stringify()(error showsreceived: "string"at runtime). Fix for that case: switch the list input to formula mode and enterJSON.parse(/YourColumn).Change 2 — JSON.parse paragraph (Selecting the right list field manually): The existing paragraph attributed stringified JSON arrays only to HTTP API calls and webhooks. Added formula columns that use
JSON.stringify()as a third source of this pattern.Why
Intercom conversation 215475012970109: customer Areya was using a formula column ("Agents With Email") to filter a JSON array of agent objects down to only those with email addresses, then pointing "Send row for each item in a list" at that column. The action failed with
Invalid send table data inputs … listData … Required. Human support agent Bo Morin resolved it by instructing the customer to switch to formula mode in the list input and enterJSON.parse({{Agents With Email}})— confirmed working by customer ("figured it out").The root cause: the formula column output a text string (produced via
JSON.stringify()in the formula), not a native array. The docs already describedJSON.parse()as the fix for stringified arrays from HTTP APIs/webhooks, but didn't cover formula columns as a source, and thelistDataerror troubleshooting note directed users to a run condition fix (wrong for this case).Verifier verdict: The
received: "string"error for a stringified-JSON list column is PASS — confirmed by/workspace/clay-base/apps/api/v3/non-lambda-actions/domain/route-row/types.ts:8-15(Zod schema requiringlistData: z.array(...)) and/workspace/clay-base/apps/api/v3/non-lambda-actions/domain/route-row/index.ts:212-214(theInvalid send table data inputserror message). TheJSON.parse()fix is confirmed by Slack threads in #proj-send-table-data-deprecate-wtt and #team-tables-functions.Source link(s)
clay-base/apps/api/v3/non-lambda-actions/domain/route-row/types.ts:8-15,clay-base/apps/api/v3/non-lambda-actions/domain/route-row/index.ts:212-214Uncertainties
None. Both changes are directly supported by code evidence (PASS verdict) and confirmed by the customer's successful resolution.
Related observations
The "Routing data conditionally" example mentions an AI column filtering a list and its output becoming the list source. The verifier confirmed Claygent/AI columns return native JSON objects (not strings), so that case works without
JSON.parse()— no change needed there.Closes DOC-1061