• 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: 1
  • Postman_rkVYKUAAw5.png
    Postman_rkVYKUAAw5.png
    86.7 KB · Views: 2

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
 
Top