Question

Creating a Trigger, getting error : Only absolute URLs are supported at getNo

  • 7 April 2022
  • 1 reply
  • 102 views

Hello,

I have built a few a new Trigger in the developers site. It should catch a json blob and then process it with java script. 

 I can see the json blob in the monitoring tool but i get the below error 

 

Only absolute URLs are supported at getNo

 

Here is the Java Script code. 

 

Perform List code 

 

const options = {
  url: 'https://hooks.zapier.com/hooks/catch/11485728/b8ey89i/',
  method: 'POST',
  headers: {
    'Accept': 'application/json'
  },
  params: {

  },
  body: {

  }
}

return z.request(options)
  .then((response, body) => {
    response.throwForStatus();
    const results = response.json;

    // You can do any parsing you need for results here before returning them

    return results;
  });

 

Perform 

//return [bundle.cleanedRequest];
const applicant = JSON.parse(`${bundle.rawRequest}`);
const answers = applicant['answers'];
const convertAnswersArrayToObject = (acc, val) => ({...acc, [val.id]:val.value});
const answersObject = applicant['answers'].reduce(convertAnswersArrayToObject, {});
return ({
  alphaNo: applicant['job_id'].slice(0,16),
  alphaTen: applicant['job_id'].slice(0,10),
  ats_no: applicant['attributes']['ats_no'],
  bid_no: applicant['attributes']['tracking_code'],
  first_name: applicant['first_name'],
  last_name: applicant['last_name'],
  email: applicant['email'],
  phone: applicant['phone'].replace("+1 ",""),
  resume: applicant['resume'],
  ...answersObject,
});


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +9

I’m not sure if this is the issue generating that error, but one thing I spot:

performList is a method that Zapier calls to your API, to enable the user to retrieve some real pieces of data, on demand, from the Zap Editor, while they are configuring their trigger. So if your hook is going to be listening for say “task” objects, you’ll want to configure an API call to get a list of tasks from your API that match the objects your hook will return. This enables the user to map fields in subsequent workflow steps. 

Looks like your performList might be posting to a Zapier hook endpoint, which is not going to produce the desired behavior.