• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

How to pass the current date to AI Assistant?

Sergio G

Member
Hi,

I need the AI assistant to know which day it is when the user sents the whatsapp message.

Why? because I need to infer when the user ask for availability on "next weekend" to be able to translate to, for example: friday 12 sep 2025 to sunday 14 sep 2025

And it's specially needed when using gpt-4o-mini.

So i the AI can reply to the user's message with knowing it's timestamp could be cool.

Right now I'm trying to figure out using pabbly connect to act as an intermediary somehow.

But I think there could be a better approach.
 

Preeti Paryani

Well-known member
Staff member
Hello @Sergio G,

To achieve your use case, you can focus on training your assistant effectively and continuously updating the knowledge base with the available slots. Make sure the assistant is trained to recognize the different ways users may ask about availability (for example, “next weekend,” “this Friday,” “in two weeks,” etc.). If this is done properly, the assistant will be able to interpret the user’s intent and provide the correct availability information. There isn’t a need for any specific method to capture the exact timestamp of the user’s message.
 

Sergio G

Member
Hi, thanks, but with gpt-4o-mini it keeps changing month and/or year. But the same rules with an anchor on current date worked flawlessly.

I tested on gtp-5-nano and worked well without needing to pass current date. But it's not supported on Chatflow yet.

On another example I asked how much the stay from monday to thursday and answered me:
"To calculate the price for your stay from monday to thursday I need to have the check-in and check-out dates"

And that is an example for not handling the date correctly.

Is there somehow to ask the values from custom field contact? that could do the trick and also for other things like knowing if it's local or foreign tourist
 

ArshilAhmad

Well-known member
Staff member
Unfortunately, we don’t have any other suggestions for the use case you are describing at the moment. It’s not possible to update the knowledge source through custom fields. If your use case is working correctly with GPT-5 Nano, you can submit a request to add this model to Pabbly Chatflow.

 

Sergio G

Member
Unfortunately, we don’t have any other suggestions for the use case you are describing at the moment. It’s not possible to update the knowledge source through custom fields. If your use case is working correctly with GPT-5 Nano, you can submit a request to add this model to Pabbly Chatflow.

Thanks, I have an idea to do it, but I think they tags update is not working correctly.

The idea:
Create a Custom field for CurrentDate.

On Pabbly Connect I want to suscribe to a create contact trigger or a user starts conversation kind of trigger, or simple on a Tag applied to a contact like "update_current_date"

Then get current date using Date Filter un Pabbly Connect and update Contact custom field CurrentDate on Pably Chatflow.


At Pabbly Chatflow create a flow to trigger on CustomField update and Watch for CurrentDate.

Then add a Single AI Message with custom prompt and say something like this:

Set today to $CurrentDate and the answer the client message.

Save the answer to another custom field called "Response"

Add a message box to send: $Response, to the user.

The following is needed: how to remove a Tag from the contact? So I can delete them Tag "update_current_date"


That flow should do the trick.

Please give it a shot to understand the idea and maybe you can give me some better advice on how to do it.


I think gpt-5-nano or any model language could have the same issue.

With this trick I change the user prompt to add the current date from a custom field updated outside.


It could be so much easier if you provide a function to get the current date jeje.

Best regards
 

ArshilAhmad

Well-known member
Staff member
If all you want is to fetch the current date in the flow, you can add an API Request node to your flow and execute this endpoint. It will provide the current date, which you can then pass to the custom contact field.

JSON:
curl http://worldtimeapi.org/api/timezone/Etc/UTC

1757462645614.png
 

Sergio G

Member
If all you want is to fetch the current date in the flow, you can add an API Request node to your flow and execute this endpoint. It will provide the current date, which you can then pass to the custom contact field.

JSON:
curl http://worldtimeapi.org/api/timezone/Etc/UTC

View attachment 60364
Hi, that is a great idea! thanks.

I was trying to implement as suggested but fails on testing the api call. No params, no header, no body.

I used https://worldtimeapi.org/api/timezone/America/Santiago that corresponds to my location but says "No response received from API" as image attached.

If I use Postman the call is working fine as shown.

What can be wrong?

I'm a developer guy so you can be techie
 

Attachments

  • chrome_XM6hqj4EnP.png
    chrome_XM6hqj4EnP.png
    195.1 KB · Views: 11
  • Postman_rkVYKUAAw5.png
    Postman_rkVYKUAAw5.png
    86.7 KB · Views: 15

Sergio G

Member
Hi, that is a great idea! thanks.

I was trying to implement as suggested but fails on testing the api call. No params, no header, no body.

I used https://worldtimeapi.org/api/timezone/America/Santiago that corresponds to my location but says "No response received from API" as image attached.

If I use Postman the call is working fine as shown.

What can be wrong?

I'm a developer guy so you can be techie
Update: I had to add access-control-allow-origin = *, since I saw that on test button it was called from an intermediary host
 

