{
  "workflow_name": "When a new order is created in WooCommerce, loop through the line items using Iterator, call WooCommerce PHP function wc_get_product to get the product data for the product ID, and add details to Google Spreadsheet",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "New Order Created",
          "app": {
            "key": "woocommerce",
            "fm_app": "woocommerce"
          },
          "eventSlug": "new_order",
          "eventTitle": "New Order Created",
          "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": "woocommerce",
        "stepID": "1",
        "action": "new_order",
        "nodeType": "step",
        "actionAppArgs": []
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Loop Through Array",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "iterator",
            "fm_app": "iterator"
          },
          "eventSlug": "loop_through_array",
          "eventTitle": "Loop Through Array"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": [],
        "application": "iterator",
        "action": "loop_through_array",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Call PHP Function",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "php_functions",
            "fm_app": "php_functions"
          },
          "eventSlug": "call_function",
          "eventTitle": "Call PHP Function"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": [],
        "application": "php_functions",
        "action": "call_function",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Add New Row",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "google_spreadsheets",
            "fm_app": "google_spreadsheets"
          },
          "eventSlug": "new_row",
          "eventTitle": "Add New Row"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": [],
        "application": "google_spreadsheets",
        "action": "new_row",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 700,
          "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-main_end_placeholder",
        "source": "4",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "When a new order is created in WooCommerce, loop through the line items using Iterator, call WooCommerce PHP function wc_get_product to get the product data for the product ID, and add details to Google Spreadsheet",
    "folder": "all",
    "description": "Each WooCommerce order is unpacked line by line with Iterator, enriched with full product data via PHP Functions, and logged to Google Sheets, giving you an itemized sales record with zero manual entry.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}