Skip to main content

Im trying to develop an Zapier app in order to get the zoom phone recording and upload to google drive

Always have this issue:

 Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) What happened (You are seeing this because you are an admin): Executing triggers.new_recording.operation.perform with bundle Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) Console logs: Stack trace: CheckError: Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) at checkOutput (/var/task/node_modules/zapier-platform-core/src/app-middlewares/after/checks.js:42:15) at Object.collector.then.newOutput

 

 

Even if i tried the code

 

const options = {
  url: 'https://api.zoom.us/v2/users',
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${bundle.authData.access_token}`
  },

  
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = JSON.parse(response.content)
    results.userId = results.userId;

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

    return /results];
  });

 

Will have this

 

Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) What happened (You are seeing this because you are an admin): Executing triggers.new_recording.operation.perform with bundle Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) Console logs: Stack trace: CheckError: Invalid API Response: - Results must be an array, got: object, ({"page_count":1,"page_number":1,"page_size":30,"to) - Got a result missing the "id" property (1) at checkOutput (/var/task/node_modules/zapier-platform-core/src/app-middlewares/after/checks.js:42:15) at Object.collector.then.newOutput (/var/task/node_modules/zapier-platform-core/src/middleware.js:80:37) at bound (domain.js:402:14) at Object.runBound (domain.js:415:12) at Object.tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromiseCtx (/var/task/node_modules/bluebird/js/release/promise.js:611:10) at _drainQueueStep (/var/task/node_modules/bluebird/js/release/async.js:142:12) at _drainQueue (/var/task/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues mas _onImmediate] (/var/task/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) at process.topLevelDomainCallback (domain.js:126:23)

One thing I spot:

results.userId = results.userId;

Is not what you intended. You’re wanting to synthesize an id field.  You probably meant:

results.id = results.userId;

However, this will not work the way you want it to either.  The id must be unique for that object.  Zapier deduplicates polling trigger data based on the id field.  Using userID as the id will result in a Zap that runs only once, ever, for each user id.  You’ll need to find a field that contains something unique, or you’ll need to combine some fields to synthesize a unique id value for the object.  

The other thing to check here is to make sure that what you are wrapping in array brackets is actually the array of objects you are interested in, not the whole wrapper object.  I can’t tell from the data you posted, but it looks like the array you are interested in may actually be in a child object, in which case rather than wrapping results in an array, you’d pick out the child object containing the array and return that (and there may very well be a good id field in those objects already).  https://platform.zapier.com/docs/faq#i-got-an-an-array-is-expected-error-how-do-i-fix-that