Best answer

Sequential value every time Zap runs

  • 17 March 2022
  • 3 replies
  • 523 views

Userlevel 2
Badge +1

I’ve got a Zap cooking where I need a sequential order number each time the Zap runs. In the past I have done this with a simple Google sheet but I wonder if there is a better way? Is it possible to store a value like 1001 and then, the next time the zap runs, the value would change to 1002, without the use of a Google sheet or similar?

icon

Best answer by Troy Tessalone 17 March 2022, 19:24

View original

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

3 replies

Userlevel 7
Badge +14

Hi @ericg 

Good question.

Try using Storage: https://zapier.com/apps/storage/integrations

 

Userlevel 2
Badge +1

Brilliant @Troy Tessalone! It’s like Zapier thought of everything!

Question: My order numbers will be formatted like so – 220-5YR1001. The next in the sequence being 220-5YR1002. In this case, would I use storage to get the 4 digits at the end and use something like Formatter to add the first half of the number?

If my sequence is to start with 1001, how do I set that initial value? I see an action for setting values. Would I just run a quick zap that sets my storage to 1000 or is there a more graceful way?

Userlevel 7
Badge +14

@ericg

A combo of static and dynamic values can be used in a Zap field.

Thus, no need for a Formatter step.

220-5YR[STORAGE_VALUE]

 

Would I just run a quick zap that sets my storage to 1000 or is there a more graceful way?

Yep, you will need to test via a Zap step to set the initial value.