https://discord.gg/botpress logo
You can retransform this in google sheets into you...
# 🌎general
f
You can retransform this in google sheets into your desired format
r
JB I could really use your hlep here
I've been at it for 2 days..
I have a webhook of this data going to 3 different zaps.. google sheets, email sent out + data entry..
This is how far I got, but I'm not strong Javascript coder:
workflow.zapierSuccess = false; const payload = { concent: workflow.concent, name: workflow.full_name, dob: new Date(workflow.dob).toDateString(), // Incorporating the toDateString() method here home_address: workflow.personal_address, business_name: workflow.business_name, business_address: workflow.business_address, }; try { const response = await axios.post('https://hooks.zapier.com/hooks/catch/15890213/31z1yqp,31k8rr6/', payload); } catch (error) { console.log(error); }
dob: new Date(workflow.dob).toDateString(), // Incorporating the toDateString()
f
so the zap is failing?
r
23-12-1999 is the format I'm looking for..
let me try agian and but last time no
f
what is this format? is this french format?
r
sorry just checking it out.. 2 seconds
take a look at this haha
ok, so I just went through the chat: I entered: dob: June 17th, 1979 it got recorded as --> Object:1979-06-17T00:00:00.000Z
but in Zapier..
16th??
f
hmmm
r
yeah
if the format read: June 17, 1979 We're done!
f
i wonder if zapier has a timezone set by default
ok it's UTC, so just strange
does botpress pick it up right?
can you check the debugger?
r
botpress picks it up right
gimme a sec
f
yup ok thats right
does it systematically do this?
like -1 all the time?
r
I'm taking your advice and just set my time zone on zapier, let see if that works..
gimme a second, going through second run
If this helps you out, Sly helped me out last night
but he also in his post indicates a -1 in date
f
hmm this is super strange
let me open up a ticket, and try to have an engineer replicate internally
r
Much appreciated, I think you Sir
Please don't hesitate to correspond with me, I'm here and apprecaite so much all the work everyone does
f
yeah they might need more information, in the meantime i have opened a ticket, they might need a report from your environment or a copy of the bot possibly.
r
that's fine, I'm here to help as well..
I don't mind sending you over the bot just please let me know
and thanks for getting back to me
@quick-airport-12515 report your problem here with me
@careful-keyboard-68830
c
thanks for tagging me
q
Sure thx for support
I already create bot 🤖 so This bot send lead to google sheet and in zapier flow send Google Calendar invitation for a appointment information to user so in this time show worng In my google sheet time is 16:00 and when zapier send invitation useing Google Calendar appointment booking time is different So anyone can you help me for This
I also attach photo
r
@billions-yacht-29034 add your issue here
b
ty How can i select only the Date instead of DateTime
r
That's a great question.. if you scroll up to the top you find the code that was provided to me.. In the section: Date(workflow.dob).toDateString() is the method that should only grab the DATE and not TIME The problem is that when the user types in the date, the variable is set to the correct date, however it get's pushed out with the date -1 day which is so strange..
look through the problem, you'll see the screen shots and everything
it's almost as if the Date(workflow.dob).toDateString() does a -1 on the date for some reason, but the good thing is that it takes out the time..
q
Dear all, I have fix this issue thx for help @rough-dress-97649 thx ☺️ for support
r
How did u do it?
@freezing-printer-49373 @some-baker-90541 I'm not sure if this is to early to ask, but has this issue been resolved?
f
I just asked for the status on the ticket
Hey @rough-dress-97649 can you create a report id for us?
r
Afternoon @freezing-printer-49373, how do I create a report Id?
f
check the thread i posted, it has instructions on how to do that
make sure to create it in the environment or bot where you are facing this issue
r
I was on mobile and didn't see you had add the link.. FYI.. I just submitted a report to the team.. Thank you
e018644c-e58d-4b32-a118-0f4ec0438df3
f
thanks for the number
Well now i'm confused, it's working on my side
i tested it an it's working exact date on the botpress side
wait nevermind, i'm missing the step that breaks it
i can confirm the extraction is accurate
hey i think i was able to submit a zap, what DOB do you have on zapier?
r
Spot the problem?
f
yeah
i see it
look at the logs
17:23:35debug[Capture] Transformed the extracted value Fri Mar 13 1987 19:00:00 GMT-0500 (Eastern Standard Time) 17:23:35debug[Capture] User provided a value: Fri Mar 13 1987 19:00:00 GMT-0500 (Eastern Standard Time) 17:23:35debug[Capture] Field validation successful! Extracted: "1987-03-14T00:00:00.000Z". Input: march 14th 1987
time zone thing
it's transforming the utc to eastern time
so then it captures march 13th
r
Who is transforming?
f
that i'm still investigating
at least i can see the issue
we are getting there
Ok I've escalated to a core engineer, i'll follow up tomorrow
one of the engineers is currently taking a look
you might receive another zap
hey @rough-dress-97649 so we found a workaround
dob: luxon.DateTime.fromJSDate(workflow.dob, { zone: 'utc' }).toISODate()
(replace the new date by this)
let me know if it works
heading out for the day, looking forward to seeing if this did the trick
r
I will shortly, thanks for the heads up
Im just away from my computer at the moment..
Enjoy the rest of your evening
It works!!! Thanks
q
I use zapier data / time formats and change time zone in zapier then issue fix
r
are you referring to the following link: https://help.zapier.com/hc/en-us/articles/8496275717261-Insert-the-time-your-Zap-runs-into-a-field#add-a-timestamp-in-your-timezone-0-0 Even in this example the time is also represented, is that true?
If the link I posted is true, it doesn't help when your botpress bot is asking for Date of Birth.
f
A more permanent fix is coming for this, but this is a good workaround.
r
100%
q
I just add date / time format zap in zapier and set time zone in zapier website profile
@rough-dress-97649 then working fine
b
Hey there. I was trying a few different ways to extract a date and it caught my attention this scenario. The NLU interprets the message as a datetime, but the card is not capturing the information.
6 Views