diff --git a/README.md b/README.md index 8fed076..b759b44 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,6 @@ notify: name: greenapi instance_id: #Set the instanceid token: #Set the greenapi token. - target: #Comma separated values. Contact should end with @c.us and group with @g.us ``` * instance_id is the Green API instance id. @@ -80,4 +79,39 @@ notify: * Target is the chat/contact/group id to send the message to: * For groups, the id should end with *@g.us* * For chats, the id should end with *@c.us* - * You can set up to 3 targets, separated with commas **123@g.us,456@c.us,789@g.us**. The message wil be sent to all. + + +## Sending a message +To Send a message you call the service and provide the following paramaters: +* message (**Required**): Test to send. +* target (**Required**): Tha chat/group ir to send the message to. + +![Send text message](screenshots/text_message.png) + +Or from Yaml mode: +```yaml +service: notify.greenapi +data: + message: New Whatsapp component + target: 972*********@c.us +``` + +### Optional - Attache media to message +To send message with media, add the following to the data parameter: +* file : [Path to the file] + +![Send media](screenshots/send_media.png) + +Or from Yaml mode: +```yaml +service: notify.greenapi +data: + message: New Whatsapp component + target: 972*********@c.us + data: + file: /config/images/Capture.png + +``` + +# Important +### If the path to the file does not exists no message will be sent. \ No newline at end of file diff --git a/screenshots/send_media.png b/screenshots/send_media.png new file mode 100644 index 0000000..5759e87 Binary files /dev/null and b/screenshots/send_media.png differ diff --git a/screenshots/text_message.png b/screenshots/text_message.png new file mode 100644 index 0000000..d128fcc Binary files /dev/null and b/screenshots/text_message.png differ