What You’ll Build
A simple automation that:- Takes an input (e.g., a wallet address)
- Runs a SQL query to analyze the wallet
- Uses an agent to summarize the results
- Sends the summary via email
Prerequisites
- A Flipspace account with access to Automations
- Basic familiarity with SQL (optional—you can use existing queries)
Step 1: Create a New Automation
Open Automations
Navigate to Automations in Flipspace.
Step 2: Add an Input Node
The Input Node defines what data your automation needs to run.Configure the input
Set up the input parameters: - Name:
wallet_address - Type: Text - Description:
“The wallet address to analyze”Step 3: Add a Query Node
The Query Node runs SQL against Flipside’s data warehouse.Write or select your query
Use a query that references your input variable: ```sql SELECT date_trunc(‘day’,
block_timestamp) as day, count(*) as tx_count, sum(amount_usd) as volume_usd FROM
ethereum.core.ez_token_transfers WHERE from_address = '' AND block_timestamp
= current_date - 30 GROUP BY 1 ORDER BY 1 ```
Step 4: Add an Agent Node
The Agent Node uses AI to process and summarize results.Configure the prompt
Tell the agent what to do with the query results:
text Summarize this wallet's activity over the past 30 days. Highlight any notable patterns or large transactions. Keep the summary under 200 words. Step 5: Add an Email Node
The Email Node sends results to specified recipients.Set subject and body
- Subject: “Daily Wallet Summary for ” - Body: Reference the agent’s
output using
{{ agent_output }}
Step 6: Test Your Automation
Step 7: Schedule or Deploy
Once tested, you can:- Run manually: Trigger the automation on-demand
- Schedule: Set up recurring runs (daily, weekly, etc.)
- Trigger via API: Call the automation programmatically
Complete Workflow
Your finished automation should look like this:FAQ & Troubleshooting
My query isn't returning results
My query isn't returning results
Check your query:
- Verify the SQL syntax is correct
- Test the query in the SQL Editor first
- Ensure input variables are properly referenced with
{{variable}} - Check date ranges aren’t filtering out all data
The agent output isn't what I expected
The agent output isn't what I expected
Improve your prompt: - Be more specific about the desired output format - Provide examples of
what you want - Break complex tasks into multiple agent nodes
Email isn't being delivered
Email isn't being delivered
Verify email settings: - Check recipient email addresses are correct - Look in spam/junk
folders - Ensure your account has email delivery enabled
Automation fails intermittently
Automation fails intermittently
Common causes: - Query timeout: Optimize your SQL or reduce data range - Rate limits: Add
delays between nodes if needed - Missing data: Add conditional nodes to handle empty results
How do I debug a failed run?
How do I debug a failed run?
Debugging steps:
- Open the automation’s run history
- Click on the failed run
- Inspect each node’s input and output
- Check error messages for specific issues
Alternative: Create via CLI
You can also create automations using the Flipside CLI for programmatic control and version management:CLI: Automations
Full CLI documentation for creating and managing automations