Skip to content

Instantly share code, notes, and snippets.

<twilio:config accountSid="yourTwilioAccountSid" authToken="yourTwilioAuthToken"/>
<mongo:config database="yourDatabase" host="yourHost" port="yourPort" name="yourName" password="yourPassword"/>
<flow name="sendSmsToClients">
<http:inbound-endpoint host="localhost" port="9090" path="send-sms"/>
<mongo:find-objects collection="clients"/>
<collection-splitter/>
<twilio:send-sms-message accountSid="yourTwilioAccountSid"
from="yourTwilioPhoneNumber"
<twilio:config name="twilio-default" accountSid="${twilio.account.sid}" authToken="${twilio.auth.token}"/>
<mongo:config database="yourDatabase" host="yourHost" port="yourPort" name="yourName" password="yourPassword"/>
<flow name="sendSmsToClients">
<http:inbound-endpoint host="localhost" port="9090" path="send-sms"/>
<mongo:find-objects collection="clients"/>
<collection-splitter/>
<twilio:send-sms-message accountSid="yourTwilioAccountSid"
from="yourTwilioPhoneNumber"
to="#[map-payload:phone]"
body="Hi #[map-payload:name]! We are happy to announce we released … check our website …. "/>
</flow>
<mongo:find-objects collection="clients" />
<collection-splitter/>
<collection-splitter/>
<twilio:send-sms-message accountSid="yourTwilioAccountSid"
from="yourTwilioPhoneNumber"
to="#[map-payload:phone]"
body="Hi #[map-payload:name]! We are happy to announce we released … check our website …. "/>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-twilio</artifactId>
<version>1.0</version>
</dependency>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:twilio="http://www.mulesoft.org/schema/mule/twilio"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/twilio http://www.mulesoft.org/schema/mule/twilio/1.0/mule-twilio.xsd"
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
">
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repsitory>
</repositories>