Set a report's date range automatically on a website

How to set a report's date range automatically on a website: install the Chrome extension, click Build with Browser agent, tell the agent which page the report is on, which dates it should cover and which sheet the results go in, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To set a report's date range, two Date and time steps work out dates relative to today, seven days ago and yesterday, and two Enter text steps type them into the From and To fields. A Click element step updates the report. A Get data from bot's current page step then scrapes the results the report shows, and a Write data to a Google Sheet step adds them to your sheet. The dates are worked out on every run, so a scheduled report always covers the right period.

Author
Alex Barlow
Published

Build the report date range from a description


Describe it and click the button: the agent builds and tests the date range in your Chrome extension. See automate reporting for the rest of a reporting bot: the login, the download and the schedule.

  1. Go to the report page I give you
  2. Set the From date to seven days ago
  3. Set the To date to yesterday
  4. Click Apply to update the report
  5. Scrape the results into my Google Sheet
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need the address of the report page, a Google Sheet for the results, and to know the format its date fields take, such as 30/11/2026 or 2026-11-30. Set the automation's timezone to the web app's, so a run just after midnight does not land on the wrong day.

What the agent does when you click the button


The agent opens a browser in the cloud, asks for the report page, then finds the date fields and the results, builds the steps in the no-code builder and saves them, ready for you to run.

The Chrome extension's new automation panel with the five lines describing the report date range: go to the report page I give you, set the From date to seven days ago, set the To date to yesterday, click Apply to update the report, scrape the results into my Google Sheet, and the Build with Agent button
1.Describe the report's date range to the Browser agent in five lines and click Build with Agent.
A demo sales report with From date and To date fields open in a cloud browser beside the Browser Agent, which says the report page has no Apply button, only Search and Reset, and asks whether to click Search to update the report, answered with yes, click the Search button
2.The agent asks questions as it builds. Here the page has no Apply button, so it asks whether Search is the button that updates the report.
The finished report date range bot in the no-code builder with eight steps: Go to page, Date and time for the From date seven days ago, Date and time for the To date yesterday, Enter text for each date field, Click element on Search, Get data from bot's current page and Write data to a Google Sheet
3.The agent builds the bot: two Date and time steps work out the dates, two Enter text steps type them, then the bot clicks Search, scrapes the report and writes it to the sheet.
A Google Sheet filled with the scraped sales report for the date range: one row per order with its number, date, product, category, region, quantity, unit price, total and status
4.The result of the run: the report's rows for the last seven days, scraped into the Google Sheet.

Build the report date range step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Go to page
    • URL: the page the report is on
  • 2.0 Date and time
    • Data: Custom, n days ago, 7
    • Select format: Date, in the format the From field takes
  • 3.0 Date and time
    • Data: Custom, n days ago, 1
    • Select format: Date, in the format the To field takes
  • 4.0 Enter text
    • Select text field: the report's From date field
    • Text: [from-date]
  • 5.0 Enter text
    • Select text field: the report's To date field
    • Text: [to-date]
  • 6.0 Click element
    • Select: the button that updates the report, such as Search or Apply
  • 7.0 Get data from bot's current page
    • Select: the results the report shows
    • Max results: the most rows the report holds
  • 8.0 Write data to a Google Sheet
    • Spreadsheet: your sheet
    • Sheet name: the tab to fill
    • DATA: [report]
    • Write options: Add to existing data

Common questions about setting a report's date range


Why does the report ignore the date the bot typed?

The date is in a format the field does not accept. Type a date into the field by hand, note the format the web app shows, and choose the same one in Select format on the Date and time step. A field that only reacts to a key press may also need a Press key(s) step with Enter after the date.

Why is the report's date range one day out?

The run's timezone differs from the web app's. Set the timezone in the automation's settings to match, and schedule the run away from midnight.

How do I set the date range when the report uses a calendar picker?

Use the Date picker step for a picker that shows the current month with left and right buttons and a calendar of days. For any other picker, ask the agent, which writes a Write javascript step for it. See fill a date picker in a Google Form for a worked example.

Why does the bot scrape the old results, not the new date range?

The scrape ran before the report had refreshed. Add a Wait step between the click that applies the dates and the scrape, or ask the agent to add one. For a report with many rows or several pages, see scrape a report table into a Google Sheet every day.

How do I set the date range to last month?

On the Date and time step choose Custom, then Last day of previous month for the To date. First day of this month gives the start of a month-to-date report.

How do I pick a preset range such as Last 7 days?

When the web app offers presets, clicking one is simpler than typing dates. Replace the date steps with a Click element step on the range menu and another on the preset, or a Select list step for a dropdown.

Can I put the date in the report's file name?

Yes. Insert the date token into File name on the download step, with a date format that uses hyphens. See download a report from a website to Google Drive on a schedule.

Can I take the dates from a Google Sheet instead?

Yes. Read the dates with Read data from a Google Sheet and insert the cells into the Enter text steps. The Date and time step's Reformat existing option converts a date from the sheet into the format the field takes.

Can I set a report's date range without code?

Yes. The automation is built from the five lines above with no code; the dates are options on the Date and time step.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides