Question

Facing issue while integration api in trigger.

  • 19 April 2021
  • 2 replies
  • 47 views

Facing issue to create trigger 

const options = {
  url: 'https://anywheredevwebhost.azurewebsites.net/api/TokenAuth/ConvertEncryptPasswordForTesting?pwd="5454454""',
  method: 'GET',
  headers: {
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwibmFtZSI6ImFkbWluIiwiQXNwTmV0LklkZW50aXR5LlNlY3VyaXR5U3RhbXAiOiJQWUpETlhWREpaQkpOTVhTSTZCQTdQMk5DQk40RENUTyIsInJvbGUiOiJBZG1pbiIsImp0aSI6IjRjN2RiMGFmL…….',
    'Accept':'application/json'
  },
  params: {

  }
}

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

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

    return results;
  });

Getting the error :-

when I am calling same api in postman its return a valid output but getting issue with zapier could you please help.

Thanks in advance


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

2 replies

Userlevel 7
Badge +12

@shweta 

Zapier requires that all objects returned have a unique field called ‘id’. If the request doesn’t return this field, you will need to loop through the response and assign a unique id using the fields that are returned. 

However, it also looks like the response is null. Can you check out the monitoring tab of your integration page and post a sample response? 

Userlevel 7
Badge +10

@shweta 
Just checking in to see if you still need help with this?