What is your goal?
Get consistent data format from a claude prompt when parsing text for information.
What is the problem & what have you tried?
The claude prompt module is used to parse EMail text for information and return a JSON file. The format of the output bundle is inconsistent though, I could take the “rawResponse” field of the output bundle to acces the claude output. But sometimes there is now rawResponse but a “Text Reponse” field and the blueprint fails. (See screenshot with the greyed out rawResponse reference)
Screenshots (scenario flow, module settings, errors)
Welcome to the Make community!
To avoid this, you can use this built-in function to use a second variable if the first is empty:
This function may have also been covered in the Make Academy tutorials — refer to the Make Academy Course Overview to learn more.
Here’s an example of how you can use this function:
{{ ifempty(24.rawResponse; 24.textResponse) }}
(copy-paste the above into the field, or type it exactly as shown)
Hope this helps! If you are still having trouble, please provide more details.
— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!
2 Likes
Thank you. I think that may work around the issue, unless it comes up with a third possible response field 