{
  "workflow_name": "Score leads with AI and route hot ones into your CRM",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "New Form Submission",
          "app": {
            "key": "fluent_forms",
            "fm_app": "fluent_forms"
          },
          "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": "fluent_forms",
        "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 for my team.",
          "company": "Acme",
          "budget": "9000"
        },
        "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 for my team.",
              "company": "Acme",
              "budget": "9000"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Score lead with AI",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "openai",
            "fm_app": "openai"
          },
          "eventSlug": "generate_content",
          "eventTitle": "Generate Content"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "prompt": "Reply HOT or COLD for this lead based on intent and budget. Message: {fluent_forms1.message}. Budget: {fluent_forms1.budget}.",
          "ai_model": "gpt-4o",
          "max_tokens": "600"
        },
        "application": "openai",
        "action": "generate_content",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "nodeType": "router",
        "application": "router",
        "stepID": "3",
        "type": "action",
        "actionAppArgs": [],
        "data": {
          "label": "Router",
          "app": {
            "key": "router",
            "fm_app": "router"
          },
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "stepIndex": 3
        },
        "parentType": "step"
      },
      {
        "id": "3-routerSwitch",
        "position": {
          "x": 450,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "+",
          "stepNumber": null,
          "layoutDirection": "horizontal",
          "app": []
        },
        "routerSwitch": true,
        "stepID": "3-routerSwitch",
        "nodeType": "routerSwitch",
        "actionAppArgs": []
      },
      {
        "id": "3-routerRoute_A",
        "position": {
          "x": 570,
          "y": -112.5
        },
        "type": "action",
        "data": {
          "label": "Route A",
          "stepNumber": null,
          "layoutDirection": "horizontal",
          "app": [],
          "customLabel": "Hot lead"
        },
        "routerRoute": true,
        "routeLetter": "A",
        "routeIndex": 0,
        "stepID": "3-routerRoute_A",
        "nodeType": "routerRoute",
        "actionAppArgs": []
      },
      {
        "id": "4",
        "position": {
          "x": 790,
          "y": -112.5
        },
        "type": "action",
        "data": {
          "label": "Route Conditions",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "filter",
            "fm_app": "filter"
          },
          "eventSlug": "continue_if",
          "eventTitle": "Route Conditions",
          "customLabel": "Route Conditions"
        },
        "parentType": "routerRoute",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "key": "{openai2.response}",
                "condition": "contain_text",
                "value": "HOT"
              }
            ]
          }
        },
        "application": "filter",
        "action": "continue_if",
        "nodeType": "step",
        "stepID": "4",
        "filterConditions": {
          "filterConditions": {
            "1": [
              {
                "key": "{openai2.response}",
                "condition": "contain_text",
                "value": "HOT"
              }
            ]
          }
        }
      },
      {
        "id": "5",
        "position": {
          "x": 965,
          "y": -112.5
        },
        "type": "action",
        "data": {
          "label": "Create/Update FluentCRM contact",
          "layoutDirection": "horizontal",
          "stepNumber": 5,
          "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": "{fluent_forms1.email}",
          "first_name": "{fluent_forms1.name}",
          "last_name": ""
        },
        "application": "fluentcrm",
        "action": "create_new_contact",
        "nodeType": "step",
        "stepID": "5"
      },
      {
        "id": "6",
        "position": {
          "x": 1140,
          "y": -112.5
        },
        "type": "action",
        "data": {
          "label": "Flag hot lead",
          "layoutDirection": "horizontal",
          "stepNumber": 6,
          "app": {
            "key": "slack",
            "fm_app": "slack"
          },
          "eventSlug": "send_message_to_channel",
          "eventTitle": "Send Channel Message"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "message_text": "🔥 Hot lead {fluent_forms1.name} ({fluent_forms1.company})"
        },
        "application": "slack",
        "action": "send_message_to_channel",
        "nodeType": "step",
        "stepID": "6"
      },
      {
        "id": "3_A_placeholder",
        "position": {
          "x": 1315,
          "y": -112.5
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "3_A_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      },
      {
        "id": "3-routerRoute_B",
        "position": {
          "x": 570,
          "y": 112.5
        },
        "type": "action",
        "data": {
          "label": "Route B",
          "stepNumber": null,
          "layoutDirection": "horizontal",
          "app": [],
          "customLabel": "Cold lead"
        },
        "routerRoute": true,
        "routeLetter": "B",
        "routeIndex": 1,
        "stepID": "3-routerRoute_B",
        "nodeType": "routerRoute",
        "actionAppArgs": []
      },
      {
        "id": "7",
        "position": {
          "x": 790,
          "y": 112.5
        },
        "type": "action",
        "data": {
          "label": "Route Conditions",
          "layoutDirection": "horizontal",
          "stepNumber": 7,
          "app": {
            "key": "filter",
            "fm_app": "filter"
          },
          "eventSlug": "continue_if",
          "eventTitle": "Route Conditions",
          "customLabel": "Route Conditions"
        },
        "parentType": "routerRoute",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "key": "{fluent_forms1.email}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        },
        "application": "filter",
        "action": "continue_if",
        "nodeType": "step",
        "stepID": "7",
        "filterConditions": {
          "filterConditions": {
            "1": [
              {
                "key": "{fluent_forms1.email}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        }
      },
      {
        "id": "8",
        "position": {
          "x": 965,
          "y": 112.5
        },
        "type": "action",
        "data": {
          "label": "Send Email",
          "layoutDirection": "horizontal",
          "stepNumber": 8,
          "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": "leads@yourcompany.com",
          "email_subject": "Cold lead logged",
          "email_body": "Logged cold lead {fluent_forms1.name} ({fluent_forms1.email})."
        },
        "application": "email",
        "action": "send_email",
        "nodeType": "step",
        "stepID": "8"
      },
      {
        "id": "3_B_placeholder",
        "position": {
          "x": 1140,
          "y": 112.5
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "3_B_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-3-routerSwitch",
        "source": "3",
        "target": "3-routerSwitch",
        "type": "router",
        "data": []
      },
      {
        "id": "e-3-routerSwitch-3-routerRoute_A",
        "source": "3-routerSwitch",
        "target": "3-routerRoute_A",
        "type": "router",
        "data": []
      },
      {
        "id": "e-3-routerRoute_A-4",
        "source": "3-routerRoute_A",
        "target": "4",
        "type": "router",
        "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-3_A_placeholder",
        "source": "6",
        "target": "3_A_placeholder",
        "type": "placeholder",
        "data": []
      },
      {
        "id": "e-3-routerSwitch-3-routerRoute_B",
        "source": "3-routerSwitch",
        "target": "3-routerRoute_B",
        "type": "router",
        "data": []
      },
      {
        "id": "e-3-routerRoute_B-7",
        "source": "3-routerRoute_B",
        "target": "7",
        "type": "router",
        "data": []
      },
      {
        "id": "e-7-8",
        "source": "7",
        "target": "8",
        "type": "step",
        "data": []
      },
      {
        "id": "e-8-3_B_placeholder",
        "source": "8",
        "target": "3_B_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Score leads with AI and route hot ones into your CRM",
    "folder": "all",
    "description": "OpenAI scores lead quality; hot leads are added to FluentCRM and flagged in Slack, while cold leads are simply logged. Combines AI with a Router.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}