n8n

How to Automate OpenAI Web Research Summaries?

Turn a chat request into clean page content you can use right away. A user sends a message, the assistant fetches the web page, removes noise, and returns compact Markdown. This is great for content teams who need fast research, SEO audits, or competitive reviews without copy and paste work.

Here is how it runs. A chat event starts the flow and an AI Agent with an OpenAI model decides how to call a web fetch tool. The tool expects a query string with url and method set to full or simplified. The query is parsed and a page length limit is applied. The page is requested and errors are checked. The body is extracted, heavy tags and scripts are removed, and links or image sources can be replaced with NOURL and NOIMG when simplified. The cleaned HTML is converted to Markdown and returned. A second trigger lets other workflows call the same fetch steps for reuse.

Setup needs an OpenAI API key and access to the n8n chat interface. Decide your default page max limit and use method simplified to save tokens for most cases. Expect less manual work and lower token spend due to shorter Markdown and removed links. Use this for content briefs, quick page scans, or research tasks where links are not required.

What are the key features?

  • Chat event trigger receives the user message and starts the flow
  • AI Agent with OpenAI model selects full or simplified fetch method
  • Tool expects a query string with url and method and guides the agent
  • Query string is parsed into JSON and a max length limit is applied
  • HTTP Request fetches the page and avoids hard errors for safer runs
  • Error branch returns a clear fix if the query is invalid or the site fails
  • HTML body is extracted and unwanted tags and comments are removed
  • Simplified mode replaces all links and image sources to shorten content
  • HTML is converted to Markdown for compact and readable output
  • Reusable trigger lets other workflows call the same page processing

What are the benefits?

  • Reduce manual copy and paste from 20 minutes to 2 minutes per page
  • Cut token usage by up to 20 percent with link and image removal
  • Improve research accuracy by stripping scripts and noisy elements
  • Handle long pages safely with a strict content size limit
  • Reuse the same fetch logic across chat and other workflows

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Open the OpenAI Chat Model node, choose Credential to connect with, click Create new credential, then follow the on screen steps. In your OpenAI account, create an API key from the API section and paste it into n8n. Name the credential clearly, for example OpenAI Main.
  4. Open the When chat message received node and note the webhook path or chat endpoint. Ensure your n8n instance chat feature is active so you can send messages to start runs.
  5. Open the AI Agent node and confirm the tool named HTTP_Request_Tool is enabled. The agent will send a query like ?url=YOURURL&method=simplified or full.
  6. Open the QUERY_PARAMS and CONFIG nodes. Keep the max limit value or change it to match your token budget. Higher limits allow longer pages but can cost more tokens.
  7. Test a simple run. In chat, send a request with a valid query string such as ?url=https://example.com&method=simplified. Confirm you receive Markdown text.
  8. Test error handling. Send a message without a url parameter or with a bad link. Check that you get a helpful instruction and not a failed workflow.
  9. If some sites fail due to certificates, the HTTP Request node already allows unauthorized certs. If pages return no body, try another URL or confirm the site loads in a browser.
  10. To reuse the page processing from other automations, call the When Executed by Another Workflow trigger and pass the same query property into it.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.