The goal:
simply format a number from +12021231234 (E164 format) to 202-123-1234
thats it.
I went to chat gpt (o3 model) and ask for the formula for a set variable. I got:
replace(toString(+12222222222); “(\d{3})(\d{3})(\d{4})”; “$1-$2-$3”; “regex”)
The problem is that make runs it as text and NOT a function.
Tried all the suggest (= in front, etc)
NOTHING works.
I tried make.com AI and it got it wrong also. (it was the worst of all, sorry make)
Is there no way to copy and paste a function into a make.com tools/set variable.
I love how chatgpt claims here is a function button that’s not there. (it’s not there or I don’t have the magic word I guess)
Is it possible to paste a function into a set variable value field and have it execute as a formula and NOT as text?
It must be me cause I couldn’t find this being asked before either…
Any help is appreciated.
Alfred
Followup:
First off, chatgpt and even the make ai were wrong. Consistenty. The make ai bot was even create blank modules and when filing them out, it was filling them out with incomplete formulas.
The answer was in the replace and regex documenation, that even though I pointed o3 to it, it seems it ignored it. I assumed (yeah I know) that the Make AI would have access to the latest documentation.
Google AI Studio solved the problem on the FIRST try. even gave me the {{ }} to correctly enter the expression (vs other AIs telling me to select the non-existent formula button.)
Also Google AI using the free version BTW, correctly used / for regex and described in Make Docs.
Moral of the story:
- Don’t trust AI for coding. it’s sometimes just plain wrong and when called on it admits it “misleads” you.
- Not all LLMs are created the same. Google has gotten better.
- Ai doesn’t always save time, I should have take the 30 seconds to read the documentation. I was being lazy and that’s on me.
- I am seriously considering dropping ChatGPT. Just tired of it giving me wrong info and then telling me that sorry, no more wrong answers for you today, wait for 3 hours. ($20 a month plan, no way they are getting $200 from me.)
Hope this helps some. First thing to do is read the Make docs THEN try AI if still needed.