Date Format for API Calls yyyy-mm-dd
# support
d
I have an API request that takes in one parameter; date in yyyy-mm-dd format, the "Assistant" bot seems to handle this find but my "Workflow" bots seem to struggle putting dates in the correct format. Is there a sure-fire way to guarantee it's always using yyyy-mm-dd format? Things i've tried: - Added to Global Prompt - Added instruction to use yyyy-mm-dd in the api call description - Added instruction to use yyyy-mm-dd in the conversation node Tool that works with Assistant: 1ab710d2-c53c-48e7-a06e-53c25dc64dbd Worfklow that doesn't work: 34fc1cf5-eb87-4d3c-9e96-4189e3222753
s
set the date parameter type to "string" and add format yyyy-mm-dd. Force prompt for the format. Add script before API call to reformat using javascript to output to the said format. Check if this works
d
Hi Subrat Sagar, My variable is already set as a String, within the description i have "use yyyy-mm-dd format" - are you suggesting something different?
c
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) This would really help us figure out what went wrong!
d
Hey Shubham, the call ID for the test was 99862b87-317d-4311-b315-4ef4280c54b6 Bot starts the API call process around 05:27:59 (log time) Just to recap, this endpoint is used just fine by the Assistant bots, but the Workflow bot seems to have trouble. In the absence of any proper logging or API errors within the Workflow, it makes it quite hard to troubleshoot independently.
c
Hey, thanks for sending the call ID. Let me evaluate it and then get back to you.
Hey Daco! Thanks for sharing the Call ID. I've reviewed it, but I couldn't draw any conclusions. I'll look into it again in the morning. If I can't suggest a fix, I'll report to the team and get it fixed for you.
The issue was that Workflow bots use a completely different prompt system than Assistant bots: \- **Assistant bots**: Use the global prompt directly when making tool calls \- **Workflow bots**: Use a complex "conversation extraction" prompt that buried the date format instruction The LLM was prioritizing natural conversation extraction over formatting rules, leading to dates like
"Jun 30, 2025"
instead of
"2025-06-30"
. That's why none of your's previous attempts worked - they were all trying to fix it at the prompt level, but the real issue is something else.
d
Thanks Shubham, appreciate you looking into it, is there someone that I should be doing differently then? - should i completely avoid any formatting notes in the Global Prompt? Will try again by only offeriing the formatting notes inside the conversation node just prior to the API call.
c
Try to limit your formatting nodes to conversational nodes, but the issue lies with our side.
3 Views