Formatting messages in Incoming Webhooks

Formatting messages in Incoming Webhooks

Overview  

Incoming Webhooks let you post messages to a Group or Board from external applications, but the format of that message depends on the parameters you send. This article covers the basic formatting options: posting a status update, a message with a URL, an event, or a comment, along with support for mentions, tags, and basic HTML markdown.

For richer post formats such as cards, tables, images, and buttons, see Advanced Formatting Messages in Incoming Webhooks.

What parameters are supported?  

Parameter

Data type or required format

Description

payload*

JSON

The message content and formatting details.

messageType

status/event/comment

The type of post. Defaults to status if not specified.

streamId

Long

The unique ID of the feed.

commentId

Long

The unique ID of the comment.

attachment

File

A file to attach to the post.

 

Notes Keys marked with an asterisk ' * ' are mandatory.

Notes The request must use the "application/x-www-form-urlencoded" format. Requests in any other format will return an error.

Markdown help  

The message key supports basic HTML markdown:

Style

Syntax

Bold

*content*

Italics

_content_

Strikethrough

~content~

Underline

+content+

Anchor

[content](link)

Blockquote

!content

Highlight

`content`

Posting a status update  

To post a simple message using an Incoming Webhook, set the payload parameter with the following JSON keys:

JSON key

Data type or required format

Description

message*

String

The message to display.

title

String

The post title.


Example:

  1. POST
    https://connect.zoho.com/webhook/v1/incoming/intranet/499400157703126?zapikey=XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Content-Type: application/x-www-form-urlencodedpayload={"message":"<b>Service Request</b><br><br>Your service request has been approved. Contact your administrator to proceed further."}

This payload will post a message in the format shown below.

Posting a message with a URL  

To post a message with a URL in it, set the payload parameter with the following JSON keys:

JSON key

Data type or required format

Description

message*

String

The message to display.

title

String

The post title.

linkUrl

URL

A link to the data source.

Example:

  1. POST https://connect.zoho.com/webhook/v1/incoming/intranet/499400157703126?zapikey=XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Content-Type: application/x-www-form-urlencodedpayload={"title":"New feature","message":"Learn more about how adding the Zoho Projects integration in Connect can help you increase your productivity.","linkUrl":"https://www.youtube.com/watch?v=FfsDMdZIg4s"}

This payload will post a message in the format shown below.


Posting event details  

To post an event using an Incoming Webhook, set the payload parameter with the following JSON keys:

JSON key

Data type or required format

Description

eventTitle*

String

The title of the event.

eventDesc

String

A brief description of the event.

eventLocation

String

The location of the event.

startDate*

YYYY-MM-DD, HH:MM

The start date of the event.

endDate

YYYY-MM-DD, HH:MM

The end date of the event.

allDay

Boolean

Set to true if the event runs for the entire day.

Notes
You must set the messageType parameter to event. If you don't, Zoho Connect will treat the post as a status update by default.

Example:

  1. POST https://connect.zoho.com/webhook/v1/incoming/intranet/499400157703126?zapikey=XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Content-Type: application/x-www-form-urlencoded
    Parameters:
    payload={"eventTitle":"Zoholics","eventDesc":"Tech event conducted between Zoho developers and customers.","eventLocation":"Bangalore","startDate":"2020-05-11 10:00","endDate":"2020-06-11 18:00"}
    messageType=event


This payload will post a message in the format shown below.

Info
For an all-day event, include "allDay":"true" in the payload JSON.

Adding a comment  

To post a comment using an Incoming Webhook, set the following parameters:

Parameter

Data type or required format

Description

payload*

JSON

The comment content, in JSON format.

messageType*

comment

The message type of the post.

streamId*

String

The unique ID of the feed.

commentId

String

The unique ID of the comment you're replying to, if applicable.


Example:

  1. POST https://connect.zoho.com/webhook/v1/incoming/intranet/499400157703126?zapikey=XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Content-Type: application/x-www-form-urlencoded
    Parameters:
    payload={"message":"Your request has been assigned to @Michael@test.com."}messageType=comment
    streamId=10500041******

Mentioning a member in a post  

To mention a member, enter @ before their email address.

Example:

  1. payload={"message":"@zillum@zylker.com Please check the book cover and share your thoughts on it.","title":"New book launch"}

Enter # before the word you want to tag.

Example:

  1. payload={"message":"The brochure for our book launch has finally arrived! #newlaunch","title":"New book launch"}

If you have any questions related to Incoming Webhooks, write to us at
support@zohoconnect.com. We're happy to help!