{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/493","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/493/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/493/events","html_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/issues/493","id":360446170,"node_id":"MDU6SXNzdWUzNjA0NDYxNzA=","number":493,"title":"Send multiple messages with twilio binding","user":{"login":"julielerman","id":5007120,"node_id":"MDQ6VXNlcjUwMDcxMjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5007120?v=4","gravatar_id":"","url":"https://api.github.com/users/julielerman","html_url":"https://github.com/julielerman","followers_url":"https://api.github.com/users/julielerman/followers","following_url":"https://api.github.com/users/julielerman/following{/other_user}","gists_url":"https://api.github.com/users/julielerman/gists{/gist_id}","starred_url":"https://api.github.com/users/julielerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julielerman/subscriptions","organizations_url":"https://api.github.com/users/julielerman/orgs","repos_url":"https://api.github.com/users/julielerman/repos","events_url":"https://api.github.com/users/julielerman/events{/privacy}","received_events_url":"https://api.github.com/users/julielerman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-14T20:35:19Z","updated_at":"2018-09-14T21:29:54Z","closed_at":"2018-09-14T21:29:54Z","author_association":"NONE","body":"Twilio API lets you send one message per request. (https://support.twilio.com/hc/en-us/articles/223181548-Can-I-set-up-one-API-call-to-send-messages-to-a-list-of-people-)\r\n\r\nI've used their API direclty with azure functios in C# to iterate thorugh a list of phone numbers and send messages. And I had to wait 1 second in between each message. (Easy enough with C#)\r\n\r\nNow I'm using this binding and I'm in NodeJS (where my skills are not as strong a C#).\r\nI can't figure out how to loop through numbers and push the messages out.\r\nIs the binding limited to one message on the context? Is tehre a explicit SEND method?\r\nHere is my function. It is only sending out ONE message. \r\n```\r\nmodule.exports = function (context, documents, subscriberList) {\r\n    if (!!documents && documents.length > 0) {\r\n        context.log('Document Id: ', documents[0].id);\r\n        //context.bindings.message = {};\r\n        subscriberList.forEach(\r\n            subscriber => {\r\n                context.log(subscriber.phone);\r\n                context.bindings.message = {\r\n                    body : \"Hello\" + subscriber.phone,\r\n                    to : subscriber.phone\r\n                }\r\n             }\r\n        )\r\n    }\r\n    context.done();\r\n}\r\n```\r\nI did try to place the message into a SetTimeOut method but still only got one text.\r\n\r\nThanks for any help. I'm currently doing this in the portal with Azure Functions v1 and the built in Twilio binding. I will move this to 2 using the webjobs 3.0.0-rc1 package (in VS Code, not the portal, for testing)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/comments/421489581","html_url":"https://github.com/Azure/azure-webjobs-sdk-extensions/issues/493#issuecomment-421489581","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-extensions/issues/493","id":421489581,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTQ4OTU4MQ==","user":{"login":"julielerman","id":5007120,"node_id":"MDQ6VXNlcjUwMDcxMjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5007120?v=4","gravatar_id":"","url":"https://api.github.com/users/julielerman","html_url":"https://github.com/julielerman","followers_url":"https://api.github.com/users/julielerman/followers","following_url":"https://api.github.com/users/julielerman/following{/other_user}","gists_url":"https://api.github.com/users/julielerman/gists{/gist_id}","starred_url":"https://api.github.com/users/julielerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julielerman/subscriptions","organizations_url":"https://api.github.com/users/julielerman/orgs","repos_url":"https://api.github.com/users/julielerman/repos","events_url":"https://api.github.com/users/julielerman/events{/privacy}","received_events_url":"https://api.github.com/users/julielerman/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T21:29:54Z","updated_at":"2018-09-14T21:29:54Z","author_association":"NONE","body":"ahh , just set message= an array of messages!!\r\nduh.\r\n:)\r\n"}}
{"actor":{"display_login":"julielerman"}}