Skip to content

HeartThanakorn/n8n-daily-email-quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

n8n Daily Email Quotes

Workflow Diagram

An n8n workflow automation that fetches random inspirational quotes and delivers them to your email inbox daily.

πŸ€– About n8n

This workflow is built for n8n - a fair-code licensed workflow automation tool. n8n allows you to connect different services and automate repetitive tasks with a visual workflow editor.

Overview

This workflow consists of three main components:

  1. Manual Trigger - Starts the workflow execution
  2. HTTP Request - Fetches a random quote from ZenQuotes API
  3. Gmail Node - Sends the quote via email

Features

  • πŸ“§ Automatic email delivery of daily quotes
  • 🌐 Uses ZenQuotes.io free API for inspirational quotes
  • ⚑ Simple manual trigger or can be scheduled
  • 🎯 Customizable email content and recipients

Setup Instructions

1. Prerequisites

  • n8n installation (self-hosted or cloud)
  • Gmail account with OAuth2 credentials set up in n8n

2. Import n8n Workflow

  1. Copy the contents of daily-quotes-workflow.json
  2. In your n8n interface, go to Workflows > Import from File
  3. Paste the JSON content or upload the file

3. Configure Gmail Credentials

  1. Go to Credentials in your n8n instance
  2. Create a new Gmail OAuth2 credential
  3. Follow the authentication process with your Google account
  4. Update the credential ID in the "Send a message" node

4. Customize Settings

  • Email Recipient: Change your-email@example.com to your desired email address
  • Subject Line: Modify the email subject if needed
  • Message Content: Customize the email template in the Gmail node

Usage

Manual Execution

  1. Open the workflow in n8n
  2. Click the "Execute Workflow" button
  3. The workflow will fetch a quote and send it to the configured email

Automated Scheduling

To run this workflow daily:

  1. Replace the Manual Trigger with a Cron node
  2. Set the cron expression for daily execution (e.g., 0 9 * * * for 9 AM daily)
  3. Save and activate the workflow

API Information

This workflow uses the ZenQuotes.io API:

  • Endpoint: http://zenquotes.io/api/random
  • Method: GET
  • Rate Limit: Free tier allows reasonable usage
  • Response: Returns a random inspirational quote

Troubleshooting

Common Issues

Gmail Authentication Error

  • Ensure OAuth2 credentials are properly configured
  • Check if Gmail API is enabled in Google Cloud Console
  • Verify the credential ID matches in the workflow

Quote Not Displaying

  • Check if the API response structure matches the expected format
  • The current setup expects the quote in {{ $json.h }} field
  • You may need to adjust the message template based on API response

Workflow Not Triggering

  • Verify the workflow is activated
  • Check cron expression if using scheduled trigger
  • Review execution history for error details

Customization Ideas

  • 🎨 Add HTML formatting to emails
  • πŸ“Š Store quotes in a database for history
  • πŸ”„ Add fallback quote sources
  • πŸ“± Send quotes via other channels (Slack, Discord, etc.)
  • 🎯 Filter quotes by category or author
  • πŸ“… Send different quote types for different days

Contributing

Feel free to fork this workflow and submit improvements! Some ideas for contributions:

  • Better error handling
  • Multiple quote sources
  • Email template improvements
  • Additional notification channels

License

This workflow is provided as-is for educational and personal use. Please respect the terms of service of the ZenQuotes.io API.


Note: Remember to keep your credentials secure and never commit them to version control. The provided JSON file has placeholder values for security.

About

"πŸ€– n8n workflow that automatically sends daily inspirational quotes to your email using ZenQuotes API and Gmail integration"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors