HeyGen
Create AI-generated videos with virtual avatars using HeyGen.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("heygen", action, input) resolves with the provider's answer and rejects when HeyGen isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "heygen"} says whether yours can call it.
// workflows/notify.ts: call HeyGen when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellHeygen = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when HeyGen isn't connected.
const output = await step.run("HeyGen", () =>
step.ctx.integrations.invoke("heygen", "create-video-from-template", {
"templateId": "<templateId>",
"title": "<video title>"
}),
);
step.ctx.log("HeyGen answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "heygen",
"piece_action": "create-video-from-template",
"input": {
"templateId": "<templateId>",
"title": "<video title>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/heygen/create-video-from-template" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"templateId":"<templateId>","title":"<video title>"}}'Actions
list_avatars
List Avatars. Retrieve a list of all available avatars.
No input.
create-video-from-template
Create Video from Template. Create a video using a selected template.
| Input | Type | Description |
|---|---|---|
templateIdrequired | id (picked from your account) | Select the template to generate the video. |
titlerequired | text | Title of the generated video. |
captionoptional | boolean | Enable Captions |
includeGifoptional | boolean | Include GIF Preview |
enableSharingoptional | boolean | Enable Public Sharing |
folderIdoptional | id (picked from your account) | Select the folder to store the video. |
brandVoiceIdoptional | id (picked from your account) | Select the Brand Voice to apply to the video. |
callbackUrloptional | text | Webhook URL to notify when video rendering is complete. |
dimensionWidthoptional | number | Video Width |
dimensionHeightoptional | number | Video Height |
variablesoptional | object (depends on other props) | Template Varriables |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
list_videos
List Videos. Retrieve a list of all generated videos.
| Input | Type | Description |
|---|---|---|
limitoptional | number | Maximum number of videos to retrieve (max 100). |
list_voices
List Voices. Retrieve a list of all available voices.
No input.
retrieve_sharable_video_url
Retrieve Sharable Video URL. Generates a public URL for a video, allowing it to be shared and accessed publicly.
| Input | Type | Description |
|---|---|---|
videoIdrequired | text | The ID of the video to generate a shareable URL for. |
retrieve_video_status
Retrieve Video Status. Retrieve the status and details of a video using its ID.
| Input | Type | Description |
|---|---|---|
videoIdrequired | text | The ID of the video to retrieve the status for. |
retrieve-translated-video-status
Retrieve Translated Video Status. Retrieves the status of a translated video.
| Input | Type | Description |
|---|---|---|
videoIdrequired | text | The ID of the translated video to check the status for. |
translate_video
Translate Video. Translate a video into 175+ languages with natural voice and lip-sync.
| Input | Type | Description |
|---|---|---|
videoUrlrequired | text | URL of the video file to be translated. Supports direct URLs, Google Drive, and YouTube. |
titleoptional | text | Optional title of the translated video. |
outputLanguagerequired | id (picked from your account) | Select the language for video translation. |
translateAudioOnlyoptional | boolean | Only translate the audio without modifying faces. |
speakerNumoptional | number | Number of speakers in the video (if applicable). |
brandVoiceIdoptional | id (picked from your account) | Select the Brand Voice to apply to the video. |
callbackIdoptional | text | Custom ID returned in webhook callback. |
callbackUrloptional | text | URL to notify when translation is complete. |
upload_asset
Upload an Asset. Upload media files (images, videos, or audio) to HeyGen. Supports JPEG, PNG, MP4, WEBM, and MPEG files.
| Input | Type | Description |
|---|---|---|
filerequired | file | The file to upload (JPEG, PNG, MP4, WEBM, or MPEG). |
Details
- Id
heygen- Category
- AI and ML
- Tags
- video, avatar, generation, ai, presentation
- Package
@activepieces/piece-heygen@0.1.5- Runs
- Through the integration runner