Hello @cjharlin! This is a pretty cool use case! How does your chat interface work? I would trigger a Retool Workflow when the user selects their time and send the user's response (e.g. "I'll take Friday at 3PM") to the Workflow.
Then, you can use Retool AI to parse the user response using an AI Actions query. I'd say there are two options for this.
- Use a
Generate text
AI Action and use a prompt of something along the lines of "Convert this statement from a user into a datetime timestamp. The format must be a unix timestamp.
OR - Use a
Extract entities
AI Action select date, time, and/or day as your entities to extract.
Once this is done, add a conditional block to the Workflow to confirm that the AI block outputted the date/time in the correct format. If it was correct, add a REST API (or whatever resource you need) block that calls your API with the date/time. If it was not in the correct format, add some error handling (such as sending yourself an email that it failed).
Let me know if you have any questions.