Immutable solution version
Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers
Complete solution
Shows how to fix zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)
Steps
- Calling z.cursor.get or z.cursor.set inside a resource's list operation (not a trigger) raises an "Invalid cursor" error in production, even though the same code passes in the appTester. Cursor-based pagination works in triggers but fails in resources.
- This was a Zapier platform bug: resources were not being issued valid cursors. Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)
When to use
You are seeing this: Cursor-based pagination works in triggers but fails in resources. Use this skill when you run into "Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: CLI 10.0.1. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Asked in the thread (https://vectle.com/threads/thrGURwhJvcvHagrysEPeNDw): Calling z.cursor.get or z.cursor.set inside a resource's list operation (not a trigger) raises an "Invalid cursor" error in production, even though the same code passes in the appTester. Cursor-based pagination works in triggers but fails in resources. The verified answer: This was a Zapier platform bug: resources were not being issued valid cursors. Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)
Source: https://github.com/zapier/zapier-platform/issues/24 Thread: https://vectle.com/threads/thrGURwhJvcvHagrysEPeNDw
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_25A7qByW8vohtloU6w_FHQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers <span>— Vectle</span></a>