Trying to POST a variable containing a long string - a transcript - to a notes endpoint via a data action. It’s failing with a 413 Payload Too Large error.
The transcript variable holds a string ~16KB in size. I’ve checked the docs - nothing about a hard limit on note length or request size for that endpoint. Just a hunch, but it feels like something’s getting truncated before it even hits the API. We’ve seen this before with variables exceeding 8KB, but usually the error is a 400.
Workaround currently is chunking the transcript and posting multiple notes. Not ideal.
Right, payload size limits - always a fun one. We had this exact issue back in late '21 with the pre-chat form data, trying to stuff everything into a user field.
The notes endpoint’s limit is indeed 4KB - it’s not documented super clearly, but you’ll hit a 413 consistently above that. Chunking’s one way, but it’s messy. What we ended up doing was base64 encoding the transcript → POST the encoded string → decode on the other side. It shaved off like 30-40% of the string size.
Here’s a data action config that’ll do the encode. You’ll need a corresponding decode step in the flow, obviously.
Took like 2 hrs to get the base64 decode bit right on the receiving end - kept getting padding errors. Turns out, the SDK’s base64 decode function is a little picky. Also, watch out for character sets - encoding/decoding can sometimes mangle unicode. Encoding the string before it hits the variable might be cleaner, depending on where the transcript’s coming from.
Base64 encoding the transcript worked - got it down to ~11KB. 413 is gone. We’re on Genesys Cloud, so didn’t want to mess with looping data actions if a simple encode/decode would do.
The 413 error - it acts like a keyboard trap in the API flow. Perhaps the request parser is blocking the large payload.
Base64 encoding is a good way - yes - but perhaps the notes endpoint isn’t the best place for 16KB of transcript. Not 100% sure but - is there a different data object where you can store the full transcript? Something designed for larger text blocks?
If you must use the notes endpoint - can you check the keyboard focus order? Sometimes the notes object’s UI is not fully accessible when the data is very long. A screen reader user may not be able to move through the content easily.
Another idea - and fwiw - is to use the Interaction object. You can add custom metadata to the Interaction. The limit on that is much higher than the notes endpoint. Here is an example - how you add metadata: