Xano Actions

Introducing Xano Actions

Build and share reusable visual building blocks

Xano Actions are reusable visual functions that serve as the building blocks for any workflow. Easily connect to various third-party services and modify the business logic to fit your unique use case.

Discover

Browse and discover actions created by the community. Test them directly without logging in.

Create

Build your own custom Actions and share them with anyone.

Install

Easily install Actions into your Xano workspace and integrate them seamlessly into your workflows.

Browse by category
AI

50 actions 2 packages

Analytics

25 actions 3 packages

Asset Management

16 actions 0 packages

Automation

68 actions 3 packages

Development & Coding

14 actions 1 package

Ecommerce

11 actions 1 package

Marketing

18 actions 2 packages

Utilities

91 actions 4 packages

Payment Processing

19 actions 1 package

Featured Actions

Google Gemini/ Gemini -> Generate Video
Overview
This action enables video generation through Google's Gemini API (with models like Veo 3). By providing a prompt and configuring video parameters, you can create unique AI-generated video content via API.

Inputs

Name Type Required Description
geminiapikey text Yes Your Gemini API key (from settings registry).
model text Yes The model to use (e.g., veo-3.0-generate-preview).
prompt text Yes The descriptive prompt for the video.
aspect_ratio enum Yes Desired output aspect ratio (e.g., "16:9", "9:16").
persongeneration enum Yes Person appearance policy (e.g., "allowall", "dont_allow").

Function Stack
Gemini API Request
Sends a POST request to:

https://generativelanguage.googleapis.com/v1beta/models/{model}

Passes the prompt and video-specific parameters (aspect ratio, person generation policy) in the body.
Precondition
Checks for a successful (status 200) response.
Response
Returns the API response result (including video metadata and download instructions).

Example Usage
Request

{
"geminiapikey": "AIzaSyD...",
"model": "veo-3.0-generate-preview",
"prompt": "A cinematic wide shot panning over a futuristic city skyline at sunset",
"aspect_ratio": "16:9",
"persongeneration": "allowall"
}

Response

{
"name": "/veo.../.../.."
}

Notes
The model should be set to the latest supported Gemini video model. Use Veo 3 for best results. You can adjust the prompt and configuration for different styles, content, and policies. Person generation controls the presence and portrayal of people in the resulting video. Download links for generated videos are temporary—be sure to save your files promptly.
Troubleshooting
PERMISSIONDENIED or INVALIDARGUMENT: Check your API key, model name, and input parameters. Video not returned or incomplete: Simplify your prompt or relax constraints for best performance. For current API documentation and supported parameters, reference the Gemini API documentation.


Google Maps/ Google Maps -> Geocoding API
Overview
This Xano action enables you to convert a physical address into geographic coordinates (latitude and longitude) using the Google Maps Geocoding API. It takes an address (and optionally a region) as input, calls the Google Geocoding API, and returns the geocoded location data.

Inputs

Name Type Required Description
googleapikey text Yes Your Google Maps API key (from settings registry).
address text Yes The address you want to geocode.
region text No (Optional) Region code to bias results (e.g., "us", "in").

Function Stack
Google Maps API Request
API Request: Makes a GET request to

https://maps.googleapis.com/maps/api/geocode/json

with the provided address, optional region, and googleapikey.
Precondition: Ensures the response status is 200 (success).
Response
Returns the geocoding result from the Google Maps API response.

Example Usage
Request

{
"address": "1600 Amphitheatre Parkway, Mountain View, CA",
"region": "us"
}

Response

{
"results": [
{
"formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"geometry": {
"location": {
"lat": 37.4224764,
"lng": -122.0842499
}
},
// ... other fields
}
],
"status": "OK"
}

Notes
The googleapikey must be valid and enabled for the Geocoding API. The region parameter is optional but can help bias results toward a specific country. The response includes formatted address, latitude, longitude, and additional location details.
Troubleshooting
REQUEST_DENIED: Check if your API key is correct and has Geocoding API access enabled. ZERO_RESULTS: The address could not be geocoded; verify the address input. OVERQUERYLIMIT: You have exceeded your API quota; review your usage in the Google Cloud Console. Other Errors: Refer to Google Maps Geocoding API documentation for error details.


Google Maps/ Google Maps -> Send Message via WhatsApp
Overview
This function allows you to send a WhatsApp message using the WhatsApp API by calling the Facebook Graph API. You can specify the recipient's phone number and the message content, and the function will handle sending the message to the recipient.

Inputs

