Store posts in a database

We’re retrieving posts and tagging them with AI — but how do we know if the AI is getting it right?
In this lesson, we’ll write posts to a database so we can review how the AI is tagging content and fine-tune our workflow.
Having this database also sets us up to generate automated reports and track key trends in our community over time.
Follow along or use pre-built templates: X (Twitter), Reddit or Bluesky.
Storing posts in a database
Gumloop integrates with many databases like Airtable, Google Sheets, or Supabase.
No matter which one you use, the setup is simple: you’ll map the outputs from your flow — things like the post content, author, and tags — to fields in your database and use your tool's writer node to store posts in that database.
For example, if we’re using Google Sheets, we might set up columns for:
- Post URL
- Post Content
- Post Author
- Channel
- Post Urgency
Once your sheet is ready, connect your AI Categorizer nodes and social media reader nodes to the database writer node (Google Sheets writer in this case).
Now, when you run the flow on recent posts, you’ll have a record of how the AI categorized everything — making it easy to review and improve.
Assessing tag quality
Getting the AI to categorize posts correctly — while keeping credit usage efficient — is a balancing act.
There are three main paramaters on the AI Categorizer node you can adjust to improve performance:
Additional context
This is the context the AI uses to decide between categories.
Be clear about your business, what the categories mean, and how the AI should think about them.
You can also add additional context or examples for specific categories to guide the AI more precisely.
Categories
The AI can only choose from the categories you give it. If your current categories feel too broad, add more detail or create additional options. If they’re too narrow, the AI might struggle to differentiate them — unless your prompt gives enough context.
Model
Models vary in cost, speed, and quality.
- For simple tasks (like sentiment tagging), go with a lower-cost model to save credits.
- For more complex analysis (like customer questions, posts that involve irony, sarcasm, or nuance), use a more advanced model to improve accuracy.
Once you’re happy with how your tags look — it’s time to take action!
Next up: Let’s send important messages to your team.