AutomationFlowsSlack & Telegram › Automated Forex News Alert System with Forex Factory and Telegram

Automated Forex News Alert System with Forex Factory and Telegram

ByHarry Gunadi Permana @harrygp on n8n.io

Get notified if the actual data release is positive or negative for the relevant currency. Use the Telegram chat message about the news release as a trigger to open a trading position in MetaTrader 4. A news release event acts as the trigger. Only news with a numerical Forecast…

Event trigger★★★★☆ complexity21 nodesGoogle Calendar TriggerAirtopTelegram
Slack & Telegram Trigger: Event Nodes: 21 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #8340 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b6337748-39ee-4e9e-9b9f-e458b7ae42fa",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2848,
        -144
      ],
      "parameters": {
        "width": 460,
        "height": 1088,
        "content": "## Get Forex Factory News Release to Telegram\n### This n8n template demonstrates how to capture Actual Data Releases as quickly as possible for trading decisions.\n\n### Use cases:\n1. Get notified if the actual data release is positive or negative for the relevant currency.\n2. Use the Telegram chat message about the news release as a trigger to open a trading position in MetaTrader 4.\n\n### How it works\n* A news release event acts as the trigger.\n* Only news with a numerical Forecast value will be processed. Events that cannot be measured numerically (e.g., speeches) are ignored.\n* Extract news details: currency, impact level (high/medium), release date, and news link.\n* Wait 10 seconds to ensure the Actual value is available on the news page.\n* Scrape the Actual value from the news link using Airtop.\n* If the Actual value is not available, wait another 5 seconds and retry scraping.\n* Extract both Actual and Forecast values from the scraped content.\n* Remove non-numeric characters (%, K, M, B, T) and convert values to numbers.\n* Determine the effect:\nIf the Actual value is lower than the Forecast value (and lower is better), send it to the True branch.\nOtherwise, send it to the False branch.\n\n### How to use\n* Enter all required credentials.\n* Run the workflow.\n\n### Requirements\n* Google Calendar credentials\n* Airtop API key\n* Telegram Chat ID\n* Telegram Bot API token\n\n### Need Help?\nJoin the [Discord](https://discord.gg/n8n) or ask in the [Forum](https://community.n8n.io/)!\n\nThank you!"
      },
      "typeVersion": 1
    },
    {
      "id": "867655c4-9d96-41f0-809d-01d370a35b06",
      "name": "Affected Pairs",
      "type": "n8n-nodes-base.set",
      "position": [
        -1632,
        232
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c45c0138-b044-478a-9a08-db939b863c48",
              "name": "affectedPairs",
              "type": "string",
              "value": "={{ $if($('Get News Details1').item.json.currency == \"USD\",\"EURUSD,GBPUSD,AUDUSD,NZDUSD,USDJPY,USDCHF,USDCAD,XAUUSD\", $if($('Get News Details1').item.json.currency == \"EUR\",\"EURUSD\", $if($('Get News Details1').item.json.currency == \"GBP\",\"GBPUSD\", $if($('Get News Details1').item.json.currency == \"AUD\",\"AUDUSD\", $if($('Get News Details1').item.json.currency == \"NZD\",\"NZDUSD\", $if($('Get News Details1').item.json.currency == \"JPY\",\"USDJPY\", $if($('Get News Details1').item.json.currency == \"CHF\",\"USDCHF\", $if($('Get News Details1').item.json.currency == \"CAD\",\"USDCAD\", )))))))) }}"
            },
            {
              "id": "ef1caa58-f008-435f-8349-9f0d54681036",
              "name": "date",
              "type": "string",
              "value": "={{ $json.month + \" \" + $json.day + \", \" + $json.year }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "46d53180-bee7-42b7-8717-2f11e62de234",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1408,
        232
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "be52819a-dacb-4315-a2e2-0e380dac3261",
      "name": "Get News Segment",
      "type": "n8n-nodes-base.set",
      "position": [
        -960,
        160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f072ec4c-228e-4713-9cff-437d99dd8224",
              "name": "newsSegment",
              "type": "string",
              "value": "={{ $json.data.modelResponse.scrapedContent.text.substring($json.data.modelResponse.scrapedContent.text.indexOf(\"Usual Effect\")-1150,$json.data.modelResponse.scrapedContent.text.indexOf(\"Usual Effect\")+200) }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0ee7d21b-d80c-442e-a11c-d138297020fa",
      "name": "Get Actual Data?2",
      "type": "n8n-nodes-base.if",
      "position": [
        -736,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "5fd83885-b07e-4c7d-87ce-038281d6413f",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.newsSegment.substring($json.newsSegment.indexOf($('Affected Pairs').item.json.summary2),$json.newsSegment.indexOf($('Affected Pairs').item.json.summary2)+100).split(\" | \")[2] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1151e850-8202-44a7-b67e-ce3186b4e509",
      "name": "Actual, Forecast Value2",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f98f97f1-f9cd-4a4a-a987-79bf7cefd75c",
              "name": "actual",
              "type": "string",
              "value": "={{ $json.newsSegment.substring($json.newsSegment.indexOf($('Affected Pairs').item.json.summary2),$json.newsSegment.indexOf($('Affected Pairs').item.json.summary2)+100).split(\" | \")[2] }}"
            },
            {
              "id": "0f1aaafa-b164-4f5b-8efa-0bf0adde1750",
              "name": "forecast",
              "type": "string",
              "value": "={{ $json.newsSegment.substring($json.newsSegment.indexOf($('Affected Pairs').item.json.summary2),$json.newsSegment.indexOf($('Affected Pairs').item.json.summary2)+100).split(\" | \")[3] }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "6e30254d-254d-4c77-8c26-5eeff4c5c940",
      "name": "Google Calendar Trigger1",
      "type": "n8n-nodes-base.googleCalendarTrigger",
      "position": [
        -2304,
        328
      ],
      "parameters": {
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "eventStarted",
        "calendarId": {
          "__rl": true,
          "mode": "list",
          "value": " ",
          "cachedResultName": " "
        }
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1bcda6ac-e16a-4481-b5f0-5f37eed3b033",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -64,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "f5c0d425-c86e-4456-b272-0ade1b6d747d",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.forecast }}",
              "rightValue": "%"
            },
            {
              "id": "95a2f60e-c880-4ec9-b810-3e53fdf3642b",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.forecast }}",
              "rightValue": "K"
            },
            {
              "id": "c59e9ffc-8e0d-457a-a247-b3388bed9780",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.forecast }}",
              "rightValue": "M"
            },
            {
              "id": "75aee0fb-55d7-4965-a364-877edf9bf215",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.forecast }}",
              "rightValue": "B"
            },
            {
              "id": "2319659f-6637-4476-a0ee-c45fb880c231",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.forecast }}",
              "rightValue": "T"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "32ada2ae-50c1-43c9-8cd4-82f1fc2b384c",
      "name": "To Number1",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3c47e85b-5eae-4c49-8569-8e875cab9f70",
              "name": "actual",
              "type": "number",
              "value": "={{ $json.actual.toNumber() }}"
            },
            {
              "id": "3c36f4c5-79e9-4864-af35-a8421e15f3a0",
              "name": "forecast",
              "type": "number",
              "value": "={{ $json.forecast.toNumber() }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "5663e868-4f06-4189-beae-97c540093ec6",
      "name": "Get Actual Data?1",
      "type": "n8n-nodes-base.if",
      "position": [
        -512,
        256
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "13f60780-09c2-432e-9e80-a69212f27682",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json.month+\" \"+$('Get News Details1').item.json.day+\", \"+$('Get News Details1').item.json.year }}"
            },
            {
              "id": "ce61b3b3-19c1-4dbc-b985-41d0f084fb79",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json.month+\" \"+$('Get News Details1').item.json['day-1']+\", \"+$('Get News Details1').item.json.year }}"
            },
            {
              "id": "a0ac0845-f24f-476b-a25c-40aba9662561",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json['month-1']+\" \"+\"28\"+\", \"+$('Get News Details1').item.json.year }}"
            },
            {
              "id": "b2b89cec-1f73-4fa0-8360-2a6d94e22f79",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json['month-1']+\" \"+\"29\"+\", \"+$('Get News Details1').item.json.year }}"
            },
            {
              "id": "035adc96-e70d-4819-bd6a-961fc1327a41",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json['month-1']+\" \"+\"30\"+\", \"+$('Get News Details1').item.json.year }}"
            },
            {
              "id": "bfb56a75-23f3-4d4d-bdc3-c77cf1bfcdb7",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+140)  }}",
              "rightValue": "={{ $('Get News Details1').item.json['month-1']+\" \"+\"31\"+\", \"+$('Get News Details1').item.json.year }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "267ae7ed-df14-42b7-97d9-78acbf9b7d43",
      "name": "Delete %KMBT, To Number1",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "09efa7c8-fda5-4b95-be29-354d7568cb90",
              "name": "actual",
              "type": "number",
              "value": "={{ $json.actual.substring(0, $json.actual.length-1).toNumber() }}"
            },
            {
              "id": "7af14224-e13e-43e0-bbc7-f4b4052ac0e9",
              "name": "forecast",
              "type": "number",
              "value": "={{ $json.forecast.substring(0,$json.forecast.length-1).toNumber() }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "b998592a-6c14-4c34-be4a-c89c06232b22",
      "name": "'Actual' less than 'Forecast' is good for currency?1",
      "type": "n8n-nodes-base.if",
      "position": [
        384,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "eb3a077d-03ab-4b01-bee6-6963302255e1",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text }}",
              "rightValue": "'Actual' less than 'Forecast' is good for currency;"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f8d4d0fd-a664-404a-a0dc-1d20abab21fd",
      "name": "IF Has Forecast1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2080,
        328
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5f6b43c6-bb28-4ab1-a0c8-57d2da8308b6",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.description }}",
              "rightValue": "Forecast: "
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bf346ea8-bb9f-487f-ac44-22aa72b56e10",
      "name": "No Operation, do nothing2",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1856,
        424
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "de4c0747-e31c-4bee-a725-09c6150a9899",
      "name": "Get News Details1",
      "type": "n8n-nodes-base.set",
      "position": [
        -1856,
        232
      ],
      "parameters": {
        "options": {
          "ignoreConversionErrors": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "890b530e-df58-414a-98b9-0c0b18796749",
              "name": "newsLink",
              "type": "string",
              "value": "={{ $json.description.extractUrl() }}"
            },
            {
              "id": "08e16e2f-7731-420c-bb41-705b784cb740",
              "name": "forecast",
              "type": "string",
              "value": "={{ $json.description.split(\"\\\\n\\\\n\")[1].split(\" \")[1] }}"
            },
            {
              "id": "c36de21c-1e9b-46da-8f8f-740f8f001239",
              "name": "previous",
              "type": "string",
              "value": "={{ $json.description.split(\"\\\\n\\\\n\")[2].split(\" \")[1] }}"
            },
            {
              "id": "a34addab-19bd-4efd-a347-dbc37722e181",
              "name": "year",
              "type": "string",
              "value": "={{ $json.start.dateTime.substring(0, 4).toNumber() }}"
            },
            {
              "id": "d3954244-99af-466f-b5e8-bbce6417d783",
              "name": "month",
              "type": "string",
              "value": "={{ $if($json.start.dateTime.substring(5, 7).toNumber() == \"1\",\"Jan\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"2\",\"Feb\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"3\",\"Mar\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"4\",\"Apr\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"5\",\"May\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"6\",\"Jun\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"7\",\"Jul\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"8\",\"Aug\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"9\",\"Sep\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"10\",\"Oct\",$if($json.start.dateTime.substring(5, 7).toNumber() == \"11\",\"Nov\",\"Dec\"))))))))))) }}"
            },
            {
              "id": "463fb1ff-03ef-46d0-a33f-04de1d2d8c32",
              "name": "month-1",
              "type": "string",
              "value": "={{ $if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"1\",\"Jan\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"2\",\"Feb\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"3\",\"Mar\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"4\",\"Apr\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"5\",\"May\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"6\",\"Jun\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"7\",\"Jul\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"8\",\"Aug\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"9\",\"Sep\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"10\",\"Oct\",$if($json.start.dateTime.substring(5, 7).toNumber()-1 == \"11\",\"Nov\",\"Dec\"))))))))))) }}"
            },
            {
              "id": "53a1391a-1eb7-4eef-ace0-4df75a4b7f56",
              "name": "day",
              "type": "string",
              "value": "={{ $json.start.dateTime.substring(8, 10).toNumber() }}"
            },
            {
              "id": "053228c0-6a3f-419f-85fd-0cd935e0677b",
              "name": "day-1",
              "type": "string",
              "value": "={{ $if($json.start.dateTime.substring(8, 10).toNumber()-1 == 0, \"30\", $json.start.dateTime.substring(8, 10).toNumber()-1) }}"
            },
            {
              "id": "876b25b1-121e-445f-a3c0-f9704a539e44",
              "name": "currency",
              "type": "string",
              "value": "={{\n$if($json.summary.split(\" \")[1] == \"US\",\"USD\",\n$if($json.summary.split(\" \")[1] == \"AU\",\"AUD\",\n$if($json.summary.split(\" \")[1] == \"CA\",\"CAD\",\n$if($json.summary.split(\" \")[1] == \"SZ\",\"CHF\",\n$if($json.summary.split(\" \")[1] == \"UK\",\"GBP\",\n$if($json.summary.split(\" \")[1] == \"JN\",\"JPY\",\n$if($json.summary.split(\" \")[1] == \"NZ\",\"NZD\",\n$if($json.summary.split(\" \")[1] == \"GE\" || $json.summary.split(\" \")[1] == \"BE\" || $json.summary.split(\" \")[1] == \"EZ\" || $json.summary.split(\" \")[1] == \"IT\" || $json.summary.split(\" \")[1] == \"FR\" || $json.summary.split(\" \")[1] == \"SP\" ,\"EUR\", \"XXX\"\n))))))))\n}}"
            },
            {
              "id": "3404bca5-0c9c-4c0e-b7d2-f2e1f8386e02",
              "name": "impact",
              "type": "string",
              "value": "={{ $json.description.split(\"\\\\n\\\\n\")[0].split(\" \")[1] }}"
            },
            {
              "id": "f8bd3d31-3506-441d-ad03-339fe087dd32",
              "name": "summary2",
              "type": "string",
              "value": "={{ $if($json.summary.split(\" \")[1] == \"GE\", \"German \" + $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1], $if($json.summary.split(\" \")[1] == \"BE\", \"Belgian \" + $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1], $if($json.summary.split(\" \")[1] == \"IT\", \"Italian \" + $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1], $if($json.summary.split(\" \")[1] == \"FR\", \"French \" + $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1], $if($json.summary.split(\" \")[1] == \"SP\", \"Spanish \" + $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1], $json.summary.split($json.summary.split(\" \")[0] + \" \" + $json.summary.split(\" \")[1] + \" \")[1] ))))) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "1a2e9a6d-d7e6-4460-b978-edb0459f9d2d",
      "name": "Scrape News Link1",
      "type": "n8n-nodes-base.airtop",
      "position": [
        -1184,
        232
      ],
      "parameters": {
        "url": "={{ $json.newsLink }}",
        "resource": "extraction",
        "operation": "scrape",
        "sessionMode": "new"
      },
      "credentials": {
        "airtopApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "70df6bf3-1ffd-40dd-b7c1-e63636fd6068",
      "name": "Wait 5s1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -288,
        424
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "a07cbbe8-9593-4975-b9ca-a164f9773788",
      "name": "Less Good1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        608,
        16
      ],
      "parameters": {
        "text": "={{ $('Google Calendar Trigger1').item.json.summary+\"\\nImpact: \"+$('Get News Details1').item.json.impact+\"\\n\"+\n\"Actual: \"+$json.actual+\"\\n\"+\n\"Forecast: \"+$json.forecast+\"\\n\"+\n$if($json.actual == $json.forecast,\"NEUTRAL for \"+$('Get News Details1').item.json.currency,\n$if($json.actual < $json.forecast,\"GOOD for \"+$('Get News Details1').item.json.currency,\"BAD for \"+$('Get News Details1').item.json.currency))}}",
        "chatId": "123456789",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "841d7d22-ad3f-4c53-8485-2008c6b40488",
      "name": "Greater Good1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        608,
        208
      ],
      "parameters": {
        "text": "={{ $('Google Calendar Trigger1').item.json.summary+\"\\nImpact: \"+$('Get News Details1').item.json.impact+\"\\n\"+\n\"Actual: \"+$json.actual+\"\\n\"+\n\"Forecast: \"+$json.forecast+\"\\n\"+\n$if($json.actual == $json.forecast,\"NEUTRAL for \"+$('Get News Details1').item.json.currency,\n$if($json.actual > $json.forecast,\"GOOD for \"+$('Get News Details1').item.json.currency,\"BAD for \"+$('Get News Details1').item.json.currency))}}",
        "chatId": "123456789",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1bf310fd-5c58-4b0a-99b5-502709dc241b",
      "name": "Actual, Forecast Value1",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f98f97f1-f9cd-4a4a-a987-79bf7cefd75c",
              "name": "actual",
              "type": "string",
              "value": "={{ $if($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[1].includes(\"\\\\\"),$('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[1].replace(\"\\\\\",\"\"),$('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[1]) }}"
            },
            {
              "id": "0f1aaafa-b164-4f5b-8efa-0bf0adde1750",
              "name": "forecast",
              "type": "string",
              "value": "={{ $if($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[2].includes(\"\\\\\"),$('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[2].replace(\"\\\\\",\"\"),$('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.substring($('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+29, $('Scrape News Link1').item.json.data.modelResponse.scrapedContent.text.indexOf(\"| --- | --- | --- | --- |\")+135).split(\" | \")[2]) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "63e0d917-77c6-4d27-ab75-e16ab627af8e",
      "name": "No Operation, do nothing3",
      "type": "n8n-nodes-base.noOp",
      "position": [
        832,
        112
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Delete %KMBT, To Number1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "To Number1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Scrape News Link1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5s1": {
      "main": [
        [
          {
            "node": "Scrape News Link1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Less Good1": {
      "main": [
        [
          {
            "node": "No Operation, do nothing3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To Number1": {
      "main": [
        [
          {
            "node": "'Actual' less than 'Forecast' is good for currency?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Greater Good1": {
      "main": [
        [
          {
            "node": "No Operation, do nothing3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Affected Pairs": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get News Segment": {
      "main": [
        [
          {
            "node": "Get Actual Data?2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Has Forecast1": {
      "main": [
        [
          {
            "node": "Get News Details1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Actual Data?1": {
      "main": [
        [
          {
            "node": "Actual, Forecast Value1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 5s1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Actual Data?2": {
      "main": [
        [
          {
            "node": "Actual, Forecast Value2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Actual Data?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get News Details1": {
      "main": [
        [
          {
            "node": "Affected Pairs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape News Link1": {
      "main": [
        [
          {
            "node": "Get News Segment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actual, Forecast Value1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Actual, Forecast Value2": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete %KMBT, To Number1": {
      "main": [
        [
          {
            "node": "'Actual' less than 'Forecast' is good for currency?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar Trigger1": {
      "main": [
        [
          {
            "node": "IF Has Forecast1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "'Actual' less than 'Forecast' is good for currency?1": {
      "main": [
        [
          {
            "node": "Less Good1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Greater Good1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Get notified if the actual data release is positive or negative for the relevant currency. Use the Telegram chat message about the news release as a trigger to open a trading position in MetaTrader 4. A news release event acts as the trigger. Only news with a numerical Forecast…

Source: https://n8n.io/workflows/8340/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

This n8n workflow automates the process of scraping Google Play Store reviews, analyzing app performance, and sending alerts for low-rated applications. It integrates with Bright Data for web scraping

Form Trigger, HTTP Request, Google Sheets +1
Slack & Telegram

Teams that live in Notion and want an instant ping to the right person when a task changes state. Perfect for content creators, project managers, or any small team that tracks work in a Notion databas

Email Send, Slack, Telegram +3
Slack & Telegram

This workflow automates Zendesk ticket escalation by creating ClickUp tasks for urgent cases and notifying the support team in Telegram. It ensures that high-priority tickets are instantly visible to

Zendesk, ClickUp, Telegram
Slack & Telegram

⚠️ COMMUNITY TEMPLATE DISCLAIMER: This is a community-contributed template that uses ScrapeGraphAI (a community node). Please ensure you have the ScrapeGraphAI community node installed in your n8n ins

N8N Nodes Scrapegraphai, Telegram, Redis
Slack & Telegram

How it works

HTTP Request, Telegram