Postings tasks

Last updated: 2021-10-12 Contributors Byrne Reese
Edit this page

Using tasks in RingCentral, teams can better assign action items following a meeting, keep track of personal to-do lists, or even sychronize project management tasks from external systems. Simply put, at the end of the day all of our lives can be boiled down to a set of tasks we are responsible for, and tasks in RingCentral team messaging cam help us keep track of it all.

Using the RingCentral API, the creation and management of tasks can be completely automated.

Posting a task via the REST API

Select your preferred language below.

const RingCentral = require('@ringcentral/sdk').SDK

RINGCENTRAL_CLIENTID = '<ENTER CLIENT ID>'
RINGCENTRAL_CLIENTSECRET = '<ENTER CLIENT SECRET>'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

RINGCENTRAL_USERNAME = '<YOUR ACCOUNT PHONE NUMBER>'
RINGCENTRAL_PASSWORD = '<YOUR ACCOUNT PASSWORD>'
RINGCENTRAL_EXTENSION = '<YOUR EXTENSION, PROBABLY "101">'

CHAT_ID = '<GROUP ID>'

var rcsdk = new RingCentral({ server: RINGCENTRAL_SERVER,
                  clientId: RINGCENTRAL_CLIENTID,
                  clientSecret: RINGCENTRAL_CLIENTSECRET });
var platform = rcsdk.platform();
platform.login({ username: RINGCENTRAL_USERNAME,
         password: RINGCENTRAL_PASSWORD,
         extension: RINGCENTRAL_EXTENSION })

platform.on(platform.events.loginSuccess, () => {
    post_task( CHAT_ID )
})

async function post_task( group ) {
    try {
    var resp = await platform.post('/restapi/v1.0/glip/chats/'+group+'/tasks', {
        "subject": "You need to do X",
        "assignees": {
        "id": "<ID>"
        },
        "description": "In this task assignees will need to do x, y and z."
    });
    var jsonObj = await resp.json()
    console.log( JSON.stringify(jsonObj) )
    } catch (e) {
    console.log(e)
    }
}
from ringcentral import SDK

RINGCENTRAL_CLIENTID = '<ENTER CLIENT ID>'
RINGCENTRAL_CLIENTSECRET = '<ENTER CLIENT SECRET>'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

RINGCENTRAL_USERNAME = '<YOUR ACCOUNT PHONE NUMBER>'
RINGCENTRAL_PASSWORD = '<YOUR ACCOUNT PASSWORD>'
RINGCENTRAL_EXTENSION = '<YOUR EXTENSION, PROBABLY "101">'

CHAT_ID = '<GROUP ID>'

rcsdk = SDK( RINGCENTRAL_CLIENTID,
             RINGCENTRAL_CLIENTSECRET,
             RINGCENTRAL_SERVER)
platform = rcsdk.platform()
platform.login(RINGCENTRAL_USERNAME,
               RINGCENTRAL_EXTENSION,
               RINGCENTRAL_PASSWORD)

endpoint = "/restapi/v1.0/glip/chats/" + CHAT_ID + '/tasks'
note = {
    "title": "This is a note",
    "body": "<strong>heading</strong><br><br>Any HTML can be entered here."
}

resp = platform.post(endpoint, note)
print(resp.text())
<?php
require(__DIR__ . 'vendor/autoload.php');

$RINGCENTRAL_CLIENTID = '<ENTER CLIENT ID>';
$RINGCENTRAL_CLIENTSECRET = '<ENTER CLIENT SECRET>';
$RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com';

$RINGCENTRAL_USERNAME = '<YOUR ACCOUNT PHONE NUMBER>';
$RINGCENTRAL_PASSWORD = '<YOUR ACCOUNT PASSWORD>';
$RINGCENTRAL_EXTENSION = '<YOUR EXTENSION, PROBABLY "101">';

$CHAT_ID = '<GROUP ID>';

$rcsdk = new RingCentral\SDK\SDK($RINGCENTRAL_CLIENTID,
                                 $RINGCENTRAL_CLIENTSECRET,
                 $RINGCENTRAL_SERVER);

$platform = $rcsdk->platform();
$platform->login($RINGCENTRAL_USERNAME,
             $RINGCENTRAL_EXTENSION,
         $RINGCENTRAL_PASSWORD);

$endpoint = "/restapi/v1.0/glip/chats/"+CHAT_ID+"/notes";
$params = array(
    "subject" => "You need to do X",
    "assignees" => array( "id" => "<ID>" ),
    "description" => "In this task assignees will need to do x, y and z."
);

$resp = $platform->post($endpoint, $params);
print($resp->text());
?>
require 'ringcentral'

RINGCENTRAL_CLIENTID = '<ENTER CLIENT ID>'
RINGCENTRAL_CLIENTSECRET = '<ENTER CLIENT SECRET>'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

RINGCENTRAL_USERNAME = '<YOUR ACCOUNT PHONE NUMBER>'
RINGCENTRAL_PASSWORD = '<YOUR ACCOUNT PASSWORD>'
RINGCENTRAL_EXTENSION = '<YOUR EXTENSION, PROBABLY "101">'

CHAT_ID = '<GROUP ID>'

rc = RingCentral.new(RINGCENTRAL_CLIENTID,
                     RINGCENTRAL_CLIENTSECRET,
                     RINGCENTRAL_SERVER)
rc.authorize(username: RINGCENTRAL_USERNAME,
             extension: RINGCENTRAL_EXTENSION,
             password: RINGCENTRAL_PASSWORD)

resp = rc.post('/restapi/v1.0/glip/chats/'+CHAT_ID+'/tasks', payload: {
    "subject": "You need to do X",
    "assignees": {
       "id": "<ID>"
    },
    "description": "In this task assignees will need to do x, y and z."
})

puts resp.body

Tasks Schema

Please consult our API Reference for creating a task to learn more about the following options:

  • start and due dates
  • color and appearance
  • task recurrence
  • assignees
  • attachments
  • sections/categories

Keep learning

Using the Tasks API you can do more than just create a task, you can also: