Asked by Matt Jalbert on Dec 3, 2024
Matt is using GraphQL for a dynamic page and has a custom 'file' property. The property returns a URL when updated via form, but an ID when updated via CRM UI, causing issues with displaying images consistently due to HubL function limits (`file_by_id`). How can they consistently get the URL?
Answered by Bob Balm
Bob suggests using a HubSpot workflow with a Custom Code action. The workflow triggers when the file property is updated. The custom code uses the File ID (if present) to fetch the file's URL via API and then saves this URL into a *separate* text property. The GraphQL query should then pull from this helper property, which will always contain the URL.