{
  "id": "5EnZkZXpxy95JiaU",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Deliver Daily Multi-Currency Exchange Updates via API to Email & WhatsApp",
  "tags": [],
  "nodes": [
    {
      "id": "0121e662-72d7-46c6-a3e2-41e3fd94de11",
      "name": "Daily Trigger (7:30 AM IST)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -280,
        180
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "993ff9e7-0958-4b2e-b578-1f4d78e052f8",
      "name": "Set Config: API Key & Currencies",
      "type": "n8n-nodes-base.set",
      "position": [
        -60,
        180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4669b111-8540-4de2-a5f7-672f2ad81e98",
              "name": "API",
              "type": "string",
              "value": "Enter_your_api_key"
            },
            {
              "id": "58c89ccb-2e3d-4334-9366-d0b285fdfbd8",
              "name": "Currencies",
              "type": "string",
              "value": "INR,CAD,AUD,CNY,EUR,USD"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3c0cb008-daa7-4832-a1f3-f093b0201d6b",
      "name": "Fetch Exchange Rates (CurrencyFreaks)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        180
      ],
      "parameters": {
        "url": "=https://api.currencyfreaks.com/v2.0/rates/latest?apikey={{ $json['API Key'] }}&symbols={{ $json['Currencies'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "249dde1c-95b4-480c-91ab-90651ed6a6a9",
      "name": "Wait for API Response (5s)",
      "type": "n8n-nodes-base.wait",
      "position": [
        380,
        180
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9f860161-dda0-4351-9ce4-ce02204cef32",
      "name": "Set Email & WhatsApp Recipients",
      "type": "n8n-nodes-base.set",
      "position": [
        600,
        180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b0969ab-45d1-427c-bac0-bd59a43661d7",
              "name": "Email_id",
              "type": "string",
              "value": "user@example.com"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "51a13f97-7ba1-465d-9dc2-701fb932c64c",
      "name": "Create Message Subject & Body",
      "type": "n8n-nodes-base.set",
      "position": [
        820,
        180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ad95bad5-c4ac-4864-a83c-06d59d99b415",
              "name": "Subject",
              "type": "string",
              "value": "Today's Currency Exchange Rates"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d669298c-ada6-4a7d-a2c9-b45712db0872",
      "name": "Send WhatsApp Alert",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1040,
        280
      ],
      "parameters": {
        "textBody": "\ud83d\udcc8 Today's Currency Exchange Rates \u2013 {{ $('Fetch Exchange Rates (CurrencyFreaks)').item.json.data }}  Base: INR  USD:  {{rate}} EUR:  {{rate}} CAD:  {{rate}} AUD:  {{rate}} CNY:  {{rate}}  \u2014 Auto-sent by FX Update Bot",
        "operation": "send",
        "phoneNumberId": "=+919994448855",
        "additionalFields": {},
        "recipientPhoneNumber": "+1234567890"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1c770554-e541-4905-8a0a-eb21610faf23",
      "name": "Send Email Alert",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1040,
        80
      ],
      "parameters": {
        "text": "=\ud83d\udcc8 Today's Currency Exchange Rates \u2013 {{ $('Fetch Exchange Rates (CurrencyFreaks)').item.json.data }}\n\nBase: INR\n\nUSD:  {{rate}}\nEUR:  {{rate}}\nCAD:  {{rate}}\nAUD:  {{rate}}\nCNY:  {{rate}}\n\n\u2014 Auto-sent by FX Update Bot\n",
        "options": {},
        "subject": "={{ $('Create Message Subject & Body').item.json.Subject }}",
        "toEmail": "={{ $('Set Email & WhatsApp Recipients').item.json.Email_id }}",
        "fromEmail": "user@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3b5b384c-884d-4e0b-99eb-f0b7ea5deef0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        0
      ],
      "parameters": {
        "width": 180,
        "height": 340,
        "content": "Triggers the workflow every day at a fixed time (e.g., 7 AM IST) to fetch and send updated exchange rates."
      },
      "typeVersion": 1
    },
    {
      "id": "761c84ed-715e-47e0-afb4-d24473808431",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 180,
        "height": 340,
        "content": "Define your API key and target currencies (INR, CAD, AUD, CNY, EUR, USD) in a manual node for use in the API call."
      },
      "typeVersion": 1
    },
    {
      "id": "c09a6a8a-878c-4372-9441-4c4baca49a82",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 340,
        "content": "Calls the exchange rate API using your API key and fetches the latest currency rates with INR as the base."
      },
      "typeVersion": 1
    },
    {
      "id": "0d97f12f-5fae-4bc4-a01e-b30438b6140d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 180,
        "height": 340,
        "content": "Adds a short delay to ensure API rate limits are respected and system stability is maintained."
      },
      "typeVersion": 1
    },
    {
      "id": "64caf21b-c1ee-4e7c-a798-a8a9178b89fc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        0
      ],
      "parameters": {
        "width": 180,
        "height": 340,
        "content": "Set the list of email addresses and WhatsApp numbers who should receive the currency update."
      },
      "typeVersion": 1
    },
    {
      "id": "e562a8fb-b41b-4d7f-8c23-c7bffb596410",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 180,
        "height": 340,
        "content": "Dynamically generate a subject line (e.g., \u201cToday's Currency Exchange Rates \u2013 {{Date}}\u201d) and the text body containing all rates."
      },
      "typeVersion": 1
    },
    {
      "id": "41ac52db-46d3-4d7f-86d3-709ee41fc6f1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -120
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 600,
        "content": "Sends the formatted currency rate update via Email and WhatsApp "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "01ad1e77-4366-41bc-a9b6-43551d7e9a83",
  "connections": {
    "Wait for API Response (5s)": {
      "main": [
        [
          {
            "node": "Set Email & WhatsApp Recipients",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Trigger (7:30 AM IST)": {
      "main": [
        [
          {
            "node": "Set Config: API Key & Currencies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Message Subject & Body": {
      "main": [
        [
          {
            "node": "Send WhatsApp Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Email & WhatsApp Recipients": {
      "main": [
        [
          {
            "node": "Create Message Subject & Body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Config: API Key & Currencies": {
      "main": [
        [
          {
            "node": "Fetch Exchange Rates (CurrencyFreaks)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Exchange Rates (CurrencyFreaks)": {
      "main": [
        [
          {
            "node": "Wait for API Response (5s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}