Infegy social listening query library with test and approval

One screen where your insights team writes, tests and approves every Infegy listening query, with volume estimates and version history before anyone pulls data.

App
InfegyGeneral Input DatabaseSlack BotMarketingOperationsResearch & MonitoringNotifications & Alerts
PromptCreate

Build me an app my insights team opens every time we build or repair a social listening query in Infegy. It is a shared query library plus an editor where we test a query against real posts, estimate its volume, version it and approve it before anyone spends budget on a download.

The main screen is the query library, persisted in the General Input Database. One row per tracked query, with the query name, what it tracks (our brand, a competitor, the category, or a specific campaign), the owner, the last tested date, the latest estimated volume, the precision score, the current version number and a status of approved, proposed or needs review. Make it sortable and filterable, and flag anything not tested in the last 30 days as stale, since slang, memes and new product names shift constantly and a query that was clean last quarter often is not. Across the top of every screen put a quota strip fed by Infegy Get API Usage showing current consumption and remaining quota for the billing period, refreshed when the app loads.

Opening a row opens an editor pane with the Starscape query on the left and results on the right, and two buttons. Test runs Infegy Test Query Against Sample and lists the matching posts with body, source and date, and every post gets a relevant or noise toggle whose tag saves to the database against that query version and the person who tagged it. Estimate runs Infegy Validate Query and Get Estimated Result Count and shows both the validation result and the estimated record count, so we see the size of the pull before anyone triggers an expensive download. Surface Infegy validation errors word for word rather than summarizing them, because these queries run hundreds of words long and one missing parenthesis completely changes the logic.

The precision score is the app's own calculation, not something Infegy returns. It is the number of posts tagged relevant divided by the total tagged in the most recent test run for that version, shown as a percentage next to the number of posts tagged, so we can tell 90 percent off 10 posts from 90 percent off 200.

Add a "draft a query for this topic" button that kicks off a background agent. I type a plain English description of the topic I want to track. The agent writes the Starscape query, runs it through Infegy Test Query Against Sample, reads the matching posts, works out which operators or terms are pulling in the false positives, tightens or removes them, retests to confirm the noise dropped, then runs Infegy Validate Query and Get Estimated Result Count for a volume estimate. It saves the result back into the library as a proposed version carrying the query, the volume estimate, the sample posts it judged relevant and noise as evidence, and a short note on what it removed and why. Show its progress in the app while it runs. The agent never approves its own work, it only proposes.

Approving a proposed version makes it the current version and posts to our insights channel with Slack Bot Send a Message: the query name, who approved it, a short summary of what changed from the previous version, the new estimated volume and the precision score from its test.

Keep every prior version forever and never overwrite one. The editor has a version history list showing each version's query, estimate, precision score and test evidence, with a rollback button that makes an older version current again so we can undo a query that quietly started pulling garbage. Announce rollbacks in the same Slack channel the same way approvals are announced.

Keep downloads behind the gate. Infegy Download Post Records is only available on an approved current version and only after an estimate has been run, with the estimated count and the remaining quota shown next to the button and a warning when the estimate would eat a large share of what is left. A single download call returns up to 250,000 records, so anything larger has to paginate.

Store all of it in the General Input Database: a queries table, a versions table with one row per saved version, a test runs table and a relevance tags table keyed to the post and the person who tagged it. Everyone on the insights team works from the same library, so show the owner column and a "my queries" filter, and record who tested, who proposed and who approved on every version.

What does this prompt do?

  • Keeps every tracked query in one shared library, your brand, each competitor, the category and each campaign, with its owner, last tested date, estimated volume and precision score.
  • Lets you open a query, run it against a sample of real posts, and tag each post relevant or noise so the app can score how clean the query actually is.
  • Shows the estimated record count and your remaining plan usage before anyone kicks off an expensive download.
  • Drafts a new query from a plain English topic description, strips out the terms pulling in junk, and saves a proposed version for a human to approve.
  • Posts approved changes and the new volume estimate to your insights channel in Slack, and keeps every prior version so you can roll back a query that quietly started pulling garbage.

What do I need to use this?

  • An Infegy Starscape subscription with API access turned on
  • A Slack workspace and the channel your insights team reads
  • A General Input database to hold the query library, versions and relevance tags
  • A rough list of what you track today: your brand, competitors, the category and any live campaigns

How can I customize it?

  • Change the sample size and how many posts get tagged before the app reports a precision score
  • Set how many days without a test marks a query stale on the library screen
  • Pick which Slack channel approvals post to and what the message includes
  • Decide who can approve a proposed version and who can only propose one

FAQs

Do I need to know how to write Infegy queries to use this?
No. You can describe the topic in plain English and hit the draft button, and a background agent writes the query, tests it against real posts, removes the terms causing false positives and saves it as a proposal for you to review. Experienced analysts can still edit the query directly in the editor.
Where does the precision score come from?
The app calculates it from your own tags. When you test a query you read the matching sample posts and mark each one relevant or noise, and the score is the share you marked relevant. It is not a number Infegy supplies, so it reflects your team's judgment about what belongs in the results.
Will this run up my Infegy bill?
Testing against a sample and checking an estimated record count are the cheap steps, and the app puts both in front of the expensive one. A usage strip across the top shows what is left on your plan, and the full download stays locked until a version is approved and an estimate has been run.
Can I go back to an older version of a query?
Yes. Every version is kept, never overwritten, with the query, its volume estimate, its precision score and the sample posts it was judged on. If a query starts pulling garbage you can compare versions and restore the one that worked.
Can it post to Microsoft Teams instead of Slack?
Yes. The approval announcement is one step in the app, so you can point it at a different chat tool, at email, or turn it off entirely if your team would rather review changes inside the app.

Related templates

Klaviyo campaign calendar and draft studio for marketing teams

Plan every email and SMS send on one calendar, see how past campaigns performed inline, and let an assistant write and file the next draft in Klaviyo.

Klaviyo
Slack Bot
App
Run your application review round on Jotform submissions

Your committee opens one board to score every application, see where reviewers disagree, and send the decisions without merging a single spreadsheet.

Jotform
Gmail
Slack
+1
App
Turn any influencer campaign into a client-ready report

Open any campaign, pick this month versus last, and have a written client report drafted into Google Docs and posted to their Slack channel.

Later
Google Docs
Slack Bot
App
Approve every Jotform enquiry before it reaches HubSpot

Work every form enquiry from one queue that already tells you who is new, who is a duplicate and who has a deal open, then push only what you approve.

Jotform
HubSpot
Slack Bot
App
Run cold email domain rotation on one drag-and-drop board

See every sending domain as Active, Reserve or Retiring, watch your bench against the 20 to 25 percent target, and refill it before a domain burns.

InfraForge
Smartlead
Slack Bot
+1
App
Launch console for cold email domains and mailboxes

Pick a client, get ranked domain suggestions with live prices, and buy domains and mailboxes in one confirmed step instead of juggling tabs and a spreadsheet.

InfraForge
Smartlead
Slack Bot
+1
App

Stop rewriting listening queries from scratch.

Give your insights team one place to draft, test, approve and roll back every social listening query, with the cost of a pull visible before anyone starts it.