Name Type Required Description
whatsappaccountid text Yes The WhatsApp account ID associated with the message-sending feature.
whatsapp_token text Yes The token or authentication key to authenticate the API request to WhatsApp.
to_number text Yes The recipient's phone number in international format (without '+' or '00'). For example, a US phone number would be entered as 11234567890.
message text Yes The content of the message that will be sent to the recipient.
version text Yes The API version to use when making the request to the WhatsApp Graph API.

Function Stack
API Request to WhatsApp API
API Request To: https://graph.facebook.com/{version}/{whatsappaccountid}/messages
Method: POST
Headers:
Authorization: Bearer {whatsapp_token}
Body:

{
"messaging_product" : "whatsapp",
"recipient_type" : "individual",
"to": "+9183277*",
"type": "text",
"text": {
"preview_url": false,
"body": "Hello World"
}
}

Purpose: Sends a POST request to the WhatsApp API with the recipient's phone number and the message to be delivered.
Create Variable: response
Variable: var: response = var: api_response.response.result
Purpose: Stores the response from the Whatsapp API after sending the message.
Response
The function returns the result from the WhatsApp API.

Success Response

{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "+9183277*",
"wa_id": "91832770*"
}
],
"messages": [
{
"id": "wamid.HBgMOTE4MzI3N**"
}
]
}

Error response

{
"success": false,
"error_code": 401,
"message": "Unauthorized: Invalid or missing API token."
}

Example
Input

{
"messaging_product" : "whatsapp",
"recipient_type" : "individual",
"to": "+9183277*",
"type": "text",
"text": {
"preview_url": false,
"body": "Hello World"
}
}

Output

{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "+918327*",
"wa_id": "9183277*"
}
],
"messages": [
{
"id": "wamid.HBgMOTE4MzI3N**"
}
]
}

Automation: HubSpot -> Get Deal
Overview
This function retrieves a specific deal from HubSpot using the deal's ID. It involves setting environment variables, preparing the request, and handling the response from the HubSpot API.

Inputs

Name Type Required Description
hubspotapikey text Yes The API key for your HubSpot account.
deal_id integer Yes The unique identifier of the deal to be retrieved.
properties text[] No A list of deal properties to retrieve.
propertieswithhistory text[] No A list of deal properties with their history to retrieve.

Function Stack
HubSpot API Request
API Request to
https://api.hubapi.com/crm/v3/objects/deals/{deal_id}
Purpose: Sends a GET request to retrieve the specified deal from HubSpot.
Preconditions
Precondition: hubspot_api.response.status == 200
Purpose: Ensures successful retrieval of the deal with HTTP status code 200.
Response
The function returns the result from the HubSpot API response.

Success response

{
"deal_id": 22413038713,
"properties": [],
"propertieswithhistory": [
"closedwonreason"
]
}

Error response

{
"message": "Uh oh! Hubspot returned with an error: Authentication credentials not found. This API supports OAuth 2.0 authentication..."
}

Example
Input

{
"deal_id": 22413038713,
"properties": [],
"propertieswithhistory": [
"closedwonreason"
]
}

Output

{
"id": "22413038713",
"properties": {
"amount": "1456.55",
.
.
.
},
"createdAt": "2024-09-26T12:02:50.213Z",
"updatedAt": "2024-09-26T12:02:50.213Z",
"archived": false
}

Payment Processing: Stripe -> Void Invoice
Overview
This Xano action enables you to void an existing invoice in Stripe by specifying the invoice ID. The action sends a request to the Stripe API to void the invoice and returns the resulting invoice data.

Inputs

Name Type Required Description
stripeapikey text Yes Your Stripe API key (from settings registry).
invoice_id text Yes The ID of the Stripe invoice to void.

Function Stack
Stripe API Request
API Request: Sends a POST request to

https://api.stripe.com/v1/invoices/{invoice_id}/void

using the provided stripeapikey for authentication.
Precondition: Ensures the response status is 200 (success).
Response
Returns the result from the Stripe API response.

Example Usage
Request

{
"stripeapikey": "sktest...",
"invoiceid": "in1JYb2D2eZvKYlo2C..."
}

Response

{
"id": "in_1JYb2D2eZvKYlo2C...",
"object": "invoice",
"status": "void",
// ... other invoice fields
}

Notes
Ensure your Stripe API key is kept secure and not shared publicly. The action requires a valid Stripe invoice ID. Voiding an invoice is irreversible; confirm that the invoice should not be paid before proceeding.
Troubleshooting
401 Unauthorized: Check that your stripeapikey is correct and active.
404 Not Found: Verify the invoice_id exists and is correct.
400 Bad Request: The invoice may already be voided or in a state that cannot be voided. Other Errors: Refer to the Stripe API documentation for additional error details.


