Quick overview
This workflow collects a research request via an n8n form, runs two live Google searches via the Serper API, uses OpenAI to analyze the sources and write a structured report, then logs the request to Google Sheets and emails the finished report via Gmail.
How it works
- Receives a research request from an n8n form with the topic, target audience, report goal, and optional focus.
- Queries Google Search through the Serper API twice (one broad topic search and one “expert insights/data” search) to gather recent sources.
- Merges, deduplicates, and formats the top results into a numbered source list for downstream analysis and citation.
- Uses OpenAI to extract structured research intelligence (key findings, data points, expert positions, credibility notes, gaps, contradictions, and a confidence score) from the compiled sources.
- Uses OpenAI again to write a multi-section professional research report tailored to the requested audience and goal.
- Formats the report into an email, appends a new row to a Google Sheets “Research Log” tab, and sends the report to the configured recipient using Gmail.
Setup
- Create a Serper (serper.dev) API key and enter it, along with your recipient email, sender name, and Google Sheet ID, in the workflow’s configuration step.
- Add an OpenAI API credential and connect it to both OpenAI chat model steps.
- Add Google Sheets OAuth2 credentials, create a spreadsheet tab named “Research Log” with the expected headers, and select the correct spreadsheet in the Google Sheets append step.
- Add Gmail OAuth2 credentials and set up the Gmail node to send from your desired mailbox.
- Share the form URL generated by the form trigger so users can submit research requests.