{
  "name": "Extract Contacts (Local)",
  "description": "Pull names, emails, phones and companies out of pasted text into clean fields — on your device, no account.",
  "tags": [
    "extract",
    "contacts",
    "on-device ai",
    "structured data",
    "parsing",
    "crm"
  ],
  "type": "triggered",
  "nodes": [
    {
      "id": "sticky-intro",
      "position": {
        "x": 20,
        "y": 20
      },
      "data": {
        "color": "#fff266",
        "content": "📇 Extract contact details from any text.\n\nPaste a signature, bio, or message into the text field, press Run, and get back structured name / email / phone / company fields. It all runs locally in your browser. Pick a model the first time."
      },
      "type": "stickyNote",
      "width": 360,
      "height": 200
    },
    {
      "id": "trigger-run",
      "position": {
        "x": 100,
        "y": 300
      },
      "data": {
        "instance": {
          "id": "af-base-node:trigger:whenStarted"
        },
        "label": "Run now",
        "inputs": {},
        "parameters": {
          "notes": "Starts the workflow when you press Run."
        }
      },
      "type": "trigger"
    },
    {
      "id": "source-text",
      "position": {
        "x": 420,
        "y": 300
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:editFields"
        },
        "label": "Text to scan",
        "inputs": {
          "fields": {
            "text": {
              "type": "string",
              "value": "Hi, I'm Jane Doe, Head of Ops at Acme Co. Reach me at jane.doe@acme.example or +1 (555) 123-4567."
            }
          }
        },
        "parameters": {
          "notes": "Paste the text you want to pull contact details from. Replace the sample with your own."
        }
      },
      "type": "basic"
    },
    {
      "id": "extract",
      "position": {
        "x": 740,
        "y": 300
      },
      "data": {
        "instance": {
          "id": "af-base-node:agent:information-extractor"
        },
        "label": "Extract the contact",
        "inputs": {
          "text": "{{ $input.text }}",
          "schemaDescription": "name, email, phone, company"
        },
        "parameters": {
          "notes": "Reads the text and pulls out the contact fields as structured data."
        }
      },
      "type": "agent"
    },
    {
      "id": "local-model",
      "position": {
        "x": 660,
        "y": 520
      },
      "data": {
        "instance": {
          "id": "af-base-node:dependency:webLLM"
        },
        "label": "Local AI model",
        "inputs": {
          "model": "",
          "options": {
            "temperature": 0.4
          }
        },
        "parameters": {
          "notes": "Runs the extraction locally in your browser. Pick a model the first time — it downloads once, then works offline."
        }
      },
      "type": "dependency"
    },
    {
      "id": "output-parser",
      "position": {
        "x": 900,
        "y": 520
      },
      "data": {
        "instance": {
          "id": "af-base-node:dependency:structuredOutputParser"
        },
        "label": "Shape the output",
        "inputs": {
          "jsonOutputExample": "{\"name\":\"Jane Doe\",\"email\":\"jane.doe@acme.example\",\"phone\":\"+1 555 123 4567\",\"company\":\"Acme Co\"}"
        },
        "parameters": {
          "notes": "Forces the model to return clean, consistent JSON fields."
        }
      },
      "type": "dependency"
    },
    {
      "id": "show-object",
      "position": {
        "x": 1060,
        "y": 300
      },
      "data": {
        "instance": {
          "id": "af-base-node:basic:displayObjectNode"
        },
        "label": "Show the fields",
        "inputs": {
          "title": "Extracted contact"
        },
        "parameters": {
          "notes": "Displays the extracted contact fields."
        }
      },
      "type": "basic"
    },
    {
      "id": "sticky-model",
      "position": {
        "x": 660,
        "y": 680
      },
      "data": {
        "color": "#c9f0d1",
        "content": "Setup needed: pick a local model the first time you run this. It downloads once, then runs fully offline."
      },
      "type": "stickyNote",
      "width": 300,
      "height": 110
    }
  ],
  "edges": [
    {
      "id": "e-run-source",
      "type": "flowEdge",
      "source": "trigger-run",
      "target": "source-text"
    },
    {
      "id": "e-source-extract",
      "type": "flowEdge",
      "source": "source-text",
      "target": "extract"
    },
    {
      "id": "e-extract-model",
      "type": "flowEdge",
      "source": "extract",
      "target": "local-model",
      "sourceHandle": "dependency-0"
    },
    {
      "id": "e-extract-parser",
      "type": "flowEdge",
      "source": "extract",
      "target": "output-parser",
      "sourceHandle": "dependency-1"
    },
    {
      "id": "e-extract-show",
      "type": "flowEdge",
      "source": "extract",
      "target": "show-object"
    }
  ]
}