Google Maps/ Google Maps -> Autocomplete API
Overview
This Xano action integrates with the Google Maps Places Autocomplete API to provide location-based suggestions as users type. It is designed to enhance user experience by offering predictive search results for addresses and places, using various optional parameters to refine the results.

Inputs

Name Type Required Description
googleapikey text Yes Your Google Maps API key (from settings registry).
input text Yes The text string for which to return place predictions.
session_token text No A unique token for grouping Autocomplete requests (improves billing & usage).
field_mask text No Comma-separated list of fields to include in the response.
latitude text No Latitude for location biasing.
longitude text No Longitude for location biasing.
radius integer No Radius (in meters) for location biasing.
region_code text No Region code to bias results (e.g., "us", "in").

Function Stack
Prepare Parameters
Prepare field_mask Parameter:
Sets the field_mask variable to "*" if not provided, or uses the input value.
Prepare session_token:
Uses the provided session_token or generates a new UUID if not supplied.
API Request
API Request:
Sends a GET request to

https://places.googleapis.com/v1/places:autocomplete

with the relevant parameters (input, sessiontoken, fieldmask, latitude, longitude, radius, regioncode, and googleapi_key).
Precondition
Checks that the API response status is 200 and that a result is present.

Response
Returns the API response result and the session_token.

Example Usage
Request

{
"googleapikey": "AIzaSyD...",
"input": "221B Baker Street",
"latitude": "51.5237",
"longitude": "-0.1585",
"radius": 500,
"region_code": "gb"
}

Response

{
"api_response": [
{
"placeid": "ChIJd8BlQ2BZwokRAFUEcmqrcA",
"description": "221B Baker St, Marylebone, London NW1 6XE, UK",
// ... other fields as specified by field_mask
}
// ... additional predictions
],
"session_token": "d7b6fbb8-4a1d-4c7a-8b8e-9d2d7a6c1e2f"
}

Notes
The googleapikey must have Places API enabled. Using a session_token is recommended for grouping user sessions and optimizing billing. The field_mask parameter controls which fields are returned; use "*" to return all available fields. Location and region parameters help bias results to a specific area or country.
Troubleshooting
REQUEST_DENIED: Ensure your API key is correct and has Places API access enabled. INVALID_REQUEST: Check that the required input parameter is provided. ZERO_RESULTS: No predictions found for the input; try adjusting the input or location bias. Other Errors: Refer to the Google Maps Places API documentation for detailed error handling.


Postmark -> Send Single Email
Overview
This function allows you to send a single email using the Postmark API. It requires parameters such as the sender email address, recipient email address, subject, body (in either HTML or plain text format), and optionally a template ID.

Inputs

Name Type Required Description
postmarkbaseurl text Yes The base url for calling the Postmark API (e.g., "https://api.postmarkapp.com/").
postmarkservertoken text Yes This is the Postmark Server API Token (e.g., "14g8dce4-7054-47c9-a18a-2107e5cf4e41"). This is needed for authentication on endpoints.
from_email text Yes The email address of the sender.
to_email text Yes The email address of the recipient.
subject text Yes The subject line of the email.
html_body text Optional The HTML content of the email message. If provided, it takes precedence over text_body.
text_body text Optional The plain text content of the email message. If provided and html_body is not, it will be used.

Function Stack
Create Variable
Create Variable: api_url
Purpose: Constructs the API URL for sending single emails.
Create Variable
Create Variable: api_token
Purpose: Stores the Postmark API token.
Precondition Logic
Precondition: from_email should not exceed 255 characters.
Purpose: Ensures the sender email address is not too long.
Precondition: from_email is a valid email format.
Purpose: Ensures the sender email address is formatted correctly.
Precondition: to_email is a valid email format.
Purpose: Ensures recipient email address is formatted correctly.
Precondition: to_email should not exceed 50 email addresses.
Purpose: Limits the number of recipients to avoid batch size issues.
Precondition: Either textbody or htmlbody (or both) are provided.
Purpose: Ensures that at least one form of email content is available.
Precondition: html_body is a valid HTML format.
Purpose: Ensures that if HTML is provided, it is well-formed.
API Request
API Request to: https://api.postmarkapp.com/email
Purpose: Sends a POST request to the api_url with the following payload:

{
"from_email": "noreply@yourdomain.com",
"to_email": "user@example.com",
"subject": "Welcome to Our Service",
"html_body": "<h1>Hello, John!</h1><p>Thank you for signing up.</p>", // Optional
"text_body": "Hello, John! Thank you for signing up." // Optional
}

