twilio

package
v0.5.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

README

tibco-twilio

This activity provides your flogo application the ability to send a SMS via Twilio.

Installation

flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/twilio

Schema

Inputs and Outputs:

{
  "input":[
    {
      "name": "accountSID",
      "type": "string"
    },
    {
      "name": "authToken",
      "type": "string"
    },
    {
      "name": "from",
      "type": "string"
    },
    {
      "name": "to",
      "type": "string"
    },
    {
      "name": "message",
      "type": "string"
    }  
  ],
  "output": []
}

Settings

Setting Description
accountSID The Twilio account SID
authToken The Twilio auth token
from The Twilio number you are sending the SMS from
to The number you are sending the SMS to
message The SMS message
Note:
Phone numbers should be in the format '+15555555555'

Configuration Examples

Simple

Configure a task in flow to send 'my text message' to '617-555-5555' via Twilio:

{
  "id": 3,
  "type": 1,
  "activityType": "tibco-twilio",
  "name": "Send Text Message",
  "attributes": [
    { "name": "accountSID", "value": "A...9" },
    { "name": "authToken", "value": "A...9" },
    { "name": "from", "value": "+12016901385" },
    { "name": "to", "value": "+16175555555" },
    { "name": "message", "value": "my text message" }
  ]
}
Advanced

Configure a task in flow to send 'my text message' to a number from a REST trigger's query parameter:

{
  "id": 3,
  "type": 1,
  "activityType": "tibco-twilio",
  "name": "Send Text Message",
  "attributes": [
    { "name": "accountSID", "value": "A...9" },
    { "name": "authToken", "value": "A...9" },
    { "name": "from", "value": "+12016901385" },
    { "name": "message", "value": "my text message" }
  ],
  "inputMappings": [
    { "type": 1, "value": "[T.queryParams].From", "mapTo": "to" }
  ]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new TwilioActivity

Types

type TwilioActivity

type TwilioActivity struct {
	// contains filtered or unexported fields
}

TwilioActivity is a Twilio Activity implementation

func (*TwilioActivity) Eval

func (a *TwilioActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*TwilioActivity) Metadata

func (a *TwilioActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL