Open Read SMS

Discussion in 'Join' started by Christopher Wilson, Oct 8, 2018.

  1. Christopher Wilson

    Christopher Wilson New Member

    Joined:
    Oct 8, 2018
    Messages:
    9
    Likes Received:
    0
    Been doing some shopping in behalf of some clients, and I think Join may be the best answer to a few problems we are experiencing, but I don't see one specific function.
    Can you tell me if the function exists, before I enter a ticket (or resign myself to using a different software)?

    How do I read the contents of a received SMS into my database?

    Use case: I have clients with lists of customers who have opted in to SMS messaging for communication. As part of a larger solution, we want to use information from these lists and quickly send out certain SMS messages to certain customers. This appears to be trivial with the API (https://joaoapps.com/join/api/). If a large number of SMS will be sent at once, some responses will surely return. My clients want to keep good records of how their customers respond, and so take that SMS response and record it into a database, with a timestamp and the customer phone number. Asking (and paying) a secretary to sit at the computer or phone and watch for responses, then retype (or even copy/paste) those responses into a data entry tool is not something they would like to do. It also defeats the purpose, to an extent, of automating the sending of the original SMS. I can create a tool that listens for responses from the Join API, but I don't see a call to listen for. Can I (using API, or one of your other applications) still read text responses into my database?

    Here is an example of how a different app reads the contents of a received SMS: https://stackoverflow.com/a/39219505/6099655
     
  2. Christopher Wilson

    Christopher Wilson New Member

    Joined:
    Oct 8, 2018
    Messages:
    9
    Likes Received:
    0
    I might have found one idea, but I don't like it.
    Looks like, if the device has an SD card, I could use the Tasker 'Received Text' Event to trigger the 'Write File' Action, creating a .csv with the parameters. Problems include 1) not knowing where to find documentation (do the parameters include body, sender, and time stamp all three), and 2) figuring out how to reliably send a file to the computer my database is on, in such a way that it can be read automatically (my best idea thus far is to build a webservice and schedule Tasker to 'HTTP Post' the file periodically... that CAN'T be the best way to do this). I also don't know if this will conflict with Join.

    What is the correct way?
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    6,898
    Likes Received:
    599
    I think your solution might be:
    • Log SMS to a file with Tasker like you mentioned
    • Send that file with Join to your PC when needed :)
    Would this work for you?
     
  4. Christopher Wilson

    Christopher Wilson New Member

    Joined:
    Oct 8, 2018
    Messages:
    9
    Likes Received:
    0
    Thank you. I missed the 'Send A File' Action under the Join capabilities. As long as Join can put the file directly into the filesystem without user intervention or prompts, this would work. I can set a listener for when the file changes on the machine that holds the database, which would trigger the processing of the file.

    Now, where do I find documentation for the parameters of 'Received Text' in Tasker? Is that a different forum?
     
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    6,898
    Likes Received:
    599
    Is this maybe what you need? :)
     
  6. Christopher Wilson

    Christopher Wilson New Member

    Joined:
    Oct 8, 2018
    Messages:
    9
    Likes Received:
    0
    ...Maybe. https://tasker.joaoapps.com/userguide/en/help/eh_index.html tells me that both 'Sender' and 'Content' are parameters, but doesn't tell me where they are in the array. https://tasker.joaoapps.com/userguide/en/variables.html tells me that %TIME will give me the system time (no seconds, maybe I can use %TIMES to get seconds?) of when the 'Write File' Action is executing, but not necessarily the timestamp of the SMS itself. But, it doesn't speak to the contents of the 'Received Text' Event array. From other sites, I have seen the parameters %SMSRN %SMSRB for 'Received Text Name' and 'Received Text Body', though, so I might not need more than this.

    To be clear, when using the 'Send A File' Action, does Join put the file directly into the filesystem of the receiving device without user intervention or prompts?
     
    Last edited: Oct 12, 2018 at 2:18 PM
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    6,898
    Likes Received:
    599
    It does if you use the Chrome extension and enable the option to download files automatically :)
     
: api, sms

Share This Page