Create Variable: postmark_response
Purpose: Stores the response from the Postmark API.
Create Variable: response
Purpose: Creates a response object containing the result from the Postmark API.
Conditional Check
Conditional: Checks if the response status is 200 and the error code is 0.
If True: Updates the response object to indicate success. If False: Updates the response object to indicate an error.
Response
The function returns either a success message or an error message depending on the outcome.
Success Response

{
"To": "user@example.com",
"SubmittedAt": "2024-10-07T14:33:15.817Z",
"MessageID": "message-id-1",
"ErrorCode": 0,
"Message": "OK"
}

Error Response

{
"ErrorCode": 401,
"Message": "Unauthorized: Missing or incorrect API key."
}

Example
Input

{
"from_email": "noreply@yourdomain.com",
"to_email": "user@example.com",
"subject": "Welcome to Our Service",
"html_body": "<h1>Hello, John!</h1><p>Thank you for signing up.</p>",
"text_body": "Hello, John! Thank you for signing up."
}

Output

{
"To": "user@example.com",
"SubmittedAt": "2024-10-07T14:33:15.817Z",
"MessageID": "message-id-1",
"ErrorCode": 0,
"Message": "OK"
}

Google Gemini/ Gemini -> Image Understanding
Overview
This action enables you to analyze and understand images using the Gemini API. By providing an image file along with a prompt (your question or instruction), you can instruct Gemini to interpret, describe, or extract insights from the image content using a selected Gemini model.

Inputs

Name Type Required Description
geminiapikey text Yes Your Gemini API key (from settings registry).
model text Yes The Gemini model to use (e.g., gemini-1.5-flash, gemini-pro-vision).
prompt text Yes The question, instruction, or prompt about the image.
image file resource Yes The image file you want Gemini to analyze.

Function Stack
Create file resource from image
Reads the file payload from the provided image input.
Gemini API Request
Sends a POST request to:

https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={geminiapikey}

The request body includes both the raw image data and the prompt, following Gemini API’s content structure.
Precondition
Verifies that the response status is 200 to continue processing.
Response
Returns the result from the response: gemini_api.response.result.

Example Usage
Request

{
"geminiapikey": "AIzaSyD...",
"model": "gemini-1.5-flash",
"prompt": "Describe what is happening in this image.",
"image": "(attach image file)"
}

Response

{
"result": "The image shows a group of people hiking on a mountain trail under a clear sky."
}

Notes
The model parameter lets you select among available Gemini models for vision tasks (such as gemini-1.5-flash or similar). The image input must be an actual image file (PNG, JPEG, etc.). Ensure your Gemini API key has the necessary permissions and quota for vision/model usage. This action handles encoding and passing the image to Gemini as required by the API. Troubleshooting
PERMISSION_DENIED or UNAUTHORIZED: Check your Gemini API key and model permissions. INVALID_ARGUMENT: Make sure your prompt is a string and your image is a valid file format. UNSUPPORTEDMEDIATYPE: Only supported image formats (like jpeg, png) can be processed. Other errors: Refer to the Gemini API documentation for detailed troubleshooting guidance.


Brevo -> Send Email
Function Documentation: Brevo → Send Single Email
Overview
This function sends a single email using the Brevo (Sendinblue) API with HTML content. It requires inputs such as the API key, sender and receiver details, email content, and subject. The function validates and processes the input before making a request to the Brevo API.

Inputs

Name Type Required Description
brevoapikey text Yes API key for authenticating with Brevo API.
from object Required The sender's email address.
to object Required The recipient's email address.
message_html text Required The HTML content to be sent.
subject text Required The subject of the email.

Function Stack
Try / Catch Block
Precondition: Check Valid HTML Content
Description: Ensures the HTML content for the email is valid before proceeding.
API Request to Sendinblue
API Request to: https://api.brevo.com/v3/smtp/email
Purpose: Sends the email using the Brevo (Sendinblue) API.
Return Value: The API response is stored as api_response.
Create Variable: response
Variable: var: response = var: api_response.response.result
2 Error Handling (Catch)
Create Variable: response
Purpose: If the API call fails or returns an error, this block catches the error and provides an error message.
Response
The function returns the result of the email send operation, including status and any relevant messages.
Success Response

{
"messageId": "<202410100.1236169@smtp-relay.mailin.fr>",
}

Error response

{
"message": "Key not found",
"code": "unauthorized"
}

Example
Input

{
"from":{
"from_name":"John",
"from_email":"sohansakhare**@gmail.com"
},
"to":{
"to_name":"David",
"to_email":"sajankumar.@unicoco*.com"
},
"email_html":"<html><head></head><body><p>Hello world</p></body></html>",
"subject":"abc"
}

Output

{
"messageId": "<202410100.1236169@smtp-relay.mailin.fr>"
}