Skip to content

Instantly share code, notes, and snippets.

@Kenya-West
Created August 17, 2025 12:21
Show Gist options
  • Save Kenya-West/efbfb64d294e835b94538d90f4d0c9c8 to your computer and use it in GitHub Desktop.
Save Kenya-West/efbfb64d294e835b94538d90f4d0c9c8 to your computer and use it in GitHub Desktop.

📱 MacroDroid Macros – Telegram Notifications

This gist contains a set of MacroDroid macros exported to .mdr format.
The macros are designed to send notifications about calls, SMS, and Wi-Fi events directly to a Telegram chat using the Telegram Bot API.


🚀 Features

  • Outgoing call notifications
    Sends a Telegram message when an outgoing call is made, including:

    • Phone number
    • Contact name
    • Battery level
    • Current Wi-Fi network
  • Incoming call notifications
    Sends details about incoming calls to Telegram:

    • Caller number & name
    • Battery status
    • Wi-Fi network info
  • Incoming SMS notifications
    Forwards incoming SMS messages to Telegram:

    • Sender name and number
    • Message content
    • SIM information (SIM name, operator, ID)
    • Battery and Wi-Fi status
  • Wi-Fi connection notifications
    Sends a Telegram alert when the device connects to any Wi-Fi network, with:

    • SSID
    • Location (coordinates, link, timestamp, speed)
    • Battery level

⚙️ Requirements

  • MacroDroid app (Android automation tool)
  • Telegram bot token (create one via @BotFather)
  • Telegram chat ID (for a group/channel or direct chat with the bot)

🔧 Setup

  1. Import the .mdr file into MacroDroid:

    • Open MacroDroid → MenuImport/ExportImport Macros.
  2. Edit each HTTP Request action:

    • Replace the placeholder bot token in the URL:

      https://api.telegram.org/bot0000000000:AAAA-123456789abcdefgh/sendMessage
      

      with your bot token:

      https://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage
      
    • Replace the placeholder chat ID (-1000000000000) with your own chat ID.

  3. Save and enable the macros.


📂 Macros Included

  • Исходящий звонок себе – Outgoing call notifications
  • Звонки себе – Incoming call notifications
  • SMS себе – Incoming SMS forwarding
  • Wi-Fi подключен – Wi-Fi connection notifications (with location info)

📝 Notes

  • All macros are grouped under Без категории (“Uncategorized”).
  • Messages include emojis and formatted text for better readability in Telegram.
  • Location-based data requires MacroDroid location permissions.

⚠️ Disclaimer

These macros use Telegram’s Bot API for notifications.
Be cautious with sharing phone numbers, SMS content, or location data to external services.
Always protect your bot token and chat ID.

