Agent for information

Ah, it works… maybe I was just impatient.

This could be quite useful :slight_smile:

4 Likes

Good
Then
It may be necessary to do a little cleaning in all the information.

I think device and browser are the two obvious bits that are most useful.

1 Like

You said it was up some time later, probably worth adding my two cents here.

This morning, I tried sending to my webhook a column that is calculated based on Manu’s UTC time code the other day. That calculated perfectly fine in the builder but it is null when passed to the webhook.

I tried adding a few more columns based on that YC UTC column and they are all null going into the webhook. Something worth considering going forward.

1 Like

mmm, interesting.

The thing that changed here is that I created an if-then-else column so I could tell for certain if it had returned a result of not. eg:

And then I used that column in a hint component.

2 Likes

ah if you want to use a YC column in an action, the YC column must be displayed on the page. This is the only way I have found at the moment.
It works, but you have to be careful with this operation.

Nb:
I think @Mark is growling with my post and he will tell us again that we cannot use YCs in an action.

1 Like

Detect Mobile


  var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);

Hola Thinh,

Reading and studying these days JavaScript better, I could notice that Date-Time variables are special when they are exchanged between applications.

JSON doesn’t support Date-Time objects/variables so these must be converted to string in order to be sent.

Try this:

  • Convert your Date-Time value into string (returned by Manu’s UTC time code)
  • Send this new value to Webhook (via Integromat?) and check if the value is received correctly

If everything is fine in Integromat, you will have to convert again your new Date from String into Date in Integromat.

I hope it helps

3 Likes

new version https://Agent.manun2.repl.co

Can you test for Mac

image

This is a code that I found on the net !!

6 Likes

Sweet!

2 Likes

Thanks @gvalero, I will deffo try this when I have time.

I used Manu’s YC to derive the user’s timezone offset. However it does not work in my timezone solely because we use dd/mm/yyyy instead of mm/dd/yyyy so I had to find an alternative.

Ah!!

I think your format dd/mm/yyyy brings problems as well.

Take a look at this:

Te cuidas!

1 Like

Solution: Move to US? :rofl:

1 Like

Uh
In the YC DateUTC it reverts to ISO format, so it’s a common format “YYYY-MM-DDTHH: mm: ss.sssZ”
I think Glide reformatted for display and internal management at regional setting.
After that it is easy to convert for the webhook.

1 Like

Or you modify the script to make a return value in string so in ISO format

Hi,

Another code that can be useful if you want to know the user language on your APP… Just use the Hell YC template for it.

image

const leng={es: "Spanish", en: "English", fr: "French", de: "German", it: "Italian"};

const ID= window.navigator.language.slice(0, 2);
return  leng[ID]

More codes here: https://tools.ietf.org/rfc/bcp/bcp47.txt

Saludos

6 Likes

That’s interesting @Manu.n , can you get clicked X:Y position of the pointer or finger? In %

Hello @Uzo
Without even thinking too much or doing tests, I think it’s not possible, because your request is for the front-end. and the YC has no connection with this one

2 Likes

tnx… I’m trying to build a slider component

good luck :grinning: :+1:

1 Like