Below is a step-by-step guide to setting up a webhook in Zoho to send a JSON payload to the Print.one API.
Make sure you have access to your Zoho account and the correct Zoho app (e.g., Zoho CRM, Zoho Creator, or Zoho Desk).
Obtain your API key from Print.one. Ensure you use a TEST API key for testing purposes and the LIVE API key when you're ready for production.
Navigate to Zoho and log in to your account.
Choose the Zoho app where you want to set up the webhook. For example:
Zoho CRM
for lead or deal information.
Zoho Creator
for custom forms.
Zoho Desk
for ticket information.
In this example, we'll assume you are using Zoho CRM, but the process is similar for other Zoho apps.
Click on the Settings icon (gear icon) in the top-right corner. Find the "Webhooks" option under Automation or Integrations.
For example:
In Zoho CRM: Navigate to Settings → Automation → Webhooks.
In Zoho Desk: Navigate to Settings → Automation → Webhooks.
Click the "New Webhook" (or "Create Webhook") button.
Fill in the following fields:
Webhook Name: Name the webhook, e.g., "Send to Print.one API".
URL to Notify: Enter the following URL: https://api.print.one/v2/orders
HTTP Method: Select POST
.
Add the following headers to the webhook:
API Key Header:
Key: X-API-KEY
Value: Enter your Print.one API key, which can be found in the Print.one portal under Integrate → API Keys.
Content-Type Header:
Key: Content-Type
Value: application/json
Set up the data you want to send to Print.one. The Print.one API expects a JSON payload containing order information.
In Zoho, you can use dynamic fields (e.g., data from a lead, ticket, or other object). Configure the JSON payload as follows:
Replace {{Field_Name}} with the actual fields from Zoho CRM.
To automate the webhook activation (e.g., when a lead is created):
Navigate to Settings → Automation → Workflows.
Create a new workflow or edit an existing one.
Add the webhook as an action:
Select the webhook you just created.
Configure any additional conditions, such as when the workflow should trigger (e.g., on creating a new lead or deal).
After setting up the webhook, test it.
Create a test record in Zoho (e.g., a new lead) that triggers the workflow.
Check in Print.one to see if the order was received correctly.
If the order status is failed, review the order details to identify the error.
If you use a TEST API key, the order will not be printed or shipped, but a PDF will be generated.
If you use the LIVE API key, the order will be printed and shipped.
If the webhook doesn’t work as expected, verify the following:
API Key: Ensure the X-API-KEY
header is correctly set with the appropriate API key (TEST for testing, LIVE for production).
JSON Payload: Verify the JSON structure and ensure it includes the correct data. Check that all merge variables used in the design (in Print.one) are present in the payload.
URL: Confirm the URL is set to https://api.print.one/v2/orders
Content-Type: Ensure the header is set to Content-Type: application/json
.
Workflow: Ensure the workflow triggers as expected and the webhook is activated on the correct event (e.g., when a lead is created).
Once you've confirmed the webhook works correctly with the TEST API key:
Replace the TEST API key in the header with your LIVE API key.
Run the test again to ensure everything functions correctly.