{
  "schema_version": "1.0",
  "name": "Tutorial demo \u00b7 Lead intake to outreach",
  "nodes": [
    {
      "id": "start",
      "type": "nudge",
      "position": {
        "x": 0,
        "y": 180
      },
      "data": {
        "label": "Start this demo",
        "kind": "trigger.manual",
        "eyebrow": "Trigger",
        "icon": "play",
        "tone": "teal",
        "config": {}
      }
    },
    {
      "id": "read",
      "type": "nudge",
      "position": {
        "x": 280,
        "y": 180
      },
      "data": {
        "label": "Read three demo leads",
        "kind": "action.sheets_read",
        "eyebrow": "sheets read",
        "icon": "table",
        "tone": "teal",
        "config": {
          "credential_id": "",
          "spreadsheet_id": "",
          "worksheet": "Leads",
          "range": "A1:F4",
          "max_rows": 3,
          "first_row_headers": true,
          "value_format": "UNFORMATTED_VALUE"
        }
      }
    },
    {
      "id": "loop",
      "type": "nudge",
      "position": {
        "x": 560,
        "y": 180
      },
      "data": {
        "label": "One lead at a time",
        "kind": "logic.loop",
        "eyebrow": "loop",
        "icon": "repeat",
        "tone": "teal",
        "config": {
          "items": "{{steps.read.rows}}"
        }
      }
    },
    {
      "id": "map",
      "type": "nudge",
      "position": {
        "x": 840,
        "y": 180
      },
      "data": {
        "label": "Prepare the next action",
        "kind": "action.transform",
        "eyebrow": "transform",
        "icon": "braces",
        "tone": "teal",
        "config": {
          "fields": [
            {
              "id": "lead_id",
              "key": "lead_id",
              "value": "{{input.lead_id}}",
              "enabled": true
            },
            {
              "id": "company",
              "key": "company",
              "value": "{{input.company}}",
              "enabled": true
            },
            {
              "id": "email",
              "key": "email",
              "value": "{{input.email}}",
              "enabled": true
            },
            {
              "id": "next_action",
              "key": "next_action",
              "value": "Prepare a {{input.interest}} demo for {{input.contact}}",
              "enabled": true
            }
          ]
        }
      }
    },
    {
      "id": "save",
      "type": "nudge",
      "position": {
        "x": 1120,
        "y": 180
      },
      "data": {
        "label": "Save to Outreach",
        "kind": "action.sheets",
        "eyebrow": "sheets",
        "icon": "table",
        "tone": "teal",
        "config": {
          "credential_id": "",
          "spreadsheet_id": "",
          "worksheet": "Outreach",
          "mode": "append",
          "values": [
            {
              "id": "lead_id",
              "key": "lead_id",
              "value": "{{input.lead_id}}",
              "enabled": true
            },
            {
              "id": "company",
              "key": "company",
              "value": "{{input.company}}",
              "enabled": true
            },
            {
              "id": "email",
              "key": "email",
              "value": "{{input.email}}",
              "enabled": true
            },
            {
              "id": "next_action",
              "key": "next_action",
              "value": "{{input.next_action}}",
              "enabled": true
            }
          ]
        }
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "source": "start",
      "target": "read"
    },
    {
      "id": "e1",
      "source": "read",
      "target": "loop"
    },
    {
      "id": "e2",
      "source": "loop",
      "target": "map"
    },
    {
      "id": "e3",
      "source": "map",
      "target": "save"
    }
  ],
  "settings": {}
}
