{
  "id": "d3aiJQj0DRvPeier",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Daily Bible Verse Email",
  "tags": [],
  "nodes": [
    {
      "id": "0af49282-0a6b-4cdf-b618-5e711a068dc7",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "505d2e09-e19a-4ff5-a6d1-c8c1548df62f",
      "name": "Config - recipient",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b089b2ad-865b-43ab-85a7-af6bed862964",
              "name": "send_to_email",
              "type": "string",
              "value": "user@example.com"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "44ba560a-2f19-41a1-a912-606d56bbedf3",
      "name": "Bible API - Get random verse",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        0
      ],
      "parameters": {
        "url": "https://bible-api.com/?random=verse",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "63af5390-ffe4-44c6-afcc-a63035059b3e",
      "name": "Write a daily devotional email",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        672,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "models/gemini-2.5-flash"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Create an inspirational daily devotional email message with the following Bible verse: {{ $json.verses[0].text }}\n\nFormat the email professionally, as follows: 1. A warm greeting 2. The Bible verse with its reference 3. A short, encouraging reflection (2-3 sentences) 4. A closing blessing for the day\n\nKeep the tone uplifting and inspirational. Do not include the subject line, just start from the salutation."
            }
          ]
        }
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5e53bc14-6373-4e71-ae93-048d30c85814",
      "name": "Email - Send daily verse",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        0
      ],
      "parameters": {
        "sendTo": "={{ $('Config - recipient').item.json.send_to_email }}",
        "message": "={{ $json.content.parts[0].text }}",
        "options": {},
        "subject": "=Daily Bible Verse: Inspiration for Today ({{ $('Bible API - Get random verse').item.json.reference }})"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "28e930d9-b9ad-463f-8509-d37a60e191b4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -256
      ],
      "parameters": {
        "width": 416,
        "height": 608,
        "content": "## Overview \nThis is an automation that will automatically send you a random Bible verse every morning at 7:00a, along with some reflections on that verse (generated by Google Gemini). Start your day off grounded and faithful.\n\nThis automation uses bible-api.com. Visit the site for more information on the API and the available endpoints.\n\n### Required setup\n- Config - recipient\n  - `send_to_email` - where the email will be sent\n- Credentials\n  - **Google Gemini(PaLM) Api** - for formatting the email and generating reflections on the verse\n  - **Gmail OAuth2 API** - for sending the email\n\n### How to customize\n- Change the send time in the Schedule Trigger node\n- Change the Bible translation, or specify Old vs. New Testament in the Bible API node\n- Adjust the prompt in the Gemini node to change the email content\n- Modify the subject line in the Gmail node"
      },
      "typeVersion": 1
    },
    {
      "id": "85d00be7-7237-4f27-9d02-dc0fd5a273da",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 416,
        "content": "### Optional: Customize time trigger \nIf you want the email to send at a different time of day, you can change the send time in this node."
      },
      "typeVersion": 1
    },
    {
      "id": "0974e195-1f74-4ad2-9602-78b102e0f283",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 416,
        "content": "### Required: Set recipient \nIn the `send_to_email` field, replace 'example@example.com' with your own email address (or whoever you want to be the recipient)"
      },
      "typeVersion": 1
    },
    {
      "id": "8a353419-3c5a-4822-b088-131293741636",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 416,
        "content": "### Optional: Customize bible-api request \nIf you want the email to a random verse from specific books or specific translations, change the parameters here.\n\nCheck https://bible-api.com/ for reference"
      },
      "typeVersion": 1
    },
    {
      "id": "06ce0403-3248-47b9-80c0-51696d690dc5",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 416,
        "content": "### Optional: Customize Gemini prompt \nThis node generates the body text for the email, using the retrieved Bible verse as input. Feel free to adjust the prompt to change the output."
      },
      "typeVersion": 1
    },
    {
      "id": "9c7ededc-d9a4-488f-a156-7b50d4d0de69",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 416,
        "content": "### Optional: Customize Email \nThis node sends the email to the email address specified in the Config - recipient node. You can change the subject line here if desired."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "33b2319b-367a-4080-a910-1e9a3b726675",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Config - recipient",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config - recipient": {
      "main": [
        [
          {
            "node": "Bible API - Get random verse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bible API - Get random verse": {
      "main": [
        [
          {
            "node": "Write a daily devotional email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write a daily devotional email": {
      "main": [
        [
          {
            "node": "Email - Send daily verse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}