Best answer

Polling trigger and previous id

  • 6 April 2020
  • 2 replies
  • 3279 views

Userlevel 1

Hello guys. :slight_smile:
Anyone know is it possible to send last id from previous response to my next poling iteration (for example after 15 min)? Or maybe any dinamic value from last responce… Its needed because i cant send thousands filds in one request. It will be something like pagination alternative.
Thanks

icon

Best answer by ikbelkirasan 11 April 2020, 00:46

Hi @Sergey Belyakov - That’s not possible without saving the state in some kind of storage. Zapier provides an API to access a key-value store.

The following request shows you how to create a record in the store. Make you sure you assign a unique secret key to the X-Secret header. 

POST https://store.zapier.com/api/records HTTP/1.1
Content-Type: application/json
X-Secret: <your_unique_secret_key>

{
"last_id": "<some_id>"
}

The request below shows you how to retrieve what you saved.

GET https://store.zapier.com/api/records HTTP/1.1
X-Secret: <your_unique_secret_key>

I hope this answers your question.

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +10

Hi Sergey,

I just checked with our team to make absolutely sure, and it looks like there’s no state saved between polling requests. Was there a particular reason you were looking for an alternative to pagination?

Userlevel 7
Badge +11

Hi @Sergey Belyakov - That’s not possible without saving the state in some kind of storage. Zapier provides an API to access a key-value store.

The following request shows you how to create a record in the store. Make you sure you assign a unique secret key to the X-Secret header. 

POST https://store.zapier.com/api/records HTTP/1.1
Content-Type: application/json
X-Secret: <your_unique_secret_key>

{
"last_id": "<some_id>"
}

The request below shows you how to retrieve what you saved.

GET https://store.zapier.com/api/records HTTP/1.1
X-Secret: <your_unique_secret_key>

I hope this answers your question.