Sergio G

Member
I created a very basic flow for testing.

When a tag is added to a contact then call api request and save the result data.datetime to CurrentDate.

But it's not working, I open Contacts, choose the only contact I have to edit details, add update_currency_date tag and the value in CurrentDate is not updated. Doesn't work either to apply tag, Save, get inside, remove Tag, Save and apply again the tag and save. The value in CurrentDate is not updated

Why can that happen? Is some kind of bug?
 

Preeti Paryani

Well-known member
Staff member
Hello @Sergio G,

I created a very basic flow for testing.

When a tag is added to a contact then call api request and save the result data.datetime to CurrentDate.

But it's not working, I open Contacts, choose the only contact I have to edit details, add update_currency_date tag and the value in CurrentDate is not updated. Doesn't work either to apply tag, Save, get inside, remove Tag, Save and apply again the tag and save. The value in CurrentDate is not updated

Why can that happen? Is some kind of bug?

Could you please provide us with the Workflow URL where you are facing this issue? This will help us investigate the problem more effectively and assist you accordingly.

Please be aware that to assist you effectively, we may need to access your Pabbly Connect account. If you're comfortable with this, please grant us permission by stating in your next reply:

"You have my permission to log into my Pabbly Connect account and edit the workflow, if required. Here is the registered email address associated with it."

Looking forward to assisting you further.

1757484969186.png
 

Sergio G

Member
Hello @Sergio G,



Could you please provide us with the Workflow URL where you are facing this issue? This will help us investigate the problem more effectively and assist you accordingly.

Please be aware that to assist you effectively, we may need to access your Pabbly Connect account. If you're comfortable with this, please grant us permission by stating in your next reply:

"You have my permission to log into my Pabbly Connect account and edit the workflow, if required. Here is the registered email address associated with it."

Looking forward to assisting you further.

View attachment 60372
Hi, sure.


"You have my permission to log into my Pabbly Connect account and edit the workflow, if required. Here is the registered email address associated with it [email protected]
 

ArshilAhmad

Well-known member
Staff member
The World Time API doesn't seem to be working consistently. We suggest trying a different endpoint to fetch the current time more reliably.
 

Sergio G

Member
The World Time API doesn't seem to be working consistently. We suggest trying a different endpoint to fetch the current time more reliably.
Hi, thanks, I changed the api to https://timeapi.io/api/Time/current/zone?timeZone=America/Santiago and now it saves the date to a custom field.

Now my flow is:

1. Trigger: user starts a conversation
2. API request to https://timeapi.io/api/Time/current/zone?timeZone=America/Santiago and save data.dateTime to CurrentDate
3. Assign AI Assistant linked to status 200 from previous step.
- I choose Starts with: Personalized Message and wrote:
"
Hoy es $CurrentDate.
Responde usando esa información y el mensaje del usuario
"

But How can I tell the AI Assistant to use both $CurrentDate and the user message to give the answer? Doesn't seems to be working as expected since I get the reply:

Prompt:
Hola del 22 de sep al 27 de sep
2 adultos pareja
3 menores de edad 9-14-17 años

Reply:
¡Hola! ¿En qué puedo ayudarte hoy? Si deseas consultar disponibilidad o hacer una reserva, por favor indícame las fechas de check-in, check-out y la cantidad de huéspedes.


The flow activates and save the currentdate ok, but I was expecting to parse the check-in and check-out dates and the amount of guests. I checked that AI assistant was disabled, I enabled it at Inbox and to the current conversation and pasted the same prompt:
Hola del 22 de sep al 27 de sep
2 adultos pareja
3 menores de edad 9-14-17 años

And answered as expected.

Question 2: If I reply the first AI assistant message I saw that it isn't enabled after answering with the flow, so is not answering.
I checked the option Enable AI Auto Replies at Inbox Settings and was enabled.

I need to:
1. Answer with the flow to get the current date
2. Always assign the AI Assistant for further replies

What can be wrong?
 

Preeti Paryani

Well-known member
Staff member
Hello @Sergio G,

We have tested your use case, and it seems that at the moment this cannot be achieved entirely within the Pabbly Chatflow section. Currently, you can either use the customer’s message or the custom field (such as the current date you have saved), but not both together in the same response.

To achieve your use case in a better way, we recommend combining Pabbly Chatflow with Pabbly Connect. Here’s how you can structure it:
  1. As soon as a message is received from the user, capture that message in Pabbly Connect.
  2. Add a Date/Time Formatter step to fetch the current date in the workflow.
  3. Pass both the user’s message and the current date into the AI Assistant step (using either Pabbly’s built-in AI Assistant or your connected OpenAI account).
  4. Use that AI Assistant response to reply back to the user.
At present, this is a limitation within the Chatflow itself. However, you may add this feature request to our roadmap so our team can explore enabling both the user response and custom fields together for AI-generated responses in the future.
 
Top