Understand advanced formatting options
Advanced formatting lets you present webhook posts in a richer format instead of plain text, and the same formatting support is available for comments as well. In addition to a card, you can use slides with these supported types: table, label, list, and images. The base slide structure uses type, title, text, data, and optional buttons, and a post can contain up to 5 buttons.
A card can include title, text, and thumbnail. In the referenced format, the card title is limited to 100 characters, the card text is limited to 200 characters, and the thumbnail image size is limited to 1000 KB.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"A new profile has been added.","card":{"title":"Speaker profile","text":"*Role* : Product Lead <br> *Region* : APAC","thumbnail":"https://example.com/images/speaker.png"}}'
Use a table slide when you want to show structured data. A table can contain up to 20 headers and 50 rows, and each header and value can contain up to 100 characters.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Weekly metrics summary","slides":[{"type":"table","title":"Engagement summary","text":"Top metrics for this week","data":{"headers":["Metric","Value"],"rows":[{"Metric":"Posts","Value":"42"},{"Metric":"Comments","Value":"128"}]}}]}'
Use a label slide when you want to display key-value pairs, such as labels and linked resources.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Hi guys! Checkout my new YOUTUBE video.","slides":[{"type":"label","title":"New Training Video is OUT","data":[{"Q1":"[Revenue report](https://example.com/q1)"},{"Q2":"[Revenue report](https://example.com/q2)"},{"Q3":"[Revenue report](https://example.com/q3)"}]}]}'
Use a list slide when you want to summarize a set of points in order or as a checklist-style update.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Here are the event details.","slides":[{"type":"list","title":"Key points","text":"Topics covered in today'\''s session","data":["Review the event highlights","Share Insights"]}]}'
Use an image slide when you want to embed one or more image URLs in the webhook post.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Weekly onboarding report","slides":[{"type":"images","title":"Engagement charts","data":["https://example.com/chart1.png","https://example.com/chart2.png","https://example.com/chart3.png"]}]}'
If a post needs extra attention, set styles.highlight to true.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Please review the community guidelines.","slides":[{"type":"label","title":"Required documents","data":[{"Policy":"[Open document](https://example.com/policy)"}]}],"styles":{"highlight":"true"}}'
CTA buttons are added through the buttons array. Each button uses label, hint, and action. In the referenced format, the label can contain up to 20 characters, the hint can contain up to 100 characters, and the supported action type shown is open.url. The action data can include separate destinations for web, iOS, and Android.
curl --request POST \
--url '<URL got from the configuration>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'payload={"message":"Join the session if you are available.","buttons":[{"label":"Join","hint":"Open the event link","action":{"type":"open.url","data":{"web":"https://example.com/join","iOS":"https://example.com/ios/join","Android":"https://example.com/android/join"}}}]}'
If you need further assistance while setting up Incoming Webhooks in Zoho CommunitySpaces, contact us at support@zohocommunityspaces.com.