Building an Automated Story Generation and Kindle Delivery System with Make.com

Sometimes you need to automate things which may be very helpful for your family. If they like to read stories and use Kindle – automation may be a gamechanger. Own stories delivered every day or week, directly to Kindle. Just spend some time (AI can assist) to create a list of stories and main idea/format about what you want to achieve. AI and automation can do the rest.

This solution isn’t limited to children’s stories – it can also deliver newsletters, blog posts, or tutorials for your coworkers or subscribers. The core concept remains the same: automated content generation and delivery to your preferred reading device.

As a software engineer, I’ve created an elegant solution for automating the creation and delivery of children’s stories directly to Kindle devices. This system leverages several key technologies including Make.com, Google Drive, Perplexity AI, and Amazon SES to create a seamless pipeline from story concept to delivery.

This article provides a comprehensive breakdown of the system architecture, implementation details, and configuration requirements for professionals looking to implement similar automation workflows.

System Architecture Overview

The solution follows a logical flow that transforms story ideas into formatted ebooks delivered directly to Kindle devices:

  1. Story Idea Source: Google Sheets serves as the content management system for story ideas and tracking
  2. Content Generation: Perplexity AI generates complete stories based on predefined contexts and prompts
  3. Content Processing: JSON parsing and text manipulation to prepare the content
  4. Content Storage: WordPress (optional) and Google Drive for persistence and conversion
  5. Delivery: Amazon SES for reliable email delivery to Kindle devices

The Make.com blueprint orchestrates these components into a cohesive workflow that requires minimal human intervention once configured.

Detailed Implementation

1. Story Source Management

The blueprint begins by accessing a Google Sheet containing story ideas. The implementation uses two utility modules to dynamically select rows and cells based on week number (I started in week 20, this is why -19, to use row 1 from a spreadsheet)


"value": "{{toString(sum(parseNumber(formatDate(now; \"\"\"WW\"\"\")); -19))}}"

This approach uses the current week number to determine which story idea to process, enabling automatic progression through your content calendar. The system then:

  1. Creates a variable for the row number
  2. Formats it into a cell reference (e.g., “A1”)
  3. Retrieves the content from that cell in Google Sheets

This provides the story topic that will be fed to the AI model.

2. AI-Powered Content Generation

The Perplexity AI integration is the creative engine of the system. The blueprint shows a prompt engineering approach:

"messages": [
{
"content": "Create a children's story (about 5 minutes of reading, 1200 words) about four animal detectives from the jungle...",
"role": "system"
},
{
"content": "Create a story about animal detectives. Give it a short title and content. Today's topic is {{`68`}}",
"role": "user"
}
]

The system message provides detailed context about the recurring characters (Animals Detecties: Lion Kuba, Desert Mouse Patrycja, Giraffe Zofia, and Anteater Alfred), their characteristics, and the story structure. The user message then incorporates the dynamic topic retrieved from Google Sheets.

The AI response is configured to return a structured JSON object containing:

  • Title
  • Content (story body)
  • Description (for social media)

3. Content Processing

After generation, the content undergoes processing to ensure proper formatting:

  1. A regex module extracts the JSON from the AI response
  2. The JSON parser converts the text into structured data
  3. The content is now available as separate fields (title, content, description)

This separation enables different handling of each component in subsequent steps.

4. Content Storage and Conversion

The blueprint implements two parallel paths for content storage:

WordPress Publishing (Optional)

javascript"module": "wordpress:createPost",
"mapper": {
  "title": "{{3.title}}",
  "content": "{{3.content}}",
  "status": "private",
  "categories": [31]
}

This creates a private post in WordPress, categorizing it appropriately. The post URL is later stored back in the Google Sheet for reference.

Google Drive Document Creation

javascript"module": "google-drive:createAFileFromText",
"mapper": {
  "name": "{{3.title}}",
  "content": "{{3.content}}",
  "convert": true
}

This creates a Google Doc from the story text. The convert: true parameter is crucial as it ensures the text is saved as an actual Google Document rather than a plain text file.

The next step retrieves the file with format conversion:

javascript"module": "google-drive:getAFile",
"mapper": {
  "formatDocuments": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  "file": "{{72.id}}"
}

