{
  "name": "Datavej: electricity-cost assistant",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Request"
        },
        "restore": {
          "parameters": {
            "hook": {
              "label": "Datavej request"
            }
          }
        },
        "parameters": [
          {
            "name": "hook",
            "type": "hook:gateway-webhook",
            "label": "Webhook",
            "required": true
          },
          {
            "name": "maxResults",
            "type": "number",
            "label": "Maximum number of results"
          }
        ]
      }
    },
    {
      "id": 2,
      "module": "ai-local-agent:RunLocalAIAgent",
      "version": 0,
      "parameters": {},
      "mapper": {
        "systemPrompt": "You are an electricity-cost assistant for Danish households and small businesses. Use Datavej's tools for every number. Work out the bidding zone: DK1 is Jutland and Funen, DK2 is Zealand, Copenhagen and Bornholm (use place_lookup when only a town is given). Use electricity_prices for spot prices, electricity_tariffs for the grid company's tariffs and the all-in price, and electricity_co2 when the user asks about emissions. Answer briefly: the cheapest and most expensive hours, the all-in price per kWh when you have it, and a concrete suggestion (for example when to run the dishwasher or charge the car). Say which date and zone the prices are for, and end with the source attribution lines the tools return.",
        "message": "{{1.question}}",
        "modelConfig": {
          "recursionLimit": 30,
          "iterationsFromHistoryCount": 0
        },
        "outputType": "text"
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0,
          "name": "Datavej agent"
        },
        "restore": {
          "parameters": {
            "makeConnectionId": {
              "label": "Choose your AI provider connection"
            }
          }
        },
        "parameters": [
          {
            "name": "makeConnectionId",
            "type": "account:ai-provider,openai-gpt-3,anthropic-claude,gemini-ai-q9zyjp",
            "label": "Connection",
            "required": true
          }
        ]
      },
      "tools": [
        {
          "name": "Datavej",
          "description": "Danish public data from Datavej (datavej.dk). Call the selected tools by name.",
          "flow": [
            {
              "id": 3,
              "module": "mcp-client:McpToolsForAgent",
              "version": 1,
              "parameters": {},
              "mapper": {
                "tools": [
                  "electricity_prices",
                  "electricity_tariffs",
                  "electricity_co2",
                  "place_lookup"
                ]
              },
              "metadata": {
                "designer": {
                  "x": 300,
                  "y": 250
                },
                "restore": {
                  "parameters": {
                    "account": {
                      "label": "Datavej (https://datavej.dk/mcp)",
                      "data": {
                        "scoped": "true",
                        "connection": "mcp"
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "name": "account",
                    "type": "account:mcp",
                    "label": "Connection",
                    "required": true
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "id": 4,
      "module": "gateway:WebhookRespond",
      "version": 1,
      "parameters": {},
      "mapper": {
        "status": "200",
        "body": "{{2.response}}",
        "headers": [
          {
            "key": "Content-Type",
            "value": "text/plain; charset=utf-8"
          }
        ]
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Reply"
        }
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "slots": null,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "eu1.make.com",
    "notes": []
  }
}
