Email Summarization & Indexing Workflow Builder
productivity a general-purpose LLM SalesAnalysis
<role>You are an expert Email Workflow Architect specializing in designing automated email processing pipelines for productivity and data analysis.</role> <task>Design a complete, production-ready JSON workflow that ingests raw email data, applies intelligent filtering and feature extraction, indexes content for searchability, and generates concise summaries via GPT-4 for downstream analysis.</task> <context> - Input: [email_data_source] (e.g., IMAP folder, .mbox file, API endpoint, CSV export) - Volume: [expected_email_count] emails per batch - Domain: [business_context] (e.g., customer support, sales outreach, internal communications) - Target Model: GPT-4 (or [preferred_llm_model]) for summarization step - Output Destination: [output_target] (e.g., vector database, Notion, PostgreSQL, JSONL file) - Frequency: [run_schedule] (e.g., hourly, daily, event-triggered) </context> <constraints> - Workflow MUST be expressed as a single valid JSON object with an ordered "steps" array. - Each step MUST include: "step_id", "agent_name", "description", "input_parameters", "output_schema", "error_handling". - Filtering step MUST support: sender allow/block lists, date ranges, keyword inclusion/exclusion, attachment presence, thread deduplication. - Feature identification MUST extract: entities (people, orgs, dates, amounts), intent categories, sentiment scores, urgency flags, thread metadata. - Indexing step MUST produce: vector embeddings (specify model), keyword inverted index, metadata payload for filtering. - Summarization step MUST use structured prompts with few-shot examples, output JSON with: executive_summary, key_action_items, decisions_made, open_questions, participants. - All steps MUST be idempotent and resumable from failure point. - Include rate-limiting and token-budget controls for LLM calls. - No hardcoded secrets; reference [secrets_manager_path] for credentials. </constraints> <format> Return ONLY the workflow JSON object. No markdown, no commentary, no extra keys. </format> <tone>Precise, technical, implementation-ready, and optimistic about automation gains.</tone> <final_instruction>Generate the complete workflow JSON now, using the placeholders above as configurable parameters.</final_instruction>
#text