Footballers Books Generated by AI

Project Description
This project exemplifies what can be done with Artificial Intelligence and automations. With very few manual steps, up to 50 different books have been generated, using the same topic (Best footballers of the 21st century) with different combinations of countries and languages.
Technologies Involved
For this, n8n was used, designing a series of automated workflows that generate content and write the entire book. This was complemented by generating images for both the cover and the interior of the book, depicting both the footballers and different themes depending on the section.
This was combined with a Github repository where, using the paged.js library, the general structure of the book was designed.
N8N automations made several things possible:
- Automatically write to a Google Sheets the list of the 10 best players from each country, as well as the team where they developed their main career.
- Automatically identify the 3 best teams of the 21st century from each country, to include a section in the book about them.
- From that written data, generate content about the players, telling their career, their titles, their playing style, and their figure off the pitch.
- Generate content for the rest of the general sections (introduction, history of the country in football, its leagues, the national team, etc.).
- Generate images of the footballers with their team shirts, generating them in a similar style to provide homogeneity to the book.
- Once all the content is ready, insert it into the Github repository so that we have the HTML with which the book can be generated.
- After having the HTML ready, with N8N we create a Pull Request and there is a Github Actions workflow that runs Playwright to open the HTML, generate the PDF with the paged.js library, and commit the file.
- Finally, we have another workflow that takes all the branches and uploads the file to Drive, so that we have all the books available.