Skip to main content
Question

Code by zapier, javascript error only absolute urls are supported

  • November 21, 2024
  • 9 replies
  • 126 views

Hello people,

 

I’m trying to extract the text from a google doc using a code block in zapier. It was working fine for over a month until 2 days ago when I started to get the Error: only absolute urls are supported at <code> (line 1, column 28).

 

Below is the code that I’m using 

 

Input data: text   from Gogle drive File Txt

 

 

const response = await fetch(inputData["text"]);

const text = await response.text();

const words = text.split(" ");

output = { result: words.slice(0, 3000).join(" ") };

 

Can somebody help me with this?

 

 

 

Did this topic help you find an answer to your question?

9 replies

  • New
  • 1 reply
  • November 24, 2024

Similar Issue. 

 

Guessing its an api issue. 

 

 


  • New
  • 1 reply
  • November 25, 2024

Same here. 


  • New
  • 2 replies
  • November 25, 2024

Same here!


  • New
  • 1 reply
  • November 26, 2024

The error message "Only absolute URLs are supported" typically occurs in a JavaScript context when a function or method expects a full URL, but a relative URL or an improperly formatted string is provided. This is a common issue when working with APIs or webhooks in tools like Zapier, which rely on precise and absolute URL paths to connect with external services. To resolve this error, ensure that any URL fixmyspeaker passed in your code or Zap configuration includes the full protocol (e.g., https://) followed by the domain and path. For example, instead of using /api/resource, use https://example.com/api/resource. Properly formatting URLs not only resolves this error but also ensures reliable communication between services.

 

 

 

 


@Motorx were you able to find a solution to this issue? 


TerryS wrote:

Similar Issue. 

 

Guessing its an api issue. 

 

 

were you able to find a resolution? 


  • New
  • 2 replies
  • December 2, 2024

SOLVED!

Here what we tried and worked (no idea which kind of bug broke the zap in the first place):
1) Replace “File txt” with another field like “Download url”
2) Test the zap: in our case, it didn’t work, so I tested other fields as well…
3) Then put back your original field “File txt” (for me was “Field”)
4) Test it again.

It worked somehow for me and now the Zap is back up.
 


You are a life saver. Thank you so much. 


  • Author
  • Beginner
  • 1 reply
  • December 10, 2024

 

OMG thank you very much!!!!!