Automated Book Recommendations with n8n & Open Library
Why automate your book recommendations?
Imagine this: every Friday at 11:00 AM, a fresh book recommendation quietly lands in your inbox. No scrolling through endless lists, no decision fatigue, just a new title waiting for you. Sounds nice, right?
That is exactly what this n8n workflow template does. It connects to Open Library, grabs a random book from a subject you choose (by default, juvenile_literature), and emails you the details. You set it up once, then let the automation do the rest.
What this n8n workflow actually does
At a high level, the workflow:
- Runs on a schedule (every Friday at 11:00 AM) or whenever you trigger it manually
- Looks up how many books exist in a specific Open Library subject
- Checks if that subject has any books available
- Picks one random book from the list
- Collects both basic and detailed info about that book
- Formats the authors as clickable links to their Open Library profiles
- Sends you a nicely formatted HTML email with the full recommendation
So instead of hunting for something new to read, you just open your inbox and let the workflow surprise you.
When is this template useful?
This workflow is great if you:
- Love reading but hate deciding what to read next
- Want a fun, low-effort way to discover new titles
- Are building a reading habit and like getting a weekly “nudge”
- Curate books for kids or young readers and want random juvenile literature picks
- Enjoy experimenting with n8n and want a practical, easy-to-customize example
And yes, you can absolutely switch the subject to something else. The workflow is built so you can tweak the topic in seconds.
How the workflow flows: step-by-step overview
Let’s walk through the journey from “nothing running” to “book in your inbox”.
- The workflow is triggered (either manually or by a weekly schedule).
- The subject is set to
juvenile_literatureby default. - An HTTP request asks Open Library how many works exist for that subject.
- An IF check confirms that at least one book is available.
- If there are no books, you get an email saying nothing is available for that subject.
- If there are books, a random index is generated within the available range.
- Another HTTP request fetches basic info for the randomly selected book.
- A follow-up request retrieves detailed data like the description.
- The workflow merges and cleans up the data, including building the Open Library URL.
- A small function formats author names into HTML links.
- An HTML email is generated and sent to your configured email address.
Diving into the n8n nodes
1. Trigger nodes: manual and scheduled
The workflow starts with two trigger options:
- Manual Trigger – Lets you run the workflow instantly from n8n whenever you want a recommendation on demand.
- Cron Trigger – Schedules the workflow to run automatically every Friday at 11:00 AM. You can change the day and time to whatever fits your routine.
Use both if you like: automatic weekly picks plus the ability to grab an extra book whenever you feel like it.
2. Set Subject: choose what you want to read about
This node sets the subject that Open Library will use. In the template, it is statically set to juvenile_literature. That is perfect for children’s or young readers’ books.
If you want a different genre or topic, you simply replace that value with another Open Library subject key. The rest of the workflow keeps working the same way.
3. Retrieve Book Count from Open Library
Next, an HTTP Request node asks Open Library how many works exist for the chosen subject. It calls:
http://openlibrary.org/subjects/juvenile_literature.json?limit=0
The important part here is the metadata in the response, especially the work_count field. That tells n8n how many books it can randomly choose from.
4. Check Book Count: make sure there is something to recommend
An IF node checks whether work_count is greater than zero. There are two possible paths from here:
- If work_count is 0 – No books are available for that subject. The workflow sends you a quick email letting you know there are no titles to recommend.
- If work_count is greater than 0 – The workflow continues and picks a random book.
5. Select Random Book: pick a surprise
A Function node now comes into play. It generates a random index between 0 and the total number of works minus 1. That index is then used as an offset in the next HTTP request so that the workflow retrieves just one specific, random book from the subject list.
6. Retrieve Basic Book Info
Using the random offset, another HTTP Request node calls Open Library again to get the basic data for that one selected work. From this response, you get fields like:
- Book title
- Author keys
- Book key
This information is the foundation for the next, more detailed lookup.
7. Retrieve Detailed Book Info
Now that you have the book’s key, the workflow sends another HTTP request to Open Library to fetch more detailed information. This typically includes:
- Book description
- Additional metadata about the work
At this point, you have both the basic and detailed data needed to build a rich recommendation email.
8. Filtered Book Info: combine and clean up the data
This node merges the key details from the previous responses and prepares them for the email. It pulls together information like:
- Title
- Description
- Author data
- A direct URL to the book’s page on Open Library
The result is a clean, structured set of fields that are easy to drop into an HTML email template.
9. Create Author String: clickable author links
Here, a Function node takes the author data and turns each author into a clickable HTML anchor tag. Each name links to the author’s profile page on Open Library.
The output is a nicely formatted string of authors that looks good in the email and invites you to explore more of their work.
10. Send Book Email: your recommendation arrives
Finally, an Email node sends everything to your inbox. It uses HTML formatting to include:
- The book title
- Linked author names
- The book description
- A clickable link to view the book on Open Library
You can customize the subject line, body text, and recipient email address to match your style or share recommendations with others.
Why this n8n workflow makes life easier
- Save time – No more endless browsing. A curated random pick just appears in your inbox.
- Discover more variety – Because the book is chosen at random, you are more likely to stumble across titles you would never have searched for.
- Easy customization – Change a single subject parameter to switch genres or topics. The automation logic stays the same.
- Flexible scheduling – Run it weekly, daily, or only when you feel like it. Just adjust the Cron trigger or use the manual trigger.
What you need to get started
To run this template, you only need a few basics in place:
- An active n8n instance
- SMTP credentials configured in n8n so emails can be sent
- Your email address set in the Send Email node
Once that is done, you can import the template, update the subject if you want a different genre, tweak the schedule, and you are ready to go.
Wrapping up
This workflow is a simple but powerful example of what you can do when you combine n8n’s automation with Open Library’s huge catalog. With just a few nodes, you turn a small weekly task into something that runs quietly in the background and keeps your reading list fresh.
Once you are comfortable with it, you can:
- Swap in different subjects to explore new genres
- Send recommendations to friends or family
- Use the same pattern to automate discovery for other types of content
Try it out and make it your own
Give this workflow a spin and see how it fits into your reading routine. Start with the default juvenile_literature subject, then experiment with others. Adjust the schedule, refine the email design, or plug it into a broader content discovery system.
If you enjoy this kind of automation, keep an eye on our blog for more n8n workflow ideas and templates. And once you have customized it, share what you built so others can get inspired too.
