Skip to content

Step 6: Deploy

Deploy your workflow to run automatically on a schedule.

Goal

Run your meal planner every Sunday evening to plan the week ahead.

The Workflow

The final recipe.yaml:

# yaml-language-server: $schema=../../schemas/workflow.schema.json
# Note: Triggers are configured via CLI, not inline in workflow files.
# Run: conductor triggers add --workflow weekly-meal-planner --cron "0 18 * * 0"
name: weekly-meal-planner
description: Weekly meal planner designed for remote deployment
# This example demonstrates:
# - Loop steps with LLM refinement
# - Saving formatted content to Notion using markdown
# - upsert_page with markdown for formatted display
inputs:
- name: pantry_file
type: string
default: "pantry.txt"
description: Path to pantry inventory file
- name: diet
type: string
default: "balanced"
description: Dietary preference
- name: notion_page_id
type: string
description: Notion page ID where meal plans will be saved
pattern: "^[a-f0-9]{32}$"
steps:
- id: read_pantry
name: Read Pantry Inventory
file.read: "{{.inputs.pantry_file}}"
- id: refine_plan
name: Generate and Refine Plan
type: loop
max_iterations: 3
until: "steps.check.passes == true"
steps:
- id: generate
name: Generate Plan
type: llm
model: strategic
output_schema:
type: object
properties:
monday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
tuesday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
wednesday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
thursday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
friday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
saturday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
sunday:
type: object
properties:
breakfast: { type: string }
lunch: { type: string }
dinner: { type: string }
prompt: |
Available ingredients:
{{.steps.read_pantry.content}}
{{if gt .loop.iteration 0}}
Previous attempt feedback:
{{.steps.check.feedback}}
Improve the plan based on this feedback.
{{else}}
Generate a {{.inputs.diet}} meal plan for Monday through Sunday.
{{end}}
For each day, create breakfast, lunch, and dinner.
Don't repeat main proteins on consecutive days.
- id: check
name: Check Variety
type: llm
model: fast
output_schema:
type: object
properties:
passes:
type: boolean
feedback:
type: string
prompt: |
Review this meal plan for variety:
{{.steps.generate.output | toJSON}}
Check:
1. No main protein repeated on consecutive days
2. Breakfast items vary throughout the week
Return {"passes": true} if requirements are met.
Otherwise return {"passes": false, "feedback": "specific issues"}.
# Save the meal plan as a formatted Notion page using markdown
# The upsert_page operation replaces content if the page exists
- id: save_plan
name: Save to Notion
notion.upsert_page:
parent_id: "{{.inputs.notion_page_id}}"
title: "Weekly Meal Plan"
markdown: |
# Weekly Meal Plan
Generated on {{.meta.started_at | formatTime "January 2, 2006"}}
---
## Monday
- **Breakfast:** {{.steps.refine_plan.generate.output.monday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.monday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.monday.dinner}}
## Tuesday
- **Breakfast:** {{.steps.refine_plan.generate.output.tuesday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.tuesday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.tuesday.dinner}}
## Wednesday
- **Breakfast:** {{.steps.refine_plan.generate.output.wednesday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.wednesday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.wednesday.dinner}}
## Thursday
- **Breakfast:** {{.steps.refine_plan.generate.output.thursday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.thursday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.thursday.dinner}}
## Friday
- **Breakfast:** {{.steps.refine_plan.generate.output.friday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.friday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.friday.dinner}}
## Saturday
- **Breakfast:** {{.steps.refine_plan.generate.output.saturday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.saturday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.saturday.dinner}}
## Sunday
- **Breakfast:** {{.steps.refine_plan.generate.output.sunday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.sunday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.sunday.dinner}}
outputs:
- name: notion_url
type: string
value: "{{.steps.save_plan.url}}"
description: Link to the weekly meal plan page

Key Concepts

Loop Refinement

Use loops with LLM feedback to improve outputs:

- id: refine_plan
type: loop
max_iterations: 3
until: "steps.check.passes == true"
steps:
- id: generate
type: llm
prompt: |
{{if gt .loop.iteration 0}}
Previous feedback: {{.steps.check.feedback}}
{{end}}
Generate a meal plan...
- id: check
type: llm
output_schema:
type: object
properties:
passes: { type: boolean }
feedback: { type: string }
prompt: Review this plan...

Formatted Output with Markdown

Save formatted content to Notion using markdown with template loops:

notion.upsert_page:
parent_id: "{{.inputs.notion_page_id}}"
title: "Weekly Meal Plan"
markdown: |
# Weekly Meal Plan
## Monday
- **Breakfast:** {{.steps.refine_plan.generate.output.monday.breakfast}}
- **Lunch:** {{.steps.refine_plan.generate.output.monday.lunch}}
- **Dinner:** {{.steps.refine_plan.generate.output.monday.dinner}}

Add a Schedule Trigger

Triggers are configured via the CLI:

Terminal window
# Run every Sunday at 6pm
conductor triggers add \
--workflow weekly-meal-planner \
--cron "0 18 * * 0"

Deploy to a Remote Server

You can deploy Conductor to any remote server. exe.dev provides a simple deployment option:

Terminal window
# Deploy your workflow
exe deploy recipe.yaml
# Set secrets
exe secrets set NOTION_TOKEN="your-token"
exe secrets set notion_page_id="your-page-id"

Or deploy to any server with SSH access:

Terminal window
scp recipe.yaml server:/path/to/workflows/
ssh server "conductor triggers add --workflow weekly-meal-planner --cron '0 18 * * 0'"

What You Learned

  • Loops - Refine outputs with LLM feedback loops
  • Triggers - Schedule workflows with cron expressions
  • Markdown output - Format content for Notion using markdown templates
  • Remote deployment - Run workflows on servers or cloud platforms

Tutorial Complete

You’ve built a complete meal planning workflow that:

  1. Reads ingredients from a file
  2. Generates recipes using an LLM
  3. Refines output with quality checks
  4. Saves formatted results to Notion using markdown
  5. Runs automatically on a schedule

Explore the Features section for more capabilities.