Infegy social listening query library with test and approval

By General Input

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

Integrations

  • Infegy
  • General Input Database
  • Slack Bot

Type

App

Categories

  • Marketing
  • Operations

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.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonChat quality review board for LiveChat support leadsCompetitor LinkedIn ad watchlist with a permanent archiveLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsA searchable RFP answer library your bid team drafts from