Why does this setting cause the Script node to fail with a 504 Gateway Timeout when the external endpoint responds within 200ms? The integration uses a multi-org OAuth setup, and the client credentials are valid. The endpoint is hosted on AWS Lambda (us-west-2) and returns a 200 OK with a JSON payload containing the required next_action field. The payload size is under 1KB. The timeout occurs consistently after the 30-second default limit, even though network latency is negligible.
The flow triggers from a Pure Cloud Agent Desktop interaction. The Script node configuration points to the correct HTTPS URL. SSL certificates are verified. No CORS issues are present, as confirmed by browser dev tools. The issue persists across multiple agents and orgs. The platform API logs show the request was sent but no response was recorded in the flow execution history. This blocks our deployment of the new handoff feature. Assistance in identifying potential configuration gaps or known limitations with Script nodes in this context would be appreciated.
The problem is that the Script node timeout defaults to 5 seconds, which can be swallowed by platform overhead even if your Lambda responds in 200ms. Increase the node timeout to 10-15 seconds to give the orchestration layer enough breathing room for the OAuth handshake and data serialization.
You need to align the Terraform configuration with the actual network latency. The manual adjustment suggested works, but it breaks infrastructure-as-code consistency. Hardcoding timeouts in the UI causes drift during subsequent terraform apply runs.
Define the timeout explicitly in the HCL resource block. This ensures the Architect flow deployment matches the network reality of the multi-org OAuth handshake. The platform serialization overhead is significant when crossing org boundaries.
resource "genesyscloud_flow_script" "external_call" {
name = "AWS Lambda Integration"
description = "Handles external payload"
# Set timeout higher than the 5s default to handle OAuth + serialization
timeout_seconds = 15
# Ensure endpoint is reachable from GC edge
url = "https://lambda.us-west-2.amazonaws.com/..."
}
Verify the timeout_seconds parameter in your state file. If the value is missing, the provider reverts to the default during promotion. Explicitly setting this prevents 504 errors in production environments with higher latency. Check your GitHub Actions logs for any schema warnings regarding this attribute.