{
  "workflow_name": "Qualify demo requests and put a calendar hold on the sales calendar",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Request a Demo",
          "app": {
            "key": "jotform",
            "fm_app": "jotform"
          },
          "eventSlug": "form_submission",
          "eventTitle": "New Form Submission",
          "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": "jotform",
        "stepID": "1",
        "action": "form_submission",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "name": "Jane Doe",
          "email": "jane@example.com",
          "phone": "+15551234567",
          "subject": "Product enquiry",
          "message": "I'd like a demo and pricing for a team of 20.",
          "company_size": "250",
          "use_case": "team analytics"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "name": "Jane Doe",
              "email": "jane@example.com",
              "phone": "+15551234567",
              "subject": "Product enquiry",
              "message": "I'd like a demo and pricing for a team of 20.",
              "company_size": "250",
              "use_case": "team analytics"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Save lead in FluentCRM",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "fluentcrm",
            "fm_app": "fluentcrm"
          },
          "eventSlug": "create_new_contact",
          "eventTitle": "Create or Update Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_email": "{jotform1.email}",
          "first_name": "{jotform1.name}"
        },
        "application": "fluentcrm",
        "action": "create_new_contact",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Proposed start (24 hours from now)",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "date_time_formatter",
            "fm_app": "date_time_formatter"
          },
          "eventSlug": "modify_current_date",
          "eventTitle": "Modify Current Date"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "operation": "add",
          "time_unit": "hours",
          "time_unit_value": "24",
          "to_format": "custom",
          "custom_to_format": "Y-m-d H:i:s"
        },
        "application": "date_time_formatter",
        "action": "modify_current_date",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Proposed end (30 minutes later)",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "date_time_formatter",
            "fm_app": "date_time_formatter"
          },
          "eventSlug": "modify_current_date",
          "eventTitle": "Modify Current Date"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "operation": "add",
          "time_unit": "minutes",
          "time_unit_value": "1470",
          "to_format": "custom",
          "custom_to_format": "Y-m-d H:i:s"
        },
        "application": "date_time_formatter",
        "action": "modify_current_date",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "5",
        "position": {
          "x": 700,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "AI Agent by FlowMattic",
          "layoutDirection": "horizontal",
          "stepNumber": 5,
          "stepIndex": 5,
          "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 are a demo qualification agent. A lead qualifies if the company is mid-market or larger (50+ people) and has a clear use case. If the lead qualifies, create a tentative calendar event titled 'Tentative demo: <name>' using exactly the proposed start and end given. If it does not qualify, do not create an event. Reply with one line saying qualified or not and why.",
          "user_input": "Name: {jotform1.name}\nEmail: {jotform1.email}\nCompany size: {jotform1.company_size}\nUse case: {jotform1.use_case}\nProposed start: {date_time_formatter3.output}\nProposed end: {date_time_formatter4.output}",
          "output_format": "text",
          "application": "ai_agent",
          "responseViewType": "on",
          "include_execution_log": "",
          "include_request_body": ""
        },
        "application": "ai_agent",
        "stepID": "5",
        "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": "5-chatModel",
            "position": {
              "x": 740,
              "y": 172
            }
          },
          "tools": [
            {
              "app": "google_calendar",
              "app_name": "Google Calendar",
              "app_icon": "",
              "action": "create_event",
              "action_title": "Create Detailed Event",
              "tool_name": "Google Calendar - Create Detailed Event",
              "tool_description": "Hold a tentative demo slot for a qualified lead",
              "actionAppArgs": {
                "event_title": "AI:",
                "start_datetime": "{date_time_formatter3.output}",
                "end_datetime": "{date_time_formatter4.output}"
              },
              "configured": true,
              "sourceNodeId": "5-tool"
            }
          ]
        }
      },
      {
        "id": "6",
        "position": {
          "x": 875,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Notify sales",
          "layoutDirection": "horizontal",
          "stepNumber": 6,
          "app": {
            "key": "email",
            "fm_app": "email"
          },
          "eventSlug": "send_email",
          "eventTitle": "Send Email"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "to_email": "sales@yourcompany.com",
          "email_subject": "Demo request from {jotform1.company_size}-seat company",
          "email_body": "Review the demo request from {jotform1.email}."
        },
        "application": "email",
        "action": "send_email",
        "nodeType": "step",
        "stepID": "6"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 1050,
          "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-3",
        "source": "2",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-5",
        "source": "4",
        "target": "5",
        "type": "step",
        "data": []
      },
      {
        "id": "e-5-6",
        "source": "5",
        "target": "6",
        "type": "step",
        "data": []
      },
      {
        "id": "e-6-main_end_placeholder",
        "source": "6",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Qualify demo requests and put a calendar hold on the sales calendar",
    "folder": "all",
    "description": "A demo request is saved as a FluentCRM contact, then an AI agent checks company size and use case and, for qualified leads, puts a tentative hold on Google Calendar at tomorrow's computed slot. Sales is emailed either way.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}