{"id":14063662,"url":"https://github.com/techthoughts2/PoshGram","last_synced_at":"2025-07-29T16:30:55.150Z","repository":{"id":35332897,"uuid":"138952143","full_name":"techthoughts2/PoshGram","owner":"techthoughts2","description":"Send messages via the Telegram Bot API using PowerShell","archived":false,"fork":false,"pushed_at":"2024-01-15T05:05:43.000Z","size":10429,"stargazers_count":137,"open_issues_count":6,"forks_count":10,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-12-01T07:45:05.145Z","etag":null,"topics":["powershell","powershell-module","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-requirements"],"latest_commit_sha":null,"homepage":"https://poshgram.readthedocs.io","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techthoughts2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-28T01:42:08.000Z","updated_at":"2024-11-17T14:34:57.000Z","dependencies_parsed_at":"2023-12-26T20:42:36.574Z","dependency_job_id":"b38aeef7-e876-4669-8936-c99309b043d0","html_url":"https://github.com/techthoughts2/PoshGram","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techthoughts2%2FPoshGram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techthoughts2%2FPoshGram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techthoughts2%2FPoshGram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techthoughts2%2FPoshGram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techthoughts2","download_url":"https://codeload.github.com/techthoughts2/PoshGram/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228028597,"owners_count":17858358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","powershell-module","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-requirements"],"created_at":"2024-08-13T07:03:26.973Z","updated_at":"2024-12-04T01:31:09.699Z","avatar_url":"https://github.com/techthoughts2.png","language":"PowerShell","readme":"# PoshGram\n\n[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-6.1+-blue.svg)](https://github.com/PowerShell/PowerShell) [![PowerShell Gallery][psgallery-img]][psgallery-site] ![Cross Platform](https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey) [![License][license-badge]](LICENSE) [![Documentation Status](https://readthedocs.org/projects/poshgram/badge/?version=latest)](https://poshgram.readthedocs.io/en/latest/?badge=latest)\n\n[psgallery-img]:   https://img.shields.io/powershellgallery/dt/PoshGram.svg\n[psgallery-site]:  https://www.powershellgallery.com/packages/PoshGram\n[psgallery-v1]:    https://www.powershellgallery.com/packages/PoshGram\n[license-badge]:   https://img.shields.io/github/license/techthoughts2/PoshGram\n\n\u003cp align=\"left\"\u003e\n    \u003cimg src=\"docs/assets/PoshGram.png\" alt=\"PoshGram Logo\" \u003e\n\u003c/p\u003e\n\nBranch | Windows | MacOS | Linux\n--- | --- | --- | --- |\nmain | ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoibTI1bm9iZ0tRY3hGRzVUQzdKUzhyT0lGOUlCZHVySldHRCtyQlRRcVVKM0M4bExOMDgvdkMzdTR3MC83VGhzQzVBUVJ6ajFwNDFvVDUwQU5wK3BMNHUwPSIsIml2UGFyYW1ldGVyU3BlYyI6ImluRWp6VDA4eWYxNitqQ2giLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=main) | [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/f0l0iiqfq6tua4l1/branch/main?svg=true)](https://ci.appveyor.com/project/techthoughts2/poshgram/branch/main) | ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiZHFxQmNXamdSTVJzd2FUcTUraWRDalAwRlNBRWNGV2MzVExZRHdKb2VwbGdtUHdJME91c05tVzYyWXJWMythSWR0dkROYTJkdWxGZG1sUWVuTTB0WWI4PSIsIml2UGFyYW1ldGVyU3BlYyI6IjhReWlJdmNZQSt3bW9Mb3MiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=main) |\nEnhancements | ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiRDRkc01KRlpFb3NFckRCRk14bFF3cGFpa3I5M3pNTHF5YXk2b2hrcFNEbU56bGlNVEovUzBLQ0xQcDlXa1oyaGVOZzN6WE0rZlNiM2dXR1U1eWpVWitzPSIsIml2UGFyYW1ldGVyU3BlYyI6IjAvTXY3R1YwWXFYQzg3TWoiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=Enhancements) | [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/f0l0iiqfq6tua4l1/branch/Enhancements?svg=true)](https://ci.appveyor.com/project/techthoughts2/poshgram/branch/Enhancements)| ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiWmVlOTRZTGtPbjdKR3p5YjFTeGpuVmROZjJ0Unh1aVprYlErOG1CQ3ZKSVRaUEhxOW01OFdOQkRlRG0zb1JCNWI1aVJqcno0TG5FVnoxSnNrVnZvU21ZPSIsIml2UGFyYW1ldGVyU3BlYyI6IjFJalRUNFR5YTljUWFKUHEiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=Enhancements) |\n\n## Synopsis\n\nPoshGram is a PowerShell module that enables you to send messages via the Telegram Bot API\n\n## Description\n\nPoshGram provides functionality to send various message types to a specified Telegram chat via the Telegram Bot API. Separate PowerShell functions are used for each message type. Checks are included to ensure that file extensions, and file size restrictions are adhered to based on Telegram requirements.\n\n## Features\n\n- **Versatile Messaging**: Send a wide variety of message types, including text, contact, dice, animation, audio, document, photo, sticker, video, location, multi-media, poll, and venue messages. It also supports HTML and Markdown for rich text formatting.\n- **Interactive Elements**: Incorporate custom keyboards and inline buttons to make your messages interactive.\nSticker Info**: Easily query sticker packs, get sticker information, and send stickers directly through PowerShell commands.\n- **Notification Control**: Opt to send messages silently or with notifications.\n- **Content Protection**: Enable features to protect messages from being forwarded or saved.\n- **Flexible Application**: Use in various scenarios like integrating with task schedulers, alert systems, serverless functions, or automating chat responses.\n- **User-Friendly Experience**: PoshGram is designed for easy use, suitable for PowerShell users at various skill levels. It offers a simpler way to leverage Telegram's messaging features, combining straightforward cmdlets with clear documentation, ideal for enhancing PowerShell tasks with Telegram's capabilities.\n\n## Getting Started\n\n### Documentation\n\nDocumentation for PoshGram is available at: [https://poshgram.readthedocs.io](https://poshgram.readthedocs.io)\n\n### Prerequisites\n\n- [PowerShell](https://github.com/PowerShell/PowerShell) 6.1.0 (or higher version)\n- Telegram requirements\n    - A Telegram Account\n    - [Telegram Bot created](https://core.telegram.org/bots#how-do-i-create-a-bot)\n    - Chat ID number\n    - Bot must be a member of the specified chat\n\n### Installation\n\n```powershell\n# from a 6.1.0+ PowerShell session\nInstall-Module -Name 'PoshGram' -Repository PSGallery -Scope CurrentUser\n```\n\n## Quick start\n\n![PoshGram Gif Demo](docs/assets/PoshGram.gif \"PoshGram in action\")\n\n```powershell\n#------------------------------------------------------------------------------------------------\n# import the PoshGram module\nImport-Module -Name 'PoshGram'\n\n# set your bot token and chat channel id\n$botToken = 'nnnnnnnnn:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx'\n$chatID = '-nnnnnnnnn'\n#------------------------------------------------------------------------------------------------\n# easy way to validate your Bot token is functional\nTest-BotToken -BotToken $botToken\n#------------------------------------------------------------------------------------------------\n# send a basic Text Message\nSend-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message 'Hello'\n#------------------------------------------------------------------------------------------------\n# get information for a Telegram sticker pack\nGet-TelegramStickerPackInfo -BotToken $botToken -StickerSetName STPicard\n#------------------------------------------------------------------------------------------------\n# get information about Telegram custom emoji stickers using their identifiers (experimental)\nGet-TelegramCustomEmojiStickerInfo -BotToken $botToken -CustomEmojiIdentifier 5404870433939922908\n#------------------------------------------------------------------------------------------------\n# send a contact's information\nSend-TelegramContact -BotToken $botToken -ChatID $chatID -PhoneNumber $phone -FirstName $firstName\n#------------------------------------------------------------------------------------------------\n#send an animated emoji that will display a random value\nSend-TelegramDice -BotToken $botToken -ChatID $chatID -Emoji $emoji\n#------------------------------------------------------------------------------------------------\n# send an animated gif from a local source\nSend-TelegramLocalAnimation -BotToken $botToken -ChatID $chatID -AnimationPath $animation\n#------------------------------------------------------------------------------------------------\n# send an audio message from a local source\nSend-TelegramLocalAudio -BotToken $botToken -ChatID $chatID -Audio $audio\n#------------------------------------------------------------------------------------------------\n# send a file message from a local source\nSend-TelegramLocalDocument -BotToken $botToken -ChatID $chatID -File $file\n#------------------------------------------------------------------------------------------------\n# send a photo message from a local source\nSend-TelegramLocalPhoto -BotToken $botToken -ChatID $chatID -PhotoPath $photo\n#------------------------------------------------------------------------------------------------\n#sends Telegram sticker message from a local source\nSend-TelegramLocalSticker -BotToken $botToken -ChatID $chatID -StickerPath $sticker\n#------------------------------------------------------------------------------------------------\n# send a video message from a local source\nSend-TelegramLocalVideo -BotToken $botToken -ChatID $chatID -Video $video\n#------------------------------------------------------------------------------------------------\n# send a map point location using Latitude and Longitude\nSend-TelegramLocation -BotToken $botToken -ChatID $chatID -Latitude $latitude -Longitude $longitude\n#------------------------------------------------------------------------------------------------\n# sends a group of photos or videos as an album from a local source\nSend-TelegramMediaGroup -BotToken $botToken -ChatID $chatID -FilePaths (Get-ChildItem C:\\PhotoGroup | Select-Object -ExpandProperty FullName)\n#------------------------------------------------------------------------------------------------\n# send a poll with a question and options\nSend-TelegramPoll -BotToken $botToken -ChatID $chatID -Question $question -Options $opt\n#------------------------------------------------------------------------------------------------\n#send Telegram sticker with known sticker file_id\nSend-TelegramSticker -BotToken $botToken -ChatID $chatID -FileID $sticker\n#send Telegram sticker (best effort) with sticker pack name and emoji shortcode\nSend-TelegramSticker -BotToken $botToken -ChatID $chatID -StickerSetName STPicard -Shortcode ':slightly_smiling_face:'\n#------------------------------------------------------------------------------------------------\n# send an animated gif from a URL source\nSend-TelegramURLAnimation -BotToken $botToken -ChatID $chatID -AnimationURL $animationURL\n#------------------------------------------------------------------------------------------------\n# send an audio message from a URL source\nSend-TelegramURLAudio -BotToken $botToken -ChatID $chatID -AudioURL $audioURL\n#------------------------------------------------------------------------------------------------\n# send a file message from a URL source\nSend-TelegramURLDocument -BotToken $botToken -ChatID $chatID -FileURL $fileURL\n#------------------------------------------------------------------------------------------------\n# send a photo message from a URL source\nSend-TelegramURLPhoto -BotToken $botToken -ChatID $chatID -PhotoURL $photoURL\n#------------------------------------------------------------------------------------------------\n#send a sticker message from a URL source\nSend-TelegramURLSticker -BotToken $botToken -ChatID $chatID -StickerURL $stickerURL\n#------------------------------------------------------------------------------------------------\n# send a video message from a URL source\nSend-TelegramURLVideo -BotToken $botToken -ChatID $chatID -VideoURL $videoURL\n#------------------------------------------------------------------------------------------------\n# send information about a venue\nSend-TelegramVenue -BotToken $botToken -ChatID $chatID -Latitude $latitude -Longitude $longitude -Title $title -Address $address\n#------------------------------------------------------------------------------------------------\n###########################################################################\n#sending a telegram message from older versions of powershell\n###########################################################################\n#here is an example of calling PowerShell 6.1+ from PowerShell 5.1 to send a Telegram message with PoshGram\n\u0026 'C:\\Program Files\\PowerShell\\6\\pwsh.exe' -command { Import-Module PoshGram;$botToken = '#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx';$chatID = '-nnnnnnnnn';Send-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message \"Test from 5.1 calling 6.1+ to send Telegram Message via PoshGram\" }\n#--------------------------------------------------------------------------\n#here is an example of calling PowerShell 6.1+ from PowerShell 5.1 to send a Telegram message with PoshGram using dynamic variables in the message\n$botToken = “#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx”\n$chatID = “-#########”\n$test = \"I am a test\"\n\u0026 '.\\Program Files\\PowerShell\\6\\pwsh.exe' -command \"\u0026 {Import-Module PoshGram;Send-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message '$test';}\"\n#--------------------------------------------------------------------------\n#here is an example of calling PowerShell 7+ from PowerShell 5.1 to send a Telegram message with PoshGram\n\u0026 'C:\\Program Files\\PowerShell\\7\\pwsh.exe' -command { Import-Module PoshGram;$botToken = '#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx';$chatID = '-nnnnnnnnn';Send-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message \"Test from 5.1 calling 7+ to send Telegram Message via PoshGram\" }\n#--------------------------------------------------------------------------\n```\n\n## Notes\n\nThis PowerShell project was created with [Catesta](https://github.com/techthoughts2/Catesta).\n\n## Contributing\n\nIf you'd like to contribute to pwshEmojiExplorer, please see the [contribution guidelines](.github/CONTRIBUTING.md).\n\n## License\n\nThis project is [licensed under the MIT License](LICENSE).\n","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechthoughts2%2FPoshGram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechthoughts2%2FPoshGram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechthoughts2%2FPoshGram/lists"}