Grok for agencies

Grok Automation: A Research-to-Report Routine Design With a Source Check and Approval Hold

Grok Automation: A Research-to-Report Routine Design With a Source Check and Approval Hold

Grok automation can mean three different things, so choose the right tool before you set a schedule. For a research-to-report routine, decide which steps run on a timer, which run in code, and where a person must approve the result before it leaves your system.

This guide uses one executed fixture run built from supplied source text, not live browsing. The hold queue, approval step and schedule are a proposed design built on that run, and no schedule is active.

Keep the distinctions clear from the start: native Grok Automations are timed or email-triggered prompts, Bot Routines belong to the Grok Bot product, and the API is a separate way to call models from code you host.

Practical comparison of routine options discussed in this guide
OptionBest fitMain limitation
Native Grok AutomationTimed or email-triggered briefs read in the appOutput is not validated against your schema
Bot RoutineStanding work inside a persistent Bot with a transcriptRollout and availability must be confirmed in your account
Hosted API jobStructured reports with parsing, recalculation and holdsYou own storage, retries, secrets and review tooling

Choose native automation, a Bot routine or an API job

We would begin with the job rather than the product. Native Grok Automations run a saved instruction on a schedule or when a matching email arrives, then save the result to a run history. That fits a recurring brief that a person reads in the app, where nothing needs to be parsed or validated.

Bot Routines come from a different design. Standing work attached to a persistent Bot with its own memory and tools is shown in that Bot's transcript. In our view, that suits ongoing monitoring better than a one-off brief. For a wider product orientation, see our grok bot guide, and confirm availability in your own account before planning around it.

The Grok Bot design article describes Routines as standing responsibilities that run on a schedule or in response to an event, attached to persistent Bots that keep their own memory.

The API is different again. It returns model text to code you host, so you own source handling, parsing, validation and storage. We would choose it when the report must become a structured format and a rule must reject bad output before anyone sees it.

Define the report before setting the schedule

Write the report contract first. For our fictional Northstar brief, a landing-page request for a dashboard setup service for independent fitness studios, the deliverable is one landing-page draft. The unknowns are price, deadline, testimonials and performance metrics. Naming those gaps before the run lets the pipeline hold instead of guessing.

The system message asked for JSON with three top-level keys, brief, copy and report, each with its own subfields, and the user message listed three tasks: extract the deliverable and unknowns, write the copy, and calculate rates from the supplied counts. In our reading, the unknowns array is the only place the run recorded missing facts, so a hold check should read that array. The supplied cards were week A with 40 visits and 2 applications, and week B with 50 visits and 0 applications.

Packaging a contract like this as a fixed-scope offer is a separate decision, and our Productized Services: A Useful Guide to Scope, Examples and Delivery covers how to draw that boundary.

For the broader agency fixture, see our grok api guide.

  • Proposed required fields: headline, paragraph, cta and report.

  • Hold trigger: any item on the required missing-facts list.

Run a supplied-source fixture through Grok

The run was a single API request through an AI gateway. The system message told the model it was a synthetic controlled test with no tools or browsing. The recorded request has no tools parameter, so the evidence is an instruction, not a verified tool lockout. The model saw only the cards we supplied, so this was not a Bot or consumer app test. The model id was spacexai/grok-4.3. We make no claim about which model is best for your task.

The output gave the headline Dashboard Setup for Independent Fitness Studios, the CTA Request Draft, and a report with week A at 5 percent, week B at 0 percent and a 25 percent visit change. The unknowns list named price, deadline, testimonials and performance metrics. The recorded cost was about 0.0028 US dollars for this one call.

The grok-4.7 flagship in the Grok API overview is a different model id from the spacexai/grok-4.3 route we used through the gateway. The overview describes direct calls to the Responses API with a bearer key, so it does not document our gateway path.

The Gateway API documentation describes an OpenAI-compatible base URL at ai-gateway.vercel.sh/v1 and bearer-token authentication with an AI Gateway API key. Its examples use anthropic/ model ids and it does not document the spacexai/grok-4.3 route. The run record, not the docs, is our evidence that this route worked for this one call.

  • Keep the raw response before any cleanup.

  • Log the request hash and generation id with each run.

Validate the response and handle bad formatting

Parse the raw text, not what you expect the model to return. In our proposed parser, an optional code fence is stripped only if one appears, then the JSON is loaded and required keys are checked. We did not observe a fence or parse failure in this single sample, so the correction branch is a safeguard we recommend testing, not a tested result.

Recalculate every number yourself. From the cards, week A is 2 applications from 40 visits, which is 5 percent. Week B is 0 from 50, which is 0 percent. Visits rose from 40 to 50, a 25 percent change. The model's three numbers matched. The rubric that marked those checks true was a harness field recorded outside the model result, so treat it as our test check rather than independent approval. That agreement covers this one case only.

Reject output that is valid JSON but incomplete. A missing key or a headline over your house word limit should fail the run, log the raw text and skip the draft. A failed run is more useful than a plausible page that nobody has checked.

Hold incomplete inputs for review

The hold step makes unattended runs safe. The Northstar sample listed four missing facts. A pipeline should not produce a finished-looking landing page when price, deadline, testimonials or metrics are absent, because the copy would have to invent them or quietly omit them.

Use a deterministic rule rather than asking the model whether it feels confident. In our proposed flow, code compares the unknowns array with a required list. If any required item is present, the job moves to a review queue with the draft, the cards and the missing list attached. A person then approves, edits the cards and reruns, or rejects the job.

This is fictional sample work. The Northstar brief is a constructed case, so no price, deadline or result from it should appear as a client claim.

  • Queue states: held, approved or rejected.

  • Reviewer sees the missing fields first.

Schedule only the workflow you can inspect

Scheduling comes last, and this stage is a design, not something we built or ran. The controller concept we would test is simple: a timer triggers a stale-input check, runs the fixture pipeline, sends nothing externally and writes the result to a queue. If the source cards are older than your freshness limit, the controller stops and waits for a manual run. No schedule was created for this article.

Our proposed controller has three rules: a stale-input stop, a manual stop that pauses every run, and no outbound sending until a person approves. These are design choices we recommend, not features we observed in xAI's product. A native prompt will not validate your JSON for you, so keep that check in code.

For a comparable schedule pattern in another stack, our claude code automation guide covers triggers, approval and exception handoff. Decide what every run must log before you enable any timer.

The Grok Automations announcement describes schedules that run once, daily, weekdays, weekly, monthly or yearly, and email triggers that fire when an incoming email matches a sender, recipient or subject filter.