1. Receive URL and scraping options.
2. Initiate Firecrawl with the URL and options.
3. Firecrawl scrapes the webpage, handling JS rendering if needed.
4. Content is extracted and formatted based on specified options (markdown, JSON, etc.).
5. If a query is provided, it's answered based on the scraped content.
6. Save the scraped content to the output file or return the answer to the query.