This converts the Google Doc to DOCX format, which is compatible with Kindle devices. The conversion happens on Google’s servers, leveraging their document processing capabilities.

5. Email Delivery to Kindle

The final step uses Amazon SES to send the document to Kindle email addresses:

"module": "email:ActionSendEmail",
"version": 7,
"parameters": {
"account": TODO_SES_ACCOUNT_ID,
"saveAfterSent": false
},
"mapper": {
"subject": "{{3.title}}",
"contentType": "text",
"attachments": [
{
"fileName": "{{73.name}}",
"data": "{{73.data}}",
"cid": ""
}
],

The email includes the story title as the subject and attaches the DOCX file. Amazon’s Kindle service will process this email and deliver the document to the associated Kindle devices.

6. Workflow Completion

After successful delivery, the system updates the Google Sheet with the story title, description, and WordPress link (if applicable), creating a complete record of generated content.

Prerequisites and Configuration

Amazon SES Configuration

  1. Create an AWS Account: If you don’t have one, sign up at aws.amazon.com
  2. Set Up Amazon SES:
    • Navigate to the SES console
    • Verify your email domain or individual email addresses
    • If your account is in the sandbox, request production access
  3. Create API Credentials:
    • Go to IAM > Users > Create New User
    • Attach the “AmazonSESFullAccess” policy
    • Generate and securely store the Access Key ID and Secret Access Key
  4. Configure in Make.com:
    • Add the Amazon SES module
    • Enter your Access Key ID and Secret Access Key
    • Select your AWS region

Google Drive API Configuration

  1. Create a Google Cloud Project:
    • Go to console.cloud.google.com
    • Create a new project
  2. Enable Required APIs:
    • Google Drive API
    • Google Sheets API
  3. Configure OAuth Consent Screen:
    • Set app name and user support email
    • Add authorized domains: make.com and integromat.com
    • Add all required scopes (Drive, Sheets)
  4. Create OAuth Credentials:
    • Create OAuth client ID for Web application
    • Add authorized redirect URIs: texthttps://www.make.com/oauth/cb/oauth2 https://www.make.com/oauth/cb/google https://www.make.com/oauth/cb/google-custom https://www.make.com/oauth/cb/google-restricted
  5. Publish Your App:
    • Set to “Production” to avoid credential expiration issues
    • This doesn’t require verification as it’s for personal use
  6. Configure in Make.com:
    • Create a new Google connection
    • Enter your Client ID and Client Secret
    • Authorize the connection

Perplexity AI Configuration

  1. Obtain API Key:
    • Sign up for Perplexity API access
    • Generate an API key from your account dashboard
  2. Configure in Make.com:
    • Add the Perplexity AI module
    • Enter your API key
    • Select the appropriate model (sonar-pro recommended for creative tasks)

Implementation Considerations

Error Handling

The blueprint doesn’t include explicit error handling. In a production environment, consider adding:

  1. Error notification emails
  2. Retry mechanisms for API failures
  3. Logging of successful and failed operations

Security Considerations

  1. API Keys: Store all API keys securely within Make.com
  2. Content Safety: Consider implementing content filtering if generating stories for children
  3. Access Control: Limit access to the Google Sheet to authorized personnel

Scaling Considerations

  1. Rate Limits: Be aware of API rate limits, especially for Perplexity AI and Amazon SES
  2. Costs: Monitor API usage costs, particularly for AI generation
  3. Content Volume: Consider batch processing for high-volume story generation

GitHub Repository

The complete blueprint is available on GitHub at https://github.com/plusz/LLM_to_kindle

The repository includes:

  1. The Make.com blueprint JSON file
  2. Sample Google Sheet templates (import csv into google drive)

Conclusion

This automated story generation and delivery system demonstrates the power of modern automation tools and AI services for content creation workflows. By combining Make.com’s orchestration capabilities with AI-generated content and cloud services, you’ve created a scalable solution that can deliver fresh, engaging stories to young readers on a regular schedule.

The modular design allows for easy extension or modification to support different content types, delivery methods, or AI providers. With minimal maintenance, this system can continue to produce and deliver content indefinitely, making it an excellent solution for educational purposes, content marketing, or personal projects.