Is there a way to use Wolfram technology to do the following?

  1. Search twitter for key words
  2. Email the results
  3. Schedule the task to be done daily

All of the functionality you are looking for is well documented on Wolfram's website, you just need to put it all together.

There are a lot of options you can use once you start exploring it. It is possible to format the body of the email to display what you are looking for, or you can have it come through as an attachment. If you are doing analytics on the information, then using a .WL file is useful. In the past, I have also used Grid to format the data into an easy digestible format and exported as a PDF.

Here is the code for a simple cloud deployed scheduled task that will email you daily the first 10 results from your twitter search attached as a .WL file:

 ScheduledTask[(twitter = ServiceConnect["Twitter"]; 
   tweets = 
    twitter["TweetSearch", "Query" -> "Wolfram Mathematica", 
     MaxItems -> 10]; 
   SendMail[<|"To" -> "your.name@email.com", 
     "Subject" -> 
      "Twitter Search for " <> 
       DateString[{"Day", "-", "MonthNameShort", "-", "Year"}], 
     "AttachedExpressions" -> InputForm[tweets]|>]), 
  "Daily"], "scheduledtwitter"]

Lots of other options you can include if you are so inclined.

I would recommend you test the functions contained in the parenthesis first before you deploy it as a scheduled task. Also, you can change "Daily" to Now for an initial test to make sure things are working right before you set it to regularly run. You can view the tasks and alter/delete them by going to www.wolframclould.com.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.