Script Import Error 400: Invalid JSON Structure from Zendesk Macro Migration

Quick question about importing custom scripts from our legacy Zendesk setup into Genesys Cloud. We are in the middle of migrating a complex tier-1 support queue, and I am trying to map our old Zendesk macros to the new GC script framework. The goal is to replicate the conditional branching we used to handle password resets and account lookups. I have manually converted the JSON payload based on the Scripting API documentation, ensuring that the id, name, and content fields match the expected schema. However, when I send a POST request to /api/v2/scripts, the server returns a 400 Bad Request with the message Validation failed: script.content is invalid. The error does not specify which part of the JSON is malformed, which makes debugging quite difficult given the size of the script object. I have validated the JSON structure using external tools, and it appears to be syntactically correct. The environment is EU-FR, and I am using the latest version of the Genesys Cloud SDK for Python. I suspect the issue might be related to how I am defining the actions array, specifically the set-attribute and display-text blocks. In Zendesk, these were handled as simple key-value pairs in the macro definition, but GC seems to require a more verbose structure with specific id and type fields for each action. I have double-checked the type values against the API docs, but the error persists. Has anyone successfully migrated complex conditional scripts from Zendesk to Genesys Cloud? If so, what is the best way to validate the script content before attempting the API call? I am looking for a reliable method to ensure the JSON structure meets GC’s strict validation rules without having to manually debug each field.