0

How do I create a Logic App to receive an SMS? I made some progress in my question here

I have been studying the information I found here and have configured the Twilio Webhook to Call the Http endpoint when a message comes in.

following instructions similar to this enter image description here

I copied the Request Body JSON from the instructions.

If I the Add A Twilo -Get Message Action it asks for the Unique SID of the message. I can't know this at Logic App Design Time, so how do I get it?

enter image description here

Kirsten
  • 15,730
  • 41
  • 179
  • 318
  • studying https://stackoverflow.com/questions/30623690/receiving-sms-and-storing-it-in-database-using-twilio?rq=1 – Kirsten Nov 28 '17 at 02:07
  • I would continue following [this blog post you mentioned](https://blog.mexia.com.au/triggering-an-azure-logic-app-with-an-sms-using-twilio). You need to set up your Logic app to receive an HTTP request as a trigger and when you set that up you get a URL to make a POST request to. You need to take that URL and enter it in the config for your Twilio number (parts 2 and 3 in the post). Have you got that far? – philnash Nov 28 '17 at 02:35
  • Yes, thank you. I updated the question. – Kirsten Nov 28 '17 at 03:32
  • 1
    You don’t need to get the message using the Twilio action when it comes in to your HTTP endpoint because it sends all its details to the endpoint in the body of the request. What do you intend to do with the message once it arrives? – philnash Nov 28 '17 at 03:34
  • I want to add a record to a database with the message as contents – Kirsten Nov 28 '17 at 08:32
  • 1
    Then you need to connect your HTTP Webhook trigger to a database action. Have you tried that? – philnash Nov 28 '17 at 22:57
  • I don't know how to do that. I have asked about it at https://stackoverflow.com/questions/47545053/how-do-i-add-a-record-to-azure-table-storage-using-logic-app – Kirsten Nov 29 '17 at 04:29
  • Have you checked the documentation on adding an [Azure SQL database](https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure) and then the [insert row connector](https://learn.microsoft.com/en-us/connectors/sql/#Insert_row)? – philnash Nov 29 '17 at 04:32

1 Answers1

1

Instead letting Logic App to "retrieve" the message from Twilio, as mentioned in the comments, you should set up a webhook in Twilio's settings page to invoke Logic App ('s request trigger).

Derek Li
  • 3,089
  • 2
  • 25
  • 38
  • I updated the question to show I am setting up a webhook in Twilio. It is under "Manage Numbers" not under settings. I think @philnash is right I should not be using the Twilio - Get Message action in the Logic App. I wonder what that action can be used for. – Kirsten Nov 29 '17 at 03:52
  • Your answer is correct in that I don't need to set the Logic App to "retreive" the message because of the web hook. – Kirsten Nov 29 '17 at 04:36