All jobs

Did Any Client's Contact Form Fail Yesterday? A Web Design Agency's Morning Check of Its Vercel Runtime Logs

A web design agency's agent reads yesterday's Vercel runtime errors on every client site's form routes each morning and lists the enquiries that may have been lost.

Run this on RushOpens the console with this prompt ready to send. Connect Vercel there first.

What the agent does

This is for a small web design agency that builds and hosts marketing sites for local businesses: a plumbing company, a family law practice, a wedding venue, a dental-supply shop, a boutique hotel. Each site is a project on the agency's Vercel Pro team, and each has a form or two, contact, quote request or booking enquiry, that posts to a function such as /api/contact, which sends the message on by email or into the client's CRM. When the email provider's key is rotated, a CRM changes its API or a spam filter starts rejecting, the function throws, the visitor sees a generic error or nothing, and the client simply gets fewer enquiries. Clients notice weeks later, if ever. An agent reads the agency's runtime logs every morning and names any form that failed.

The agency's lead developer connects Vercel once with POST /me/connections {"type": "mcp", "name": "vercel", "url": "https://mcp.vercel.com", "auth": {"mode": "oauth"}}, signs in on Vercel's page and grants the connection access to the agency's team. Vercel's docs say the agent needs access to the team that owns a project before it can read that project's logs, and that the person's existing Vercel permissions still apply.

On a run the agent calls list_teams and list_projects to get every client project, then, for each one, get_runtime_errors with since set to 24h and routes set to the form routes in the prompt, which returns grouped errors and the routes they hit. For a project with errors it calls get_runtime_logs with environment set to production, level set to error and fatal, and group_by set to requestPath, which Vercel's docs describe as returning counts instead of individual lines, to see how many failed requests each route had. Then it reads up to 20 lines for each failing route with limit and query, to get the error message, the first and last time it appeared and the deployment it came from.

The run is daily because Vercel's docs say runtime logs on a Pro plan are kept for one day, so a weekly sweep would see only the last day of the week. The prompt tells the agent to leave out any name, email address or phone number that a log line happens to contain, so the report says what broke and when, not who wrote in. It never redeploys, rolls back, changes an environment variable or touches a project setting.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Morning form check for all client sites on the Vercel team northpoint-studio. Window: the last 24 hours. Use the vercel connection, read only. Form routes to check on every project: /api/contact, /api/quote, /api/enquiry, /api/booking, and any route whose path contains form. 1) list_teams, then list_projects for the team. 2) For each project: get_runtime_errors with since 24h and those routes. 3) For each project with errors: get_runtime_logs with environment production, level error and fatal, since 24h, group_by requestPath; then for each failing form route get_runtime_logs with limit 20 and a query for that path to read the messages. 4) For each failing route record: project, route, failed requests, first and last time (UTC and Europe/London), the error message with any secret, token, name, email address or phone number removed, the deployment id, and one plain sentence on the likely cause (an expired key, a rejected request from the email or CRM provider, a timeout, a code error). Write forms.md: failing projects first, most failed requests first; then one line listing the projects with no form errors. Also draft, for each failing project, a three-sentence note to the client explaining that some enquiries may not have arrived and when. Do not deploy, roll back, edit environment variables or change any project setting.",
  "connections": [
    "vercel"
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is forms.md among the session's files and a short summary in the session's result: each client site whose form failed in the last day, how many requests failed on which route, when it started, the error with personal data removed, a plain-language guess at the cause, and a draft note to the client. Sites whose forms ran clean are listed together in one line, so a quiet morning is a two-line report.

What the developer checks before acting: the error itself, by opening the project's logs in Vercel, since a guess about an expired key is still a guess; whether the failures came from real visitors or from a bot hammering the form, which often looks like a burst from one region; and the draft note to the client, which a person edits and sends. Fixing the function is the developer's job, done in the client's repository as usual.

Run it on every weekday morning

In the console, a Project automation with a schedule trigger, cron 30 7 * * 1-5 and timezone Europe/London, runs a saved agent whose connections name vercel with this prompt. The prompt says "the last 24 hours" rather than a date, so the same saved instructions work every day; a Monday run can use 72h instead to cover the weekend if the team's plan keeps logs that long.

After a deploy that touched a shared form component, the developer can start the same saved agent from the console with "the last 2 hours" to check every site at once rather than opening each project.

The use case this job follows, with its automation and trigger: Produce a report or file, no repo.

Why run it on Rush?

The Vercel sign-in is held in Rush's connection, limited to the team the developer granted, and acts with that person's permissions; the agency keeps no Vercel token in a cron job on someone's laptop, and removing the connection stops the check at once.

Each morning's run has its own computer and a record of every log query it made and what came back, so when a client asks whether their form was down last Thursday, the agency opens that morning's session and reads the exact errors and times. The session's total_cost_usd shows what the daily check costs across all client sites.

Frequently asked questions

Why not just set up an alert on each project?

An agency with thirty client sites ends up with thirty alerts that each say "error rate high" with no context. This run reads all of them at once, says which form, what broke and since when, and drafts the note to the client, which an alert does not.

What if a site is on a Hobby plan?

Vercel's docs say Hobby keeps one hour of runtime logs, so a morning run would see almost nothing. The check is for projects on the agency's Pro or Enterprise team, where the logs cover the day.

Can the agent tell us which enquiries were lost?

It deliberately does not. The prompt strips names, email addresses and phone numbers from what it reports, so the result says how many requests failed and when. Recovering a specific enquiry is something the client and agency do from their own records.

More Vercel jobs

More jobs like this: Produce a report or file, no repo

Keep reading