Intepreting text messages using Python - python

Is it possible to create a python script that allows you to intepret messages received on your phone?
For example, when you receive an OTP on your phone, the computer can process it and use the code to log in to a website. For Macbooks, its possible to connect your iphone's messages to your Macbook, such that when a message is received on the iphone, it will also be forwarded to your mac. Thus, I plan to use this function as part of my python automation process that can utilise the OTP received on my devices to log in to a specfic website without having to manually key it in everytime it is being requested.
I tried searching online but there doesn't seem to have a solution to this

Related

Send message WhatsApp with python and selenium

I sent a WhatsApp message from Python, selenium. It opens WhatsApp Web and sends a message to it, and it appears within a second, but I open the chat, and the message does not reach the number that I entered in the code, and this error appears
It looks like maybe the problem could be a permission with your device (maybe turning it into developer mode could help), but I think that an easier option would be to use the library pywhatkit. It is an easier way to send Whatsapp messages with python and there are many online resources to help you learn how to use it. https://pypi.org/project/pywhatkit/

Automated emails via Microsoft Graph

Is it possible to send auto responses via Microsoft Graph from an O365 email address?
I am building a booking system using Python and Graph in which School's can book online educational sessions. Once they've finished the booking process I would like automated emails to be sent to them and the company. Is this possible via graph without a user being logged in or will I have to use something like SendGrid instead?
I know sending emails once signed in is simple enough but I just need automation from something such as noreply#companyname.com.
Thanks!
Yes, you can send emails from an O365 email address by using Sendmail call.
You need to create Azure AD based workflow (say, daemon based app
will work in your scenario). Here's the sample
In case of
bulk emails and outside of Graph, yes you can consider options like
sendgrid!!

Connecting Google Apps Script to personal computer to run a program

I’m not sure if there is a better way of describing my issue, but here goes:
I have written a program on my personal computer (python) that I can run, but I want to run it when triggered by receiving an email automatically.
In other words, when I receive an email with a certain header/text, run this specific program.
What is a secure way of sending this signal to my computer such that it will queue to run when I am logged in? My computer is a laptop and is frequently asleep and I don’t want to lose the signal to run the program.
Thank you in advance!
After a few months, I've come up with an answer - configuring your email with IMAP. I was able to do this with gmail.
There is a built-in IMAP library for python called imaplib that allows you to do the trick.
Basically you can query the inbox and search for a file every X minutes, and run a command if a specific type of email is found.
(Idea from mrooney/minapi)

How do you register a python-based client with GCM (Google Cloud Messenger) to get a registration_id for the device?

I have been trying to figure out how to use one of the following python packages to create a python-based client that is capable of receiving XMPP-based messages via Google Cloud Messenging.
https://github.com/geeknam/python-gcm
https://github.com/daftshady/py-gcm
https://pypi.python.org/pypi/gcm-client/
https://github.com/pennersr/pulsus
From all I can see, (e.g., the documentation for gcm-client), these packages can send messages to other clients that are identified by registration_id. But how do I get a registration IDs for each client in the first place? In other words, how do I register the client-app that I am creating so that it can receive messages?
It is starting to seem to me that these are not clients per-se, but just libraries that can be used to push messages to clients. I hope that I am wrong about that and just missing a key concept.
Each client application has to call the getRegistrationId() to get the registration id once. Then they can receive messages. A more detailed function call is here
I hope this give you an idea on client devices. :)

Instagram Python API subscribe to tags on Raspberry Pi

I am working on a project, where I want to be able to retrieve real-time updates if users upload a picture on Instagram with a specific tag (a custom action should be executed when a user uploads a picture with a specific tag). The whole thing should be written in Python and should be running on a stand-alone Raspberry Pi.
As far as I have understood the Python Instagram API sends a GET request to the specified callback url which needs to respond with the hub.challenge parameter and so on. This means that the Python Script needs to run on the Server that is also hosting the callback url right? Which would mean that I can not do this on a Raspberry Pi.
Am I missing something here? I also built a similar thing with the Twitter Streaming API and it was not a problem at all!
Thanks in advance!
If you successfully used twitter on raspberry (I did it also, with Twython, which was fun), you can just use ifttt to send a tweet automatically each time there's a new photo on instagram. With the raspberry, you can check for new tweets regularly.

Categories