Skip to content

Zoho: Retrieve webform source code and embed options

Zoho webforms.getWebformPreview: arguments, response, policy and SDK examples.

← Webforms operations · Get started

Operation zoho.getwebformpreview

Provider route: GET /crm/v8/settings/webforms/{id}/actions/preview. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["webforms"]["getWebformPreview"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.webforms.getWebformPreview(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_zoho import ZohoIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.webforms.get_webform_preview(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.idstringRequired within parentMaximum length: 255
queryobjectRequired within parentAdditional keys: not allowed
query.modulestringRequired within parentOne of: Leads

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve webform source code and embed options — response body

Referenced models: Retrieve webform source code and embed options — response body

Retrieve webform source code and embed options — response body
FieldTypePresenceDescription and constraints
$objectRootRepresents the webform preview response, including the source code and embed code options for the webform.
Additional keys: not allowed
webformsarrayRequired within parentContains the list of webform objects with their embed code and source code information.
Maximum items: 1
webforms[]ModelEach itemExpand Retrieve webform source code and embed options — response body — webforms item

Referenced models: Retrieve webform source code and embed options — response body — webforms item

Retrieve webform source code and embed options — response body — webforms item
FieldTypePresenceDescription and constraints
$objectRootRepresents the embed code information for a webform, including the source code, smart URL, and embed code formats.
Additional keys: not allowed
activebooleanRequired within parentIndicates whether the webform is active. Possible values: true - The webform is active. false - The webform is inactive.
code_formatsarrayRequired within parentContains the list of embed code format options available for the webform.
Maximum items: 5
code_formats[]stringEach itemRepresents a single embed code format option available for the webform, such as HTML or iframe.
Maximum length: 255
embed_codestringRequired within parentRepresents the HTML embed code used to embed the webform into an external web page.
Maximum length: 2000
idstringRequired within parentRepresents the unique identifier of the webform.
Maximum length: 255
iframe_codestringRequired within parentRepresents the iframe embed code used to embed the webform in an iframe on an external web page.
Maximum length: 200000
moduleModelRequired within parentExpand Get webforms — response body — webforms item module
namestringRequired within parentRepresents the name of the webform.
Maximum length: 255
smart_urlstringRequired within parentRepresents the smart URL generated for the webform, which can be shared directly with visitors.
Maximum length: 255
source_codestringRequired within parentRepresents the raw HTML source code of the webform.
Maximum length: 200000
typestringRequired within parentRepresents the type of the form. Possible values: webform - A standard webform. portalform - A portal form for registered portal users.
Maximum length: 255

Referenced models: Get webforms — response body — webforms item module

Get webforms — response body — webforms item module
FieldTypePresenceDescription and constraints
$objectRootRepresents the CRM module associated with the webform, including its API name and identifier.
Additional keys: not allowed
api_namestringRequired within parentRepresents the display name of the user who created the webform.
Maximum length: 50
idstringRequired within parentRepresents the unique identifier of the user who created the webform.
Format: int64
Maximum length: 19
Minimum length: 1
Pattern: ^[0-9]+$

SDK function policy ID: zoho.getwebformpreview. Catalog operation: getWebformPreview. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.