I am encountering an issue while trying to access metadata within a Retool workflow loop. I have an API endpoint that I'm triggering using the 'inbound_api_lambda.trigger()' method for each iteration of the loop. The goal is to retrieve specific data from the API response, including the 'location' header, and return an object containing the relevant information along with the corresponding 'booking_id'.
When I test the API endpoint using the REST API component in Retool, I can successfully access the metadata, including the 'location' header, using the path 'response.metadata.headers.location'. The metadata is present in the response object, and I can retrieve the desired information without any issues.
However, when I implement the same logic within the Retool workflow loop, the entire metadata seems to be missing from the response object. I've logged the 'response' object within the loop to inspect its structure, but it appears to be an array without the expected 'metadata' property.
I've double-checked the API endpoint configuration in the workflow to ensure it matches the one used in the REST API, but the issue persists. The absence of the metadata in the response object within the loop prevents me from accessing the required data, such as the 'location' header.
I'm seeking guidance on how to retrieve the metadata within the Retool workflow loop. I'm wondering if there are any known limitations or differences in how metadata is handled between the REST API and the workflow context in Retool.
Any insights or suggestions on how to access the metadata within the loop or alternative approaches to retrieve the necessary data would be greatly appreciated. If additional information or code snippets are needed, please let me know, and I'll provide them to assist in troubleshooting the problem.
Thank you in advance for your help in resolving this issue.