Use App Data Storage
Learn how to use App Data Storage.
Purpose
We can use have a built in key-value storage to store basic state between action runs or to help us centralize values we need across actions, like IDs. Note that key-value storage items are always stored as strings, so you may have to cast the type.
Usage Examples
We can store our Airtable base ID, Google Sheets ID, or any other ID inkey-value storage so that we don’t have to copy/paste it into our actions. If we change the ID, we just change it in one location. You can set a key-value pair in the “App Data Storage” tab, then call it in your action with the following code:
You can also set values in key-value storage. If the value does not exist in key-value storage then it will be created the first time the code is run. For example:
Prompting Tips
When you want our AI to generate code for you with key-value storage, mention that you want to use key-value storage like this:
Use key-value storage to fetch the Airtable base ID. I called it AIRTABLE_BASE_ID.
Last updated
Was this helpful?