Skip to content

Building Custom Workflows

Learn how to create custom workflows that match your specific content processing needs.

Use the build command to generate workflows from natural language:

Terminal window
looplia build "analyze podcast transcripts and create newsletter content"

The AI will:

  1. Discover available skills
  2. Match your requirements
  3. Generate a valid workflow

See build command for details.

  1. Create the workflow file

    Terminal window
    # Create a new workflow
    cat > ~/.looplia/workflows/podcast-summary.md << 'EOF'
    ---
    name: podcast-summary
    version: 1.0.0
    description: Summarize podcast transcripts into shareable content
    steps:
    - id: analyze
    skill: media-reviewer
    mission: |
    Analyze the podcast transcript to extract:
    - Main topics discussed
    - Key quotes from speakers (with attribution)
    - Actionable takeaways for listeners
    input: ${{ sandbox }}/inputs/content.md
    output: ${{ sandbox }}/outputs/analysis.json
    - id: shareable
    skill: writing-kit-assembler
    mission: |
    Create shareable content from the analysis:
    - 3 tweet-sized quotes (under 280 chars)
    - LinkedIn post summary (100-200 words)
    - Newsletter blurb (50-100 words)
    needs: [analyze]
    input: ${{ steps.analyze.output }}
    output: ${{ sandbox }}/outputs/shareable.json
    final: true
    ---
    # Podcast Summary Workflow
    Transforms podcast transcripts into shareable social content.
    ## Usage
    \`\`\`bash
    looplia run podcast-summary --file transcript.md
    \`\`\`
    EOF
  2. Test the workflow

    Terminal window
    # Create a test transcript
    echo "Host: Welcome to the show. Guest: Thanks for having me..." > test-transcript.md
    # Run your new workflow
    looplia run podcast-summary --file test-transcript.md
  3. Iterate and refine

    • Check outputs in ~/.looplia/sandbox/*/outputs/
    • Adjust missions for better results
    • Add validation criteria

Here’s a template for common patterns:

---
name: my-workflow
version: 1.0.0
description: Short description of what this workflow does
steps:
# Step 1: Analyze input content
- id: analyze
skill: media-reviewer
mission: |
Analyze the content to extract:
- [List specific requirements]
- [Include quantities where applicable]
input: ${{ sandbox }}/inputs/content.md
output: ${{ sandbox }}/outputs/analysis.json
validate:
required_fields: [field1, field2]
# Step 2: Transform/generate
- id: transform
skill: idea-synthesis # or another skill
mission: |
Based on the analysis:
- [Describe transformation]
- [Specify output format]
needs: [analyze]
input: ${{ steps.analyze.output }}
output: ${{ sandbox }}/outputs/transformed.json
# Step 3: Assemble final output
- id: assemble
skill: writing-kit-assembler
mission: |
Combine inputs into final deliverable:
- [Describe final format]
needs: [analyze, transform]
input:
- ${{ steps.analyze.output }}
- ${{ steps.transform.output }}
output: ${{ sandbox }}/outputs/final.json
final: true
---
# My Workflow
Description and usage instructions...

These skills are available in the default installation:

SkillDescription
media-reviewerDeep content analysis, theme extraction, quote identification
SkillDescription
idea-synthesisGenerate hooks, angles, questions, prompts
writing-kit-assemblerCombine inputs into structured output

Steps run one after another:

steps:
- id: step1
skill: media-reviewer
# ...
- id: step2
skill: idea-synthesis
needs: [step1]
input: ${{ steps.step1.output }}
# ...

One input feeds multiple parallel analyses:

steps:
- id: analyze
skill: media-reviewer
input: ${{ sandbox }}/inputs/content.md
output: ${{ sandbox }}/outputs/analysis.json
- id: social-content
skill: writing-kit-assembler
needs: [analyze]
mission: Create social media posts
input: ${{ steps.analyze.output }}
output: ${{ sandbox }}/outputs/social.json
- id: newsletter
skill: writing-kit-assembler
needs: [analyze]
mission: Create newsletter content
input: ${{ steps.analyze.output }}
output: ${{ sandbox }}/outputs/newsletter.json

Multiple analyses combine into one output:

steps:
- id: themes
skill: media-reviewer
mission: Extract themes
# ...
- id: quotes
skill: media-reviewer
mission: Extract quotes
# ...
- id: combined
skill: writing-kit-assembler
needs: [themes, quotes]
input:
- ${{ steps.themes.output }}
- ${{ steps.quotes.output }}
# ...
# Vague (avoid)
mission: Analyze the content
# Specific (better)
mission: |
Analyze the content to extract:
- 3-5 main themes with supporting evidence
- At least 5 quotable statements (under 280 characters each)
- Key statistics or data points
- Inferred target audience
mission: |
Generate social media content:
- 5 tweets (each under 280 characters, with hashtags)
- 1 LinkedIn post (150-200 words, professional tone)
- 1 Instagram caption (casual tone, with emoji suggestions)
mission: |
Analyze this podcast transcript for a technology newsletter audience.
Focus on:
- Practical implications for developers
- Controversial or surprising claims
- Quotable insights from the guest

Add validation to ensure quality:

- id: analyze
skill: media-reviewer
validate:
required_fields: [themes, quotes, keyPoints]
min_quotes: 3
min_key_points: 5

If validation fails, the step is marked incomplete and you can adjust and retry.

Terminal window
# View step outputs
cat ~/.looplia/sandbox/*/outputs/analysis.json | jq
# Check validation state
cat ~/.looplia/sandbox/*/validation.json
Terminal window
# Session logs
cat ~/.looplia/sandbox/*/logs/session.log

Test workflow structure without API calls:

Terminal window
looplia run my-workflow --file test.md --mock