Send Message Skype in the middle of automation

Hello guys, sorry for my lateness to write for you, but I’m trying to gain the certificate of CTAL, and I have studied a lot. So, I will show one function to send a skype message in the middle of automation. This is very usefull when occurs some error and you have to send on the exactly moment to some developer or responsible.

First you have to download the lib of skype: skype-java-api-1.4.jar , after creates a class, and after the function.

This is my example of function, you have to installed the skype in the machine that will execute the automation.

Add the people will receive this message. In the skype config permits others application use, maybe you have to execute the first time and after, go to skype and enable the advertisement that will be showed, asking for permission of use skype.


package Test;

import;            // Import the classes of lib.

public class MessageSkype_Send {

public static void Errors_Send() throws SkypeException {
try {

ContactList list = Skype.getContactList();

Friend resp = list.getFriend(userIdSkype);        // Change the skype name
resp.send(“(*) Error Automation \n“);            // This is the message that will be send

} catch (Exception e) {


2 thoughts on “Send Message Skype in the middle of automation

  1. Hi Rafaela, how are you?

    Do you know if exists a way to do the inverse? If a send a message to some user, the api gets this message and do some code?

    I see this feature in jenkins, when you send a message to the jenkins user and it starts a build…

    Do you know if this api provides this?

    Thanks, Gustavo Godoy

  2. Hello Gustavo,

    I tested just change the command:

    Friend resp = list.getFriend(userIdSkype);
    resp.send(“(*) Error Automation \n“);


    Friend send = list.getFriend(userIdSkype);
    ChatMessage[] AllRecentMessages =;

    This command, will bring the message in specific position on array of the recent chat. So you have to make some adjusts to catch only the last message or something like that, because you have to know the position on the array of the message, if you don’t know, maybe you have to search in the array for the message. You can use to bring all messages of the chat, but the array will be very extensive.

    Don’t forget the import;

    I hope that I have help you !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.