Back to all templates

Generate a daily quote or joke with OpenAI and email it

Use AI to generate a daily quote with context on weekdays and a joke on weekends, then email it.

Description:

This workflow prompts OpenAI for an inspirational quote on weekdays and a joke on the weekends. The quote is enriched with some context. Afterwards, the joke or the quote is sent via email.

Key Features:
  • Daily schedule trigger at 08:00 London time
  • Weekend detection using the dateHelper component
  • Condition-based branching: AI joke on weekends, AI quote on weekdays
  • OpenAI gpt-4o-mini generates structured JSON responses via a response schema
  • Weekday quotes enriched with historical context and usage
  • Gmail email delivery with dynamic subject and body from AI response
Prerequisites:
  • OpenAI API key
  • Google Mail (Gmail) connection
Ideal For:

Anyone who wants a daily AI-generated email: a contextual inspirational quote during the week and a fresh joke on weekends.

STEPS
  1. Trigger: the workflow fires every day at 08:00 Europe/London.
  2. Check if it's the weekend using the dateHelper isWeekend component with the trigger timestamp.
  3. Condition branches on the result: TRUE path for weekends, FALSE path for weekdays.
  4. Weekend (TRUE): prompt OpenAI for a joke in JSON format (setup + punchline), then send it as an email with the setup as subject and punchline as body.
  5. Weekday (FALSE): prompt OpenAI for a quote in JSON format (author + quote + context), then send it as an email with the author as subject and the quote plus context as body.
COMPONENTS
Schedule
Date Helper
Open Ai
CATEGORYAI

MoreAITemplates

Delegate questions to a remote agent over A2A from a tech lead agent

A chat agent that helps a team plan upgrades. For questions about Java or Spring versions, release dates or features, it delegates to a remote agent over the Agent2Agent protocol with the A2A Agent Tool, then combines the answer with its own advice. Built to call the Java release expert template, but works with any A2A agent.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Serve a Java release expert agent to other agents over A2A

An AI agent that answers questions about Java and Spring release history: versions, release dates, headline features and migration notes. The workflow starts from a workflow call, so you can add it to a ByteChef A2A Server and other agents can delegate questions to it over the Agent2Agent protocol. Pair it with the Tech lead agent template.

TRIGGER:
New Workflow Call
COMPONENTS:

Classify Gmail emails with OpenAI and forward them to the right team

Polls Gmail for new emails and uses OpenAI to classify each one into a single department label (Sales, Support, Finance, Operations, HR, or URGENT). The matching Gmail label is applied, the department's recipient address is stored, and the original email is forwarded to the correct team.

TRIGGER:
New email
COMPONENTS:
+1

Plan a team offsite with an agent that asks before it plans

A chat agent with the Ask User Question tool. Before planning a team event, it asks three or four multiple-choice questions about budget, location, dates and activities. The run pauses until you answer in the chat, and then the agent writes a plan that fits your answers.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Keep long chats short with history compaction and recall search

A chat agent with session-based Chat Memory v2. A small turn window keeps only the last few turns in the prompt and archives older ones, while conversation search lets the agent look up anything said earlier in the full log. A Claude Haiku model is attached for the Recursive summarization strategy, if you switch to it.

TRIGGER:
New Chat Request
COMPONENTS:
+1

Score CVs from Google Forms with OpenAI and sort them in Google Drive

When a Google Forms response is submitted, downloads the attached CV PDF from Google Drive, extracts its text, and summarizes it with AI. OpenAI scores the candidate from 0 to 10 against a Senior Java Developer job description. The name, email, summary, and score are recorded in a Google Sheet, and the CV file is filed into a Rejected or Potential candidates Google Drive folder based on the score.

TRIGGER:
A Google Forms is filled
COMPONENTS:
+3

Answer questions with a code interpreter agent that runs Python in Daytona

An AI agent that answers questions needing exact calculations by writing Python and running it in an isolated Daytona sandbox. Each tool call gets a fresh sandbox that is deleted after the run.

TRIGGER:
Manual
COMPONENTS:
+2

Load a folder of Markdown files into Pinecone for RAG

Lists all files in a local documentation directory recursively, then loops over each file, reads its contents, and loads it into a Pinecone vector database as a Markdown document, building a searchable knowledge base for retrieval-augmented generation.

TRIGGER:
Manual
COMPONENTS:

Remember coding preferences across chats with long-term memory

A coding buddy for Java developers with the Auto Memory tool. When you state a lasting preference, such as your build tool or Java version, the agent saves it to memory, and in later conversations it reads its memory first and follows your preferences. Memory is kept per project deployment and environment, so it works in deployed runs only.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Turn commit messages into release notes with an agent skill

A chat agent with the Skills Tool. When you paste commit messages, it loads the release-notes skill, runs the skill's script to group conventional commits by type, and writes short, user-facing release notes with new features, fixes and performance changes. The skill's SKILL.md and script are in a note on the canvas, ready to upload.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Research and write answers with two subagents on different models

An orchestrator agent with the Task Tool and two subagents. A researcher subagent on Claude Haiku gathers facts as short bullets, and a writer subagent on Claude Sonnet turns them into a clear answer for Java developers. The orchestrator never answers research questions itself.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Plan a Spring Boot 4 migration with an agent that keeps a todo list

A chat agent with the TodoWrite tool. For any request with three or more steps, such as migrating a service to Spring Boot 4, it first writes a todo list, keeps exactly one task in progress, and updates the list as it works through each step.

TRIGGER:
New Chat Request
COMPONENTS:
+2

Triage support tickets offline with Qwen3 on Ollama

Classifies a support ticket with Qwen3 8B running locally in Ollama, so the ticket text never leaves your network. A JSON schema constrains the answer to a category (Billing, Technical or Sales), a priority (Low, Medium or High) and a one-sentence summary that later steps can route on.

TRIGGER:
Manual
COMPONENTS:
See all templates

How ByteChef works?

Focus on what matters,automate the rest.

Copyright © ByteChef. All rights reserved.