n8n

How to Generate Gmail HN Learning Recommendations?

Turn learning requests into a helpful email that people actually open. A simple form collects a topic and an email address, then a curated list of Hacker News tips arrives in the inbox. Great for lead magnets, onboarding, or weekly learning notes.

It starts with an n8n form that asks what the person wants to learn. The flow searches Hacker News Ask HN posts with that keyword, splits the comment IDs, and pulls each comment from the public API. All comment text is merged, then a Google Gemini model reads it and writes a clear list of resources in markdown. The markdown is turned into HTML and sent through Gmail with a subject that uses the topic.

You will need a Google Gemini API key and a Gmail SMTP app password. Expect minutes of setup and big time saved on research each request, since up to 150 posts and many comments are scanned for you. Ideal for newsletters, bootcamps, and communities that want fast, targeted learning links.

What are the key features?

  • Web form trigger collects the learning topic and email address.
  • Hacker News search filters to Ask HN with the submitted keyword and a limit of 150.
  • Splits child comment IDs and fetches each comment from the public API.
  • Combines all comment text into one block for easier analysis.
  • Google Gemini 1.5 Flash creates concise learning recommendations.
  • Converts markdown output to HTML for a clean email layout.
  • Dynamic subject and body that use the exact topic the user sent.
  • Sends the message through Gmail SMTP from your chosen address.

What are the benefits?

  • Reduce manual research from 2 hours to 5 minutes per topic
  • Automate up to 90 percent of curation work with AI summarization
  • Handle up to 150 Ask HN posts and hundreds of comments in one run
  • Connect Google Gemini, Hacker News, and Gmail in one flow
  • Send clean HTML emails that people can read on any device
  • Personalize subjects with the requested topic to boost opens
  • Show how many comments were analyzed to build trust

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 Google Gemini, Gmail and Hacker News. See the Tools Required section above for links to create accounts with these services.
  3. Open the GetTopicFromToLearn node and confirm the path is learn. Click Execute workflow then open the Test URL to view the form. Submit a sample topic and email to verify the form works.
  4. Set up Google Gemini credentials: double click the Google Gemini Chat Model node, choose Credential to connect with, click Create new credential, then follow the on screen steps. Use an API Key from your Google AI Studio account and save.
  5. Set up Gmail SMTP: double click the SendEmailWithTopResources node, choose Credential to connect with, click Create new credential, pick SMTP, and enter smtp.gmail.com on port 587 with TLS. Use your full Gmail address as the username and an app password as the password, then save.
  6. Configure the SearchAskHN node: keep the ask_hn tag and make sure the keyword points to the form field for I want to learn. Adjust the limit from 150 if you want fewer or more results.
  7. Check the SplitOutChildrenIDs node and confirm it splits the children field. If some posts have no comments, you may see no items going forward, which is normal for those posts.
  8. Open the FindHNComments node and verify the URL uses the child ID. Run a test and confirm you get 200 responses with comment text in the output.
  9. Review the CombineIntoSingleText node and confirm it aggregates the text field. The output should show one long text value.
  10. Open the Basic LLM Chain node and confirm the prompt includes the submitted topic and the combined comments. Link it to the Google Gemini Chat Model and run a test to see a markdown list of recommendations.
  11. Check the Convert2HTML node and confirm the markdown is converted to HTML. Verify the HTML appears under the data field in the output.
  12. Finish the email mapping: in SendEmailWithTopResources, set To to the form email, keep the subject using the topic, and ensure the HTML body uses the data from the Convert2HTML node. Send a test email to your inbox.
  13. Activate the workflow and share the form link. Submit a few topics to confirm the email shows the comment count and the curated list.
  14. Troubleshooting: if Gmail blocks sign in, use an app password. If the email is empty, switch the HTML mapping to the html field from Convert2HTML. If no results appear, try removing the ask_hn tag or broaden the keyword.

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.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Hacker News

Sign up

Free: $0 / mo, public read-only API (no auth, no stated rate limit)

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.