Imagine working on a team project that spans several weeks. You wouldn't want to start from scratch every morning, right? You'd keep your notes, progress updates, and reference materials somewhere everyone can access them.
Resources in Tines work the same way! They're persistent team-based data stores that exist outside your stories, maintaining their values even after a story finishes running. Unlike events (which are like conversations that end when a meeting is over), resources stick around indefinitely until you decide to change or delete them.
Resources are perfect for information that needs to be:
Remembered between story runs. ("When did we last check for alerts?")
Shared across multiple stories. ("What's our current API endpoint?")
Maintained independently of any specific workflow. ("Which domains are on our approved list?")
When to use resources
Resources are ideal for several common scenarios:
Configuration settings
Have you ever needed to update an API endpoint in multiple stories? Instead of editing each story individually, you could store that endpoint in a resource and update it once. Examples include:
API endpoints that multiple stories need to access
Team email addresses or distribution lists
System parameters that might change over time
State tracking
Resources are perfect for remembering what happened in previous runs:
"We've processed 157 alerts this month." (counters)
"We last checked for new tickets at 2:30 PM yesterday." (timestamps)
"We've already processed these alert IDs." (avoiding duplicates)
Cross-story communication
Think of resources as the messenger between your stories:
Story A discovers important information and stores it in a resource.
Story B reads that resource and takes action based on the information.
This creates workflows that can span multiple stories while keeping each one focused on its specific task.
Data caching
Why make the same API call repeatedly if the data rarely changes?
Store API responses that don't change frequently.
Reduce external API calls (and stay within rate limits).
Keep reference data handy for quick lookups.