{
  "workflow_name": "Turn lead emails from Email Parser into Zoho CRM leads",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Email Received",
          "app": {
            "key": "email_parser",
            "fm_app": "email_parser"
          },
          "eventSlug": "email_received_v2",
          "eventTitle": "Email Received (v2)",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "email_parser",
        "stepID": "1",
        "action": "email_received_v2",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "flowmattic_source": "mailhook",
          "from_name": "Website Forms",
          "from_email": "forms@example.com",
          "to_name": "",
          "to_email": "leads-abc123@parser.example.com",
          "subject": "New quote request from example.com",
          "message_text": "Name: Daniel Okafor\nCompany: Okafor Logistics\nEmail: daniel.okafor@example.com\nPhone: +15550147788\nMessage: We need a quote for 40 warehouse scanners, delivery in December.",
          "message_html": "<p>Name: Daniel Okafor<br>Company: Okafor Logistics<br>Email: daniel.okafor@example.com<br>Phone: +15550147788<br>Message: We need a quote for 40 warehouse scanners, delivery in December.</p>",
          "date": "Tue, 21 Oct 2026 11:02:55 +0000"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "flowmattic_source": "mailhook",
              "from_name": "Website Forms",
              "from_email": "forms@example.com",
              "to_name": "",
              "to_email": "leads-abc123@parser.example.com",
              "subject": "New quote request from example.com",
              "message_text": "Name: Daniel Okafor\nCompany: Okafor Logistics\nEmail: daniel.okafor@example.com\nPhone: +15550147788\nMessage: We need a quote for 40 warehouse scanners, delivery in December.",
              "message_html": "<p>Name: Daniel Okafor<br>Company: Okafor Logistics<br>Email: daniel.okafor@example.com<br>Phone: +15550147788<br>Message: We need a quote for 40 warehouse scanners, delivery in December.</p>",
              "date": "Tue, 21 Oct 2026 11:02:55 +0000"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "AI Agent by FlowMattic",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "stepIndex": 2,
          "app": {
            "key": "ai_agent",
            "fm_app": "ai_agent"
          },
          "eventSlug": "execute_agent",
          "eventTitle": "Execute Agent"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 350,
          "height": 82
        },
        "actionAppArgs": {
          "system_prompt": "You turn inbound lead emails into Zoho CRM leads. From the email, extract the person's first name, last name, email, phone, company and what they are asking for. Use the email address of the person in the body, not the sender address of a notification system. First search Zoho CRM leads by that email. If a lead already exists, do not create another one. Otherwise create the lead with the request as the description. If the email is not a sales enquiry, do nothing.",
          "user_input": "From: {email_parser1.from_name} <{email_parser1.from_email}>\nSubject: {email_parser1.subject}\n\n{email_parser1.message_text}",
          "output_format": "text",
          "application": "ai_agent",
          "responseViewType": "on",
          "include_execution_log": "",
          "include_request_body": ""
        },
        "application": "ai_agent",
        "stepID": "2",
        "nodeType": "aiAgent",
        "agent_config": {
          "chat_model": {
            "connect_id": "",
            "model_id": "gpt-4o",
            "model_name": "GPT-4o",
            "provider": "openai",
            "max_tokens": "1024",
            "temperature": "0.7",
            "top_p": "1",
            "top_k": "0",
            "frequency_penalty": "0",
            "presence_penalty": "0",
            "nodeId": "2-chatModel",
            "position": {
              "x": 215,
              "y": 172
            }
          },
          "tools": [
            {
              "app": "zoho_crm",
              "app_name": "Zoho CRM",
              "app_icon": "",
              "action": "search_lead_by_email",
              "action_title": "Search Lead by Email",
              "tool_name": "Zoho CRM - Search Lead by Email",
              "tool_description": "Search Zoho CRM leads by email address to avoid duplicates.",
              "actionAppArgs": {
                "email": "AI:"
              },
              "configured": true,
              "sourceNodeId": "2-tool"
            },
            {
              "app": "zoho_crm",
              "app_name": "Zoho CRM",
              "app_icon": "",
              "action": "create_lead",
              "action_title": "Create Lead",
              "tool_name": "Zoho CRM - Create Lead",
              "tool_description": "Create a new lead in Zoho CRM.",
              "actionAppArgs": {
                "first_name": "AI:",
                "last_name": "AI:",
                "email": "AI:",
                "phone": "AI:",
                "company": "AI:",
                "lead_source": "Email",
                "description": "AI:"
              },
              "configured": true,
              "sourceNodeId": "2-tool"
            }
          ]
        }
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "main_end_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-main_end_placeholder",
        "source": "2",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Turn lead emails from Email Parser into Zoho CRM leads",
    "folder": "all",
    "description": "Forward quote requests and website form notifications to your Email Parser address and an AI agent reads each one, checks Zoho CRM for the email address and creates a lead with the name, company, phone and request when it is new. Sales teams stop retyping enquiries from their inbox. After import, connect an AI provider and Zoho CRM, and adjust the lead source in the agent tool.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}