0

I use the formula below to pull opening hours for a business whose place_id specified in column B. The formula source is a code.gs sourced from here (link is to GitHub)

=ImportJSON("https://maps.googleapis.com/maps/api/place/details/json?place_id="&B2&"&fields=opening_hours/weekday_text&language=iw&key=AI*********","/result/opening_hours/weekday_text", "noHeaders")

When I try to bind the formula inside of an ArrayFormula() and changing B2 to B2:B ​I get the error "Exception: Limit Exceeded: URLFetch URL Length. (line 146)", which in the code refers to var jsondata = UrlFetchApp.fetch(url);​ Any way to still array this formula?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Iftach
  • 95
  • 2
  • 13
  • Can you try this: Create a helper column with 5ish urls without variables in them. Then change your formula to Arrayformula(ImportJSON(C2:C,"/result/opening_hours/weekday_text", "noHeaders"). Arrayformula sometimes does unexpected things with concatenation. – Kris Aug 20 '21 at 16:36
  • You can try to shorten your url via URL Shortener API. Try reading the answer in this post. https://stackoverflow.com/questions/43142607/urlfetchapp-fetch-with-very-long-urls/43196448 – Jason E. Aug 20 '21 at 17:59

0 Answers0