> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dume.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create Workflows - Complete Tutorial

> Complete tutorial on building automated workflows in Dume.ai. Learn to create a Daily Digest workflow that aggregates emails, calendar events, and web search results.

<Info>
  To learn how workflow creation works, this guide walks through a simple “Daily Digest” example. Follow the steps to understand adding nodes, configuring tools, and scheduling runs.
</Info>

## Overview

This guide shows how to build a Daily Digest workflow: gather Gmail emails, Google Calendar events, relevant news, then generate and send a structured HTML summary. You will use Input, Tool, Output, and Trigger nodes.

## Final Flow (High-Level)

Trigger (Daily 08:00) → Input (email) → Tool: Gmail → Tool: Calendar → Tool: Web Search → Tool: Send Email → Output

## Step-by-Step

## Step-by-Step

<Steps>
  <Step title="Add Input Node">
    Drag Input node. Add field:<br />

    * Name: email (Text, single line).<br />
      Why: Establish a reusable variable (INPUT.email) so every downstream node can personalize output and send the digest to the right recipient.
  </Step>

  <Step title="Fetch Emails (Tool Node)">
    Add Tool node “Fetch emails”.<br />
    Integration: Gmail.<br />
    Tool: GMAIL\_LIST\_EMAILS.<br />
    Message example: “Fetch today’s and yesterday’s emails. Categorize: 1) Urgent attention, 2) Tasks, 3) Informational.”<br />
    Why: Collect raw inbox context and pre‑categorize so the digest highlights actions and priorities instead of dumping every email.<br />
    The AI infers search parameters; output accessible as FETCH\_EMAILS.tool\_result.
  </Step>

  <Step title="Fetch Calendar (Tool Node)">
    Add Tool node “Calendar”.<br />
    Integration: Google Calendar.<br />
    Tool: GOOGLE\_CALENDAR\_LIST\_CALENDAR\_EVENTS.<br />
    Message example: “Retrieve all events from now until end of day. Include title, start, end, location, description in chronological order.”<br />
    Why: Surface upcoming time commitments so the digest merges schedule + tasks for daily planning.<br />
    Output → CALENDAR.tool\_result.
  </Step>

  <Step title="Web Search (Tool Node)">
    Add Tool node “Web search”.<br />
    Integration: App Default Tools.<br />
    Tool: Web Search.<br />
    Message example: “Search trending news based on my profession; return top 5 most relevant.”<br />
    Why: Add external context (industry/news) to enhance situational awareness in the same daily snapshot.<br />
    Output → WEB\_SEARCH.tool\_result.
  </Step>

  <Step title="Send Email (Tool Node)">
    Add Tool node “Send email” and connect outputs of the three previous Tool nodes.<br />
    Integration: App Default Tools.<br />
    Tool: Send Email Notification.<br />
    Set fields:<br />

    * to: INPUT.email<br />
    * subject: “Dume AI Daily Digest”<br />
    * content (Message prompt): “Generate a polished HTML daily digest containing: 1 Today’s upcoming calendar events (CALENDAR.tool\_result). 2 Summary of categorized emails (FETCH\_EMAILS.tool\_result). 3 Top 5 relevant news (WEB\_SEARCH.tool\_result). Use sections, headings, readable tables, and brief action items.”<br />
      Why: Consolidates disparate data sources into one actionable, formatted deliverable sent automatically.
  </Step>

  <Step title="Add Output Node">
    Connect Output node to Send email node. Configure to return confirmation.<br />
    Why: Provide a structured completion result (e.g., status or email ID) for logging, monitoring, or chaining.
  </Step>

  <Step title="Schedule (Trigger)">
    Add Trigger node → connect to Input.<br />
    Type: Schedule.<br />
    Frequency: Daily at 08:00 (choose timezone).<br />
    Enable trigger. The workflow will auto-run without manual chat input.<br />
    Why: Automates daily execution so the digest arrives proactively without user intervention.
  </Step>

  <Step title="Save, Publish, Test">
    Save workflow. Publish to activate trigger.<br />
    Optional manual test: Run workflow and enter a test email to verify the digest arrives.<br />
    Why: Ensures configuration is stored, activated, and validated before relying on unattended runs.
  </Step>
</Steps>

## Variable References

Use prior node outputs in prompts or mappings:

```
INPUT.email
FETCH_EMAILS.tool_result
CALENDAR.tool_result
WEB_SEARCH.tool_result
```

## Components Used

| Component         | Purpose                           |
| ----------------- | --------------------------------- |
| Input             | Collect recipient email address   |
| Tool (Gmail)      | List and categorize recent emails |
| Tool (Calendar)   | Gather today’s remaining events   |
| Tool (Web Search) | Pull profession-relevant news     |
| Tool (Send Email) | Assemble and send HTML digest     |
| Output            | Return execution result           |
| Trigger           | Schedule daily unattended run     |

## Tips

* Keep Tool node messages explicit about desired structure.
* Use distinct node names for clearer variable references.
* Start without Trigger to validate outputs, then enable scheduling.
* Refine email prompt for formatting improvements (tables, headings, color accents).

## Troubleshooting

| Issue                | Fix                                                 |
| -------------------- | --------------------------------------------------- |
| Empty emails section | Adjust Gmail message filters (extend date range)    |
| No news results      | Narrow or clarify profession/context                |
| Email not received   | Verify Send Email tool config and recipient address |
| Trigger not firing   | Check time zone, publish status, and enable toggle  |

<Check>Workflow created. Daily digest will be generated and sent automatically each morning.</Check>

<Note>Extend later: add Delay node for post-meeting recap or Condition node for priority filtering.</Note>