{
"activityRecognitionUpdateRate": 120,
"categoryList": {
"categories": [
{
"color": -855310,
"isExpanded": true,
"isLocked": false,
"name": "Без категории"
}
]
},
"cellTowerGroups": [],
"cellTowerUpdateRate": 5,
"cellTowerUseAlarm": false,
"cellTowersIgnore": [],
"deviceFacingConstraintWorkWithScreenOff": false,
"drawerConfiguration": {
"backgroundColor": -1,
"drawerItems": [],
"headerColor": -12692882,
"leftSide": false,
"swipeAreaColor": -7829368,
"swipeAreaHeight": 20,
"swipeAreaOffset": 40,
"swipeAreaOpacity": 80,
"swipeAreaWidth": 14,
"visibleSwipeAreaWidth": 0
},
"enableExperimentalFeatures": false,
"enableRootFeatures": false,
"exportAppVersion": 546000004,
"exportFormat": 2,
"flipWithScreenOff": false,
"forceBlackBackground": false,
"homeScreenTilesNumRows": 3,
"homeScreenTilesNumRowsLandscape": 5,
"lightSensorUpdateRate": 0,
"locationUpdateRate": 10,
"macroDroidIconResourceId": 2131230935,
"macroList": [
{
"disabledTimestamp": 0,
"exportedActionBlocks": [],
"forceEvenIfNotEnabledTimestamp": 0,
"isActionBlock": false,
"isBeingImported": false,
"isClonedInstance": false,
"isExtra": false,
"isFavourite": false,
"lastEditedTimestamp": 1744031125525,
"localVariables": [],
"m_GUID": -5454654645464644652,
"m_actionList": [
{
"requestConfig": {
"allowAnyCertificate": true,
"basicAuthEnabled": false,
"basicAuthPassword": "",
"basicAuthUsername": "",
"blockNextAction": false,
"contentBodyFileDisplayName": "",
"contentBodyFileUri": "",
"contentBodySource": 0,
"contentBodyText": "",
"contentType": "",
"followRedirects": false,
"headerParams": [],
"queryParams": [
{
"paramName": "chat_id",
"paramValue": "-1000000000000"
},
{
"paramName": "text",
"paramValue": "📞 Совершён исходящий звонок на номер: {call_number} (Имя контакта: {call_name}) | Заряд: {battery}%, Сеть Wi-Fi: {ssid}"
}
],
"requestTimeOutSeconds": 30,
"requestType": 0,
"responseVariableName": "response",
"returnCodeVariableName": "status",
"saveResponseFileName": "",
"saveResponseFolderPathDisplayName": "",
"saveResponseFolderPathUri": "",
"saveResponseType": 1,
"saveReturnCodeToVariable": true,
"saveReturnHeadersToVariable": false,
"urlToOpen": "https://api.telegram.org/bot0000000000:AAAA-123456789abcdefgh/sendMessage"
},
"m_SIGUID": -5454654645464644654,
"m_classType": "HttpRequestAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_category": "Без категории",
"m_constraintList": [],
"m_description": "",
"m_descriptionOpen": false,
"m_enabled": true,
"m_excludeLog": false,
"m_headingColor": 0,
"m_isOrCondition": false,
"m_name": "Исходящий звонок себе",
"m_triggerList": [
{
"m_outgoingCallToList": [],
"isExclude": false,
"m_groupIdList": [],
"m_groupNameList": [],
"m_option": 3,
"m_phoneNumberExclude": false,
"useRegex": false,
"m_SIGUID": -5454654645464644651,
"m_classType": "OutgoingCallTrigger",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
]
},
{
"disabledTimestamp": 0,
"exportedActionBlocks": [],
"forceEvenIfNotEnabledTimestamp": 0,
"isActionBlock": false,
"isBeingImported": false,
"isClonedInstance": false,
"isExtra": false,
"isFavourite": false,
"lastEditedTimestamp": 1745818892662,
"localVariables": [],
"m_GUID": -56465464654465465,
"m_actionList": [
{
"blockNextAction": true,
"timeoutSeconds": 10,
"m_SIGUID": -21213213132123132,
"m_classType": "ForceLocationUpdateAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
},
{
"requestConfig": {
"allowAnyCertificate": true,
"basicAuthEnabled": false,
"basicAuthPassword": "",
"basicAuthUsername": "",
"blockNextAction": false,
"contentBodyFileDisplayName": "",
"contentBodyFileUri": "",
"contentBodySource": 0,
"contentBodyText": "",
"contentType": "",
"followRedirects": false,
"headerParams": [],
"queryParams": [
{
"paramName": "chat_id",
"paramValue": "-1000000000000"
},
{
"paramName": "text",
"paramValue": "🛜 Сеть Wi-Fi подключена!\n\nСеть Wi-Fi: {ssid}\nДанные о локации:\n- {last_loc_latlong}\n- {last_loc_link}\n- Ссылка на последнее известное местоположение: {last_loc_age_timestamp}\n- Скорость аппарата: {last_loc_speed_kmh} км/ч.\n\nℹ️ Доп. данные:\n🔋 Заряд: {battery}%"
}
],
"requestTimeOutSeconds": 30,
"requestType": 0,
"responseVariableName": "response",
"returnCodeVariableName": "statuscode",
"saveResponseFileName": "",
"saveResponseFolderPathDisplayName": "",
"saveResponseFolderPathUri": "",
"saveResponseType": 1,
"saveReturnCodeToVariable": true,
"saveReturnHeadersToVariable": false,
"urlToOpen": "https://api.telegram.org/bot0000000000:AAAA-123456789abcdefgh/sendMessage"
},
"m_SIGUID": -987988798987897,
"m_classType": "HttpRequestAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_category": "Без категории",
"m_constraintList": [],
"m_description": "",
"m_descriptionOpen": false,
"m_enabled": true,
"m_excludeLog": false,
"m_headingColor": 0,
"m_isOrCondition": false,
"m_name": "Wi-Fi подключен",
"m_triggerList": [
{
"customAddedSSIDs": [],
"m_SSIDList": [
"Любая сеть"
],
"m_wifiState": 2,
"m_SIGUID": -987987897978987,
"m_classType": "WifiConnectionTrigger",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
]
},
{
"disabledTimestamp": 0,
"exportedActionBlocks": [],
"forceEvenIfNotEnabledTimestamp": 0,
"isActionBlock": false,
"isBeingImported": false,
"isClonedInstance": false,
"isExtra": false,
"isFavourite": false,
"lastEditedTimestamp": 1744454541316,
"localVariables": [],
"m_GUID": -2311565423165,
"m_actionList": [
{
"requestConfig": {
"allowAnyCertificate": true,
"basicAuthEnabled": false,
"basicAuthPassword": "",
"basicAuthUsername": "",
"blockNextAction": false,
"contentBodyFileDisplayName": "",
"contentBodyFileUri": "",
"contentBodySource": 0,
"contentBodyText": "",
"contentType": "",
"followRedirects": false,
"headerParams": [],
"queryParams": [
{
"paramName": "chat_id",
"paramValue": "-1000000000000"
},
{
"paramName": "text",
"paramValue": "📄 Входящее смс от: {sms_name} ({sms_number})\n\n📖 Содержимое СМС:\n{sms_message}\n\nℹ️ Доп. данные:\n🔋 Заряд: {battery}%,\n📟 Имя SIM: {sms_sim_name} (ID: {sms_sim_id}, {sim_operator_name}, {sim2_operator_name}),\n📶 Сеть Wi-Fi: {ssid}"
}
],
"requestTimeOutSeconds": 30,
"requestType": 0,
"responseVariableName": "response",
"returnCodeVariableName": "statuscode",
"saveResponseFileName": "",
"saveResponseFolderPathDisplayName": "",
"saveResponseFolderPathUri": "",
"saveResponseType": 1,
"saveReturnCodeToVariable": false,
"saveReturnHeadersToVariable": false,
"urlToOpen": "https://api.telegram.org/bot0000000000:AAAA-123456789abcdefgh/sendMessage"
},
"m_SIGUID": -21321132165454231,
"m_classType": "HttpRequestAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_category": "Без категории",
"m_constraintList": [],
"m_description": "",
"m_descriptionOpen": false,
"m_enabled": true,
"m_excludeLog": false,
"m_headingColor": 0,
"m_isOrCondition": false,
"m_name": "SMS себе",
"m_triggerList": [
{
"enableRegex": false,
"ignoreCase": true,
"isExcludeContact": false,
"m_exactMatch": false,
"m_excludes": false,
"m_groupIdList": [],
"m_groupNameList": [],
"m_option": 3,
"m_smsContent": "",
"m_smsFromList": [],
"m_smsNumberExclude": false,
"subscriptionId": -1,
"m_SIGUID": -6547889451165338,
"m_classType": "IncomingSMSTrigger",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
]
},
{
"disabledTimestamp": 0,
"exportedActionBlocks": [],
"forceEvenIfNotEnabledTimestamp": 0,
"isActionBlock": false,
"isBeingImported": false,
"isClonedInstance": false,
"isExtra": false,
"isFavourite": false,
"lastEditedTimestamp": 1744455243620,
"localVariables": [],
"m_GUID": -87454136484899845641,
"m_actionList": [
{
"requestConfig": {
"allowAnyCertificate": true,
"basicAuthEnabled": false,
"basicAuthPassword": "",
"basicAuthUsername": "",
"blockNextAction": false,
"contentBodyFileDisplayName": "",
"contentBodyFileUri": "",
"contentBodySource": 0,
"contentBodyText": "",
"contentType": "",
"followRedirects": false,
"headerParams": [],
"queryParams": [
{
"paramName": "chat_id",
"paramValue": "-1000000000000"
},
{
"paramName": "text",
"paramValue": "📞 Звонок по сотовой сети от: {call_number} (Имя контакта: {call_name})\n\n📖 Содержимое СМС:\n{sms_message}\n\nℹ️ Доп. данные:\n🔋 Заряд: {battery}%\n🛜 Сеть Wi-Fi: {ssid}"
}
],
"requestTimeOutSeconds": 30,
"requestType": 0,
"responseVariableName": "response",
"returnCodeVariableName": "statuscode",
"saveResponseFileName": "",
"saveResponseFolderPathDisplayName": "",
"saveResponseFolderPathUri": "",
"saveResponseType": 1,
"saveReturnCodeToVariable": false,
"saveReturnHeadersToVariable": false,
"urlToOpen": "https://api.telegram.org/bot0000000000:AAAA-123456789abcdefgh/sendMessage"
},
"m_SIGUID": -23116548895211858,
"m_classType": "HttpRequestAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_category": "Без категории",
"m_constraintList": [],
"m_description": "",
"m_descriptionOpen": false,
"m_enabled": true,
"m_excludeLog": false,
"m_headingColor": 0,
"m_isOrCondition": false,
"m_name": "Звонки себе",
"m_triggerList": [
{
"m_incomingCallFromList": [],
"isExclude": false,
"m_groupIdList": [],
"m_groupNameList": [],
"m_option": 3,
"m_phoneNumberExclude": false,
"useRegex": false,
"m_SIGUID": -2311515684899451,
"m_classType": "IncomingCallTrigger",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
]
}
],
"mediaButtonPassThroughUnhandled": true,
"notificationButtonBarConfig": "",
"notificationButtonBarIconTint": -16777216,
"notificationButtonBarIsEnabled": false,
"notificationPriority": 2,
"proximityWorkWithScreenOff": false,
"quickRunMacroIds": [],
"quickSettingsData": {
"quickSettingsButtonList": [
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
},
{
"collapseOnPress": false,
"enabled": false,
"image": 0,
"imageName": "ic_settings_applications_white_24dp",
"isToggle": true,
"label": "",
"subtitle": "",
"toggleOn": false
}
]
},
"readScreenUpdateRate": 2000,
"recordMicrophoneHideFromMediaLibrary": false,
"shakeDetectionRate": "Normal",
"shakeSensitivity": "3",
"shakeWorkWithScreenOff": false,
"shareLastPhotoNotifyFail": false,
"shareLastPhotoNotifyWhenDone": false,
"shareLastPhotoRetryPeriod": 0,
"shareLocationNotifyFail": false,
"shareLocationNotifyWhenDone": false,
"shareLocationRetryPeriod": 0,
"smsMonitorInbox": true,
"smtpServerConfig": {
"password": "",
"serverAddress": "",
"serverPort": "0",
"startTlsEnabled": false,
"useAuthentication": true,
"username": ""
},
"spokenTextAudioStream": 5,
"stopWatches": [
"кек"
],
"sunsetSunriseLocation": "",
"templateMacrosAutoTranslate": false,
"udpNotifyFailure": true,
"variables": [],
"vibrateOnFlip": true,
"vibrateOnShake": true,
"weatherTriggerLocation": "",
"weatherUpdateRate": 30,
"widgetButtonVibrateOnPress": false,
"wifiSSIDBackgroundScanRate": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment