Send and read emails using just sms (along with sms weather, zmanim and more)

Looking for a powerful way to connect GroupMe with email and other handy tools like weather, zmanim, currency conversion, stock lookup, and more? This Python script transforms your GroupMe group into a multipurpose command center—all via SMS.


:wrench: Features

  • Send and receive emails via SMS
  • Zmanim lookup
  • Live weather reports
  • Currency conversion
  • Stock market queries
  • Optional AI chatbot support (with custom API key)

:warning: Some features require free API keys. See the notes below for setup instructions.


:rocket: Getting Started

  1. Download the Script
    :page_facing_up: Download Python File

  2. Set Up GroupMe

    • Create or log into your GroupMe account.

    • Enable SMS mode for your profile.

    • Create a new group.

    • Go to the GroupMe Developers Page.

      • Click Get Access Token and save it.

      • Click Create Bot:

        • Choose your new group.

        • For the Callback URL, use:

          https://yourusername.pythonanywhere.com/groupme
          
        • Click Submit.

      • Copy the Group ID and Bot ID from the confirmation screen.

  3. Edit the Script

    • Open the script you downloaded.

    • Near the top, enter your email and email password or App Password (Gmail requires 2-Step Verification to generate this).

      • If you’re using another email provider, update the IMAP server and port as needed.
    • Scroll down to BOT_MAP = {...} and replace the sample entries with your actual Group ID and Bot ID.

  4. Optional: Enable Additional Features

    • Some features (weather, AI chatbot, etc.) require free API keys.
    • Look for the relevant API URLs in the script and register for free keys.
    • Paste them into the appropriate fields in the script.
  5. Deploy to PythonAnywhere

    • Create a free account at PythonAnywhere.

    • Go to the Files tab, create a new file named /home/yourusername/flask_app.py, and paste in the script content.

    • Open the Web tab and choose Manual Configuration.

      • Pick any Python version (e.g., 3.8).

      • Scroll to the WSGI configuration file and replace its content with:

        import sys
        import os
        sys.path.insert(0, '/home/yourusername/')
        from flask_app import app as application
        
    • Save and close.

  6. Install Dependencies

    • Open the Bash Console and run:

      python3.8 -m pip install flask requests deep-translator
      

      (Replace 3.8 with the version you selected earlier)

  7. Final Step

    • Go to the Web tab and click Reload Web App.

:white_check_mark: Done!

You now have a working GroupMe bot ready to handle SMS-based commands for email, zmanim, weather, and more.


:pushpin: Usage Notes

  • Commands must start with a dash (-) and have no space before the keyword.
    Example: -zmanim 10952 :white_check_mark: | - zmanim 10952 :cross_mark: (#monsey case :joy:)
  • For a full list of available commands, send: -help
  • AI integration (e.g., with Gemini or DeepSeek) is supported via API keys but is optional.
  • This script is not production-grade. It was created for personal use and may have bugs. Feel free to improve it!

:speech_balloon: Feedback & Support

If you run into issues or have suggestions, feel free to post here. I’d love to hear your feedback and improve this project further.

credits: @flipphoneguy

5 Likes

I tried following the guide, but the bot isn’t working:

devinthebm.pythonanywhere.com.error.log
2025-07-24 20:23:36,002: Error running WSGI application
2025-07-24 20:23:36,003: ModuleNotFoundError: No module named 'flask_app'
2025-07-24 20:23:36,003:   File "/var/www/devinthebm_pythonanywhere_com_wsgi.py", line 4, in <module>
2025-07-24 20:23:36,003:     from flask_app import app as application
2025-07-24 20:23:36,003: ***************************************************
2025-07-24 20:23:36,003: If you're seeing an import error and don't know why,
2025-07-24 20:23:36,003: we have a dedicated help page to help you debug: 
2025-07-24 20:23:36,004: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:23:36,004: ***************************************************
2025-07-24 20:24:01,833: Error running WSGI application
2025-07-24 20:24:01,834: ModuleNotFoundError: No module named 'flask_app'
2025-07-24 20:24:01,834:   File "/var/www/devinthebm_pythonanywhere_com_wsgi.py", line 4, in <module>
2025-07-24 20:24:01,834:     from flask_app import app as application
2025-07-24 20:24:01,834: ***************************************************
2025-07-24 20:24:01,834: If you're seeing an import error and don't know why,
2025-07-24 20:24:01,834: we have a dedicated help page to help you debug: 
2025-07-24 20:24:01,834: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:24:01,834: ***************************************************
2025-07-24 20:24:14,492: Error running WSGI application
2025-07-24 20:24:14,493: ModuleNotFoundError: No module named 'flask_app'
2025-07-24 20:24:14,493:   File "/var/www/devinthebm_pythonanywhere_com_wsgi.py", line 4, in <module>
2025-07-24 20:24:14,493:     from flask_app import app as application
2025-07-24 20:24:14,493: ***************************************************
2025-07-24 20:24:14,493: If you're seeing an import error and don't know why,
2025-07-24 20:24:14,493: we have a dedicated help page to help you debug: 
2025-07-24 20:24:14,493: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:24:14,494: ***************************************************
2025-07-24 20:26:09,818: Error running WSGI application
2025-07-24 20:26:09,825:   File "/var/www/devinthebm_pythonanywhere_com_wsgi.py", line 4, in <module>
2025-07-24 20:26:09,825:     from flask_app import app as application
2025-07-24 20:26:09,825: ***************************************************
2025-07-24 20:26:09,825: If you're seeing an import error and don't know why,
2025-07-24 20:26:09,825: we have a dedicated help page to help you debug: 
2025-07-24 20:26:09,825: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:26:09,826: ***************************************************
2025-07-24 20:26:12,824: ***************************************************
2025-07-24 20:26:12,824: If you're seeing an import error and don't know why,
2025-07-24 20:26:12,824: we have a dedicated help page to help you debug: 
2025-07-24 20:26:12,824: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:26:12,824: ***************************************************
2025-07-24 20:26:17,591: ModuleNotFoundError: No module named 'flask_app'
2025-07-24 20:26:22,421: Error running WSGI application
2025-07-24 20:26:22,422: ModuleNotFoundError: No module named 'flask_app'
2025-07-24 20:26:22,422:   File "/var/www/devinthebm_pythonanywhere_com_wsgi.py", line 4, in <module>
2025-07-24 20:26:22,422:     from flask_app import app as application
2025-07-24 20:26:22,422: ***************************************************
2025-07-24 20:26:22,422: If you're seeing an import error and don't know why,
2025-07-24 20:26:22,422: we have a dedicated help page to help you debug: 
2025-07-24 20:26:22,422: https://help.pythonanywhere.com/pages/DebuggingImportError/
2025-07-24 20:26:22,423: ***************************************************

What did I do wrong?

if anyone is interested in a simplified version with just stuff that don’t need apis or only email etc lmk. also if anyone is interested in having all in 1 with having the copilot bot in it with or without forwarding copilot images to your email, I can add that.

1 Like

sorry. I just realized that when I used Ai to rewrite the instructions it missed this part that when you deploy the downloaded script, when you put the filename you have to make sure the path is and the name is flask_app so the full thing you’ll put in there is /home/yourusername/flask_app.py afterwards it should work.

Thats what I did to begin with, but it doesn’t work.

:+1:

1 Like

your right. Ai apparently botched up here too. in the code you copy pasted into the web tab there’s one crucial character missing: /
here’s where; in sys.path.insert(0, ‘home/yourusername/’)
it’s supposed to be:

sys.path.insert(0, '/home/yourusername/')

the difference is that / means it starts from root rather then looking for such a subfolder which doesn’t exist. sorry.

I wanna switch it in my original post but I don’t see such an option here in the website. could it be its because @anonymousfliphones (admin) edited my script?

if you have something specific post it here.

if you want i could switch it back to your messy post?

no I didn’t mean that. I love the new one! thanks! I was just wondering if there’s a way that I should still be able to edit it cuz there’s just some small stuff I need to change such as the missing / there. I don’t want people to copy paste and then it doesn’t work.

Made wiki now you could edit it

Thanks!!

Don’t really understand.
What should I do?

all you gotta do is in the web tab file where you pasted the few lines of code (open web tab and scroll to wsgi configuration file and click it to edit it) you should locate the line there where it says

sys.path.insert(0, 'home/devinthebm/')

and simply add a
/ before home
so the line will be

sys.path.insert(0, '/home/devinthebm/')
3 Likes

Didn’t help.

extremely strange. thats the exact setup i did. i’ll look into it and get back.

6 posts were merged into an existing topic: Copilot bot for GroupMe SMS

way easier set up for email to SMS:

https://forums.jtechforums.org/t/send-and-recieve-emails-via-sms-easier-set-up/4742