Check a sign-in flow

Confirm on a schedule that people can still sign in and reach their account, not only that your homepage loads.

Needs a verified team domain.

A flow monitor runs several steps in order and checks the result of each: sign in, carry the token, call the endpoint it unlocks. It may only reach hosts under a domain your team has verified, which keeps it from being pointed at someone else's site.

A flow monitor's page
  1. Verify your domain

    Skip this if your domain is already verified. A team owner or admin opens Settings → Domains → Add Domain, enters the domain, and publishes the TXT record shown there. See Team Domains.

    Verifying example.com also covers app.example.com, api.example.com and every other subdomain.

  2. Create a test account

    Sign up a dedicated account the monitor can use, such as uptime-monitor@example.com. Its password is written into the flow, and anyone on your team who can open the monitor can read it, so give it no real data or privileges.

  3. Write the flow

    Open Flow Monitors in the sidebar and click Create. Give it a Monitor name, then write the steps in Flow. This one signs in through an API, then uses the token it got back:

    text title="flow"
    test "a member can sign in and load their account" {
    	when {
    		let session = http.post "https://app.example.com/api/sessions" form {
    			email: "uptime-monitor@example.com"
    			password: "the monitor account's password"
    		}
    		let account = http.get "https://api.example.com/v1/account" bearer session.json.token
    	}
    	then {
    		expect session.status 200
    		expect account.status 200
    		expect account.json.email "uptime-monitor@example.com"
    	}
    }

    To drive the real sign-in page the way a person would, start the flow with use browser and use browser.open, browser.fill and browser.click instead. The Flow Monitors reference has an example and every step you can write.

  4. Choose how often

    Pick Run every: 15 minutes at the most frequent, up to once a day. The default is 1 hour. Leave Enabled on and click Create flow monitor.

    If the flow names a host no verified domain covers, it isn't saved and the message names that host.

  5. Run it once

    On the monitor's page, click Run now. The result says how many tests passed; when one fails, Last failure names the test and the line it broke on.

What it costs

A flow that only makes HTTP requests uses one ping per request, from the same allowance as your other checks: the two-request flow above, run hourly, uses 1,440 pings in a 30-day month. A flow that uses the browser is billed $0.0025 per run instead, with no runs included in the subscription.

Why can't it run every minute?

A flow makes several requests per run, so the shortest interval is 15 minutes. Put an HTTP monitor on the endpoint the flow depends on for minute-by-minute checks, and let the flow cover the sequence.

What limits does one run have?

A run may take up to 30 seconds and make up to 20 requests, and each response is read up to 1 MB. A run that hits a limit shows as Cannot run, not as failing. See My flow monitor fails or can't run.

Documentation