{
  "workflow_name": "Let an AI agent categorize new Supabase rows and write the result back",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Row Inserted",
          "app": {
            "key": "supabase",
            "fm_app": "supabase"
          },
          "eventSlug": "insert",
          "eventTitle": "Row Inserted",
          "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": "supabase",
        "stepID": "1",
        "action": "insert",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "type": "INSERT",
          "table": "customers",
          "schema": "public",
          "record": {
            "id": 17,
            "name": "Acme Corp",
            "email": "buyer@acme.com",
            "status": "urgent",
            "amount": 1450,
            "plan": "Pro Plan"
          },
          "old_record": null
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "type": "INSERT",
              "table": "customers",
              "schema": "public",
              "record": {
                "id": 17,
                "name": "Acme Corp",
                "email": "buyer@acme.com",
                "status": "urgent",
                "amount": 1450,
                "plan": "Pro Plan"
              },
              "old_record": null
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "AI Agent by FlowMattic",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "stepIndex": 2,
          "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 enrich database rows. Read the new record, choose a sensible category and write a one-line summary, then update the row and notify the team.",
          "user_input": "New row in {supabase1.table}: {supabase1.record.name} — {supabase1.record.plan} (${supabase1.record.amount})",
          "output_format": "text",
          "application": "ai_agent",
          "responseViewType": "on",
          "include_execution_log": "",
          "include_request_body": ""
        },
        "application": "ai_agent",
        "stepID": "2",
        "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": "2-chatModel",
            "position": {
              "x": 215,
              "y": 172
            }
          },
          "tools": [
            {
              "app": "supabase",
              "app_name": "Supabase",
              "app_icon": "",
              "action": "update_row",
              "action_title": "Update Row",
              "tool_name": "Supabase - Update Row",
              "tool_description": "Write category + summary back to the row",
              "actionAppArgs": {
                "table_name": "{supabase1.table}",
                "match_column": "id",
                "match_value": "{supabase1.record.id}",
                "mapping_type": "json",
                "record_data": "AI:"
              },
              "configured": true,
              "sourceNodeId": "2-tool"
            },
            {
              "app": "slack",
              "app_name": "Slack",
              "app_icon": "",
              "action": "send_message_to_channel",
              "action_title": "Send Channel Message",
              "tool_name": "Slack - Send Channel Message",
              "tool_description": "Post a note to the data channel",
              "actionAppArgs": {
                "message_text": "AI:"
              },
              "configured": true,
              "sourceNodeId": "2-tool"
            }
          ]
        }
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 350,
          "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-main_end_placeholder",
        "source": "2",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Let an AI agent categorize new Supabase rows and write the result back",
    "folder": "all",
    "description": "An AI agent reads each new row, decides a category and a one-line summary, updates the row in place and drops a note in Slack — raw entries become structured data on arrival.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}