Want your bot to send data to another system, like creating a support ticket, logging feedback, or saving a form response? That’s exactly what the POST method in the Webhook block is designed for.
It allows your bot to push data to external tools such as Zoho Desk, CRMs, or any third-party service that supports APIs.
Let’s walk through what the POST method is, how it works, and when to use it.
What is POST method?
The POST method is used to send data from your bot to another system through an API.
Here are a few practical examples:
- Create a new ticket with the user’s name, email, and issue description.
- Log feedback submitted through the bot into your internal database.
- Push conversation data to tools like Zoho Desk, CRM systems, or analytics platforms.
When should you use the POST method?
Use the POST method when you want your bot to send data, such as:
- A user shares an issue, and you want to create a new support ticket.
- A form is filled out and needs to be saved to Zoho Desk or your internal database. (Example: Save an event registration with name, email, and session selected.)
- A lead is captured through the chatbot and needs to be added to your CRM.
Think of it like this:
The bot passes information to another system so it can perform a specific action based on the user’s responses.
Example Use Case
Let’s say you want to create a new support ticket in Zoho Desk when a user describes their issues in the chat.
Setup:
POST URL: https://desk.zoho.com/api/v1/tickets
Example body of the request (in JSON format):
{
"contact": {
"lastName": "{{user.name}}",
"email": "{{user.email}}"
},
"subject": "User-reported issue",
"description": "{{user.query}}",
"priority": "High",
"departmentId": "1234567890000001"
}
In this JSON:
Name, email, and issue are pulled from the user’s responses during the chat using dynamic variables.
You’ve set a default priority as “High”.
Example response from the API:
{
"ticketNumber" : "773",
"subCategory" : "Sub General",
"statusType" : "Open",
"subject" : "Real Time analysis Requirement",
"departmentId" : "1892000000006907",
}
You can now use this response to confirm the ticket creation and show a message like:
“Thanks {{user.name}}, your ticket has been created with ID TX12345. We’ll get back to you shortly.”
Understanding the Body of the POST Request
The Body is where you define the data to be sent to the external system. Most APIs expect this data in JSON format, though some accept Form Data.
These might include:
- Name
- Email
- Message or issue
- Priority or category
- Any custom fields the API supports
You can:
- Manually type this JSON into the Webhook block
- Upload a .json file if it’s complex (Check with Developers)
- Use dynamic variables like {{user.name}} or {{user.query}} to insert live values from the chat
Form Data
Some APIs (especially older ones or specific services) require Form Data instead of JSON. In such cases, you’ll enter key-value pairs like:
name = {{user.name}}
email = {{user.email}}
message = {{user.query}}
Always check the API documentation to know what format (JSON or Form Data) is expected and what fields are mandatory.
Understanding the differences between Webhook HTTP Methods
GET
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Retrieve data from a server
| - Fetch user details
- Get ticket history
- Retrieve knowledge base articles
| No
| Display a user’s subscription status based on their email.
|
POST
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Submit data to create a new resource
| - Create a support ticket
- Submit a form
- Log user feedback
| Yes (e.g., JSON)
| Create a new ticket in Zoho Desk with user information.
|
PUT
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Update or replace an existing resource
| - Update ticket status
- Modify user contact details
- Change subscription plan
| Yes (full resource)
| Change the priority of a support ticket to “Urgent”
|
PATCH
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Apply partial modifications to a resource
| - Update ticket priority
- Change the user’s phone number
- Modify specific fields
| Yes (particular data)
| Update only the status field of a ticket to “In Progress”.
|
DELETE
Primary Purpose
| Typical Use Cases
| Request Body
| Example Scenario
|
Remove a resource from the server
| - Delete a support ticket
- Unsubscribe a user
- Remove a customer record
| Optional
| Delete a user’s support ticket upon request. |
Benefits of using the POST Method
- Ticket creation or CRM lead capture
- Create records in external systems in real time
- Helps you personalize follow-up messages using the response
- Makes your bot capable of more powerful workflows, like creating records and storing conversations
FAQs
Yes, especially when sent over HTTPS. Just be sure not to expose sensitive information unnecessarily.
Absolutely. Use tools like Postman to test your API call and response. Make sure your JSON body matches the API spec.
Yes. You can upload a local file that contains your request body, especially if it’s too large or complex to enter manually.
Tips
- Start by reading the API documentation of the service you’re connecting to.
- Use variables like {{user.email}} to send personalized data.
- Test your POST request in a tool like Postman before hooking it up to the bot.
- Save values from the response (like ticket ID) and use them later in your bot flow.
- If something breaks, double-check your content type, JSON formatting, and endpoint URL.