Browse by category
Featured Actions
Function Documentation: QuickBooks -> Create Payment Quickbooks API documentation Overview This function creates a payment in QuickBooks by making an API call. It uses the QuickBooks API with the provided realm ID, amount, and consumer reference. This action works on production environment only, for sandbox environment refer documentation at https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/payment#create-a-payment. Inputs quickbooksrealmid (registry/text) Required Description: The QuickBooks realm ID associated with the account. Example: quickbooksrealmabc123 amount (decimal) Required Description: The amount of the payment to be created. Example: 100.50 consumer_ref (integer) Required Description: A reference number associated with the consumer. Example: 12345 quickbooksapitoken (registry|text) Required Description: The JWT token used to authenticate requests to the quickbooks API. Example: xkeysib-... Function Stack Try / Catch Block QuickBooks API Call API Request to https://quickbooks.api.intuit.com/v3/company/{quickbooksrealmid}/payment Purpose: Sends a payment creation request to QuickBooks using the realm ID, amount, and consumer reference. Return Value: The API response is stored as response. Response Variable Variable: var: response = var: quickbooksapiresponse.response Purpose: Captures the response returned by the QuickBooks API. Error Handling (Catch) Create Variable: response Purpose: Catches and handles any errors that occur during the QuickBooks API call and logs the error message. Response The function returns the result of the QuickBooks payment creation. Success Response `json { "Payment": { "CustomerRef": { "value": "20", "name": "Red Rock Diner" }, "DepositToAccountRef": { "value": "4" }, "TotalAmt": 25, "UnappliedAmt": 25, "ProcessPayment": false, "domain": "QBO", "sparse": false, "Id": "150", "SyncToken": "0", "MetaData": { "CreateTime": "2024-10-11T07:17:33-07:00", "LastUpdatedTime": "2024-10-11T07:17:33-07:00" }, "TxnDate": "2024-10-11", "CurrencyRef": { "value": "USD", "name": "United States Dollar" } }, "time": "2024-10-11T07:17:32.610-07:00" } ` Error Response `json { "type": "error", "error": { "code": "paymentcreationfailed", "message": "Failed to create the payment due to an invalid realm ID." } } ` Example Input `json { "quickbooksrealmid": "{quickbooksrealmid}", "amount": "{amount}", "consumerref": "{consumerref}" } ` Output `json { "Payment": { "CustomerRef": { "value": "20", "name": "Red Rock Diner" }, "DepositToAccountRef": { "value": "4" }, "TotalAmt": 25, "UnappliedAmt": 25, "ProcessPayment": false, "domain": "QBO", "sparse": false, "Id": "150", "SyncToken": "0", "MetaData": { "CreateTime": "2024-10-11T07:17:33-07:00", "LastUpdatedTime": "2024-10-11T07:17:33-07:00" }, "TxnDate": "2024-10-11", "CurrencyRef": { "value": "USD", "name": "United States Dollar" } }, "time": "2024-10-11T07:17:32.610-07:00" } `

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 postmarkbaseurl (registry|text) Required Description: The base url for calling the Postmark API (e.g., "https://api.postmarkapp.com/"). postmarkservertoken (registry|text) Required Sensitive data Description: This is the Postmark Server API Token (e.g., "14g8dce4-7054-47c9-a18a-2107e5cf4e41"). This is needed for authentication on endpoints. from_email (text) Required Description: The email address of the sender. Example: noreply@yourdomain.com to_email (text) Required Description: The email address of the recipient. Example: user@example.com subject (text) Required Description: The subject line of the email. Example: Welcome to Our Service html_body (text) Optional Description: The HTML content of the email message. If provided, it takes precedence over text_body. Example: <h1>Hello, John!</h1><p>Thank you for signing up.</p> text_body (text) Optional Description: The plain text content of the email message. If provided and html_body is not, it will be used. Example: Hello, John! Thank you for signing up. 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: `json { "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 Create Variable: postmark_response Purpose: Stores the response from the Postmark API. Create Variable 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 `json { "To": "user@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" } ` Error Response `json { "ErrorCode": 401, "Message": "Unauthorized: Missing or incorrect API key." } ` Example Input `json { "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 `json { "To": "user@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" } `

WhatsApp API → 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 whatsappaccountid (registry/text) Required Description: The WhatsApp account ID associated with the message-sending feature. Example: 1234567890 whatsapp_token (registry/text) Required Description: The token or authentication key to authenticate the API request to WhatsApp. Example: EAAkfsidlfjsdflslkn... to_number (text) Required Description: The recipient's phone number in international format (without '+' or '00'). For example, a US phone number would be entered as 11234567890. Example: 11234567890 message (text) Required Description: The content of the message that will be sent to the recipient. Example: Hello, this is a test message from our service! version (text) Required Description: The API version to use when making the request to the WhatsApp Graph API. Example: v2.8 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: `json { "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 `json { "messaging_product": "whatsapp", "contacts": [ { "input": "+9183277*", "wa_id": "91832770*" } ], "messages": [ { "id": "wamid.HBgMOTE4MzI3N**" } ] } ` Error response `json { "success": false, "error_code": 401, "message": "Unauthorized: Invalid or missing API token." } ` Example Input `json { "messaging_product" : "whatsapp", "recipient_type" : "individual", "to": "+9183277*", "type": "text", "text": { "preview_url": false, "body": "Hello World" } } ` Output `json { "messaging_product": "whatsapp", "contacts": [ { "input": "+918327*", "wa_id": "9183277*" } ], "messages": [ { "id": "wamid.HBgMOTE4MzI3N**" } ] } `

Function Documentation: Brevo → Send Single Email Brevo API documentation 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 brevoapikey (registry/text) Required Description: API key for authenticating with Brevo API. Example: xkeysib-... from (object) Required Description: The sender's email address. Example: sender@example.com to (object) Required Description: The recipient's email address. Example: receiver@example.com message_html (text) Required Description: The HTML content to be sent. Example: <html><body><h1>Hello</h1></body></html> subject (text) Required Description: The subject of the email. Example: Welcome to our service! 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 Purpose: Stores the API response for the SMS send operation. 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 `json { "messageId": "<202410100.1236169*@smtp-relay.mailin.fr>", } ` Error response `json { "message": "Key not found", "code": "unauthorized" } ` Example Input `json { "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 `json { "messageId": "<202410100.1236169*@smtp-relay.mailin.fr>" } `

HubSpot → List Deals Overview This function retrieves a list of deals from HubSpot. It involves setting environment variables, preparing the request with optional parameters, and handling the response from the HubSpot API. Inputs hubspotapikey (registry|text) Required Sensitive data Description: The API key for your HubSpot account. after (integer) Description: The paging cursor to get the next set of deals. limit (integer) Description: The maximum number of deals to retrieve. properties (text[]) Description: A list of deal properties to retrieve. propertieswithhistory (text[]) Description: 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 Purpose: Sends a GET request to retrieve deals from HubSpot. Parameters: Includes optional after cursor, limit, and specified properties. Preconditions Precondition: hubspot_api.response.status == 200 Purpose: Ensures successful retrieval of deals with HTTP status code 200. Response The function returns the result from the HubSpot API response. Success response `json { "deal_id": 22413038713, "properties": [], "propertieswithhistory": [ "closedwonreason" ] } ` Error response `json { "message": "Uh oh! Hubspot returned with an error: Authentication credentials not found. This API supports OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview" } ` Example Input `json { "after": "22393633108", "limit": 10, "properties": [], "propertieswithhistory": [ "dealname" ] } ` Output `json [ { "id": "22393633108", . . . }, . . ] `

Function Documentation: OpenAI → Generate an image (Simple) OpenAI Vision API Overview This function generates an image using the OpenAI API based on a text prompt, with options for size and model. It is designed to take user input, validate it, and return an image URL if the request is successful. Inputs openaiapikey (registry | text) Purpose: API key required to authenticate with OpenAI's image generation endpoint. Example: "sk-...your-key-here" prompt (text) Purpose: The text description for the image to generate. Example: "A futuristic city with flying cars" img_size (enum) Purpose: The size of the generated image. Options: "1024x1024" "1024x1792" "1792x1024" model (enum) Purpose: The OpenAI model to use for generating the image. Options: "dall-e-3" "dall-e-2" Function Stack OpenAI API Request Endpoint: https://api.openai.com/v1/images/generations Purpose: Sends a POST request to the OpenAI API with the prompt and image size parameters. Preconditions Condition: openai_api.response.status == 200 Purpose: Ensures that the request was successful (HTTP 200 status code). OpenAI API Response Create Variable: response Purpose: Stores the response from OpenAI API, which contains the URL of the generated image. Response The function returns the generated image URL or image content. Success response `json { "image_url": "https://api.openai.com/v1/images/abcd1234" } ` Error response `json { "message": "Incorrect API key provided: ssk-None***GQPD. You can find your API key at https://platform.openai.com/account/api-keys." } ` Example Input Headers: Authorization: Bearer openaiapikey Body: `json { "prompt": "A futuristic city with flying cars", "size": "1024x1024", "model": "DALL-E" } ` Output `json { "image_url": "https://api.openai.com/v1/images/abcd1234" } `

Postmark → Send Batch Emails Overview This function allows you to send a batch of emails using the Postmark API. It requires parameters such as the sender email address, recipient email addresses, subject, body, and optionally a template ID. Inputs postmarkbaseurl (registry|text) Required Description: The base url for calling the Postmark API (e.g., "https://api.postmarkapp.com/"). postmarkservertoken (registry|text) Required Sensitive data Description: This is the Postmark Server API Token (e.g., "14g8dce4-7054-47c9-a18a-2107e5cf4e41"). This is needed for authentication on endpoints. message (Object[]) Required Description: An Object of message, each containing the following properties: from_email (text) Required Description: The email address of the sender. to_email (text) Required Description: The email address of the recipient. subject (text) Required Description: The subject line of the email. html_body (text) Optional Description: The HTML content of the email message. If provided, it takes precedence over text_body. text_body (text) Optional Description: The plain text content of the email message. If provided and html_body is not, it will be used. Function Stack Create Variable: api_url Purpose: Constructs the API URL for sending batch emails. Create Variable: api_token Purpose: Stores the Postmark API token. Create Variable: messages_payload Purpose: Initializes an empty array to store the Postmark formatted messages. Precondition 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 and allows comma-separated values. Purpose: Ensures recipient email addresses are formatted correctly and the list is not too long. Precondition: to_email should not exceed 50 email addresses. Purpose: Limits the number of recipients per batch. Precondition: textbody or htmlbody != null Purpose: Either textbody or htmlbody (or both) are provided. Precondition: html_body is a valid HTML format Purpose: html_body is a valid HTML format Convert Message: Postmark Format Purpose: Create a Postmark message object with the required fields, ensuring that to_email is converted to an array if it's a comma-separated list. Update Variable: Increment message_counter. Purpose: Update message_counter. API Request Sends a POST request to the apiurl with the messagespayload as the request body. Create Variable: postmark_response Purpose: Stores the response from the Postmark API. 7 Create Variable: response Purpose: Creates a response object with the result from the Postmark API. Response The function returns a success message or an error message depending on the outcome. Success Response `json { "To": "user1@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" }, { "To": "user2@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-2", "ErrorCode": 0, "Message": "OK" } ` Error Response `json { "ErrorCode": 401, "Message": "Unauthorized: Missing or incorrect API key." } ` Example Input `json { "message": [ { "from_email": "sender@example.com", "to_email": "recipient1@example.com,recipient2@example.com", "subject": "Welcome to Our Service", "html_body": "<h1>Welcome!</h1><p>Thank you for joining our service.</p>", "text_body": "Welcome! Thank you for joining our service." }, { "from_email": "admin@example.com", "to_email": "recipient3@example.com", "subject": "Important Update", "html_body": "<h1>Update</h1><p>Here’s an important update for you.</p>" } ] } ` Output `json [ { "To": "recipient1@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" }, { "To": "recipient2@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-2", "ErrorCode": 0, "Message": "OK" }, { "To": "recipient3@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-3", "ErrorCode": 0, "Message": "OK" } ] `

Creates a new array concatenating array with any additional arrays and/or values. Allows you to concatenate up to 9 arrays. ` { "array_1": [1,2,3], "array_2": 12, "array_3": [], "array_4": [], "array_5": [], "array_6": "foo", "array_7": [], "array_8": true, "array_9": {} } ` would return ` [1,2,3,12,"foo",true,{}] `

A helper function that creates a 1-click MCP install link for Cursor using URL-based authentication with Xano MCP Servers. This function generates deeplinks and various markup formats (Markdown, HTML, JSX) that allow users to install MCP servers directly into Cursor with a single click. Input Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | mcpserverurl | string | Yes | The full URL endpoint of the Xano MCP server | | server_name | string | Yes | Display name for the MCP server | | server_type | enum | Yes | Type of MCP server connection | Example Input `json { "mcpserverurl": "https://x123-wu0q-dtak.n7.xano.io/x2/mcp/6vi_VA6-/mcp/sse", "server_name": "Xano MCP Server Name", "server_type": "sse" } ` Example Output `json { "deeplink": "cursor://anysphere.cursor-deeplink/mcp/install?name=Xano MCP Server Name&config=eyJ0eXBlIjoic3NlIiwidXJsIjoiaHR0cHM6Ly94MTIzLXd1MHEtZHRhay5uNy54YW5vLmlvL3gyL21jcC82dmlfVkE2LS9tY3Avc3NlIn0=", "markdown": { "dark": "", "light": "" }, "html": { "dark": "<a href=\"cursor&#x3A;&#x2F;&#x2F;anysphere.cursor-deeplink&#x2F;mcp&#x2F;install&#x3F;name&#x3D;Xano&#x20;MCP&#x20;Server&#x20;Name&amp;config&#x3D;eyJ0eXBlIjoic3NlIiwidXJsIjoiaHR0cHM6Ly94MTIzLXd1MHEtZHRhay5uNy54YW5vLmlvL3gyL21jcC82dmlfVkE2LS9tY3Avc3NlIn0&#x3D;\"><img src=\"https://cursor.com/deeplink/mcp-install-dark.svg\" alt=\"Add Xano&#x20;MCP&#x20;Server&#x20;Name MCP server to Cursor\" height=\"32\" /></a>", "light": "<a href=\"cursor&#x3A;&#x2F;&#x2F;anysphere.cursor-deeplink&#x2F;mcp&#x2F;install&#x3F;name&#x3D;Xano&#x20;MCP&#x20;Server&#x20;Name&amp;config&#x3D;eyJ0eXBlIjoic3NlIiwidXJsIjoiaHR0cHM6Ly94MTIzLXd1MHEtZHRhay5uNy54YW5vLmlvL3gyL21jcC82dmlfVkE2LS9tY3Avc3NlIn0&#x3D;\"><img src=\"https://cursor.com/deeplink/mcp-install-light.svg\" alt=\"Add Xano&#x20;MCP&#x20;Server&#x20;Name MCP server to Cursor\" height=\"32\" /></a>" }, "jsx": { "dark": "<a href=\"cursor&#x3A;&#x2F;&#x2F;anysphere.cursor-deeplink&#x2F;mcp&#x2F;install&#x3F;name&#x3D;Xano&#x20;MCP&#x20;Server&#x20;Name&amp;config&#x3D;eyJ0eXBlIjoic3NlIiwidXJsIjoiaHR0cHM6Ly94MTIzLXd1MHEtZHRhay5uNy54YW5vLmlvL3gyL21jcC82dmlfVkE2LS9tY3Avc3NlIn0&#x3D;\"><img src=\"https://cursor.com/deeplink/mcp-install-dark.svg\" alt=\"Add Xano&#x20;MCP&#x20;Server&#x20;Name MCP server to Cursor\" height=\"32\" /></a>", "light": "<a href=\"cursor&#x3A;&#x2F;&#x2F;anysphere.cursor-deeplink&#x2F;mcp&#x2F;install&#x3F;name&#x3D;Xano&#x20;MCP&#x20;Server&#x20;Name&amp;config&#x3D;eyJ0eXBlIjoic3NlIiwidXJsIjoiaHR0cHM6Ly94MTIzLXd1MHEtZHRhay5uNy54YW5vLmlvL3gyL21jcC82dmlfVkE2LS9tY3Avc3NlIn0&#x3D;\"><img src=\"https://cursor.com/deeplink/mcp-install-light.svg\" alt=\"Add Xano&#x20;MCP&#x20;Server&#x20;Name MCP server to Cursor\" height=\"32\" /></a>" } } ` Output Fields deeplink The raw Cursor deeplink URL that can be used programmatically or shared directly. markdown Ready-to-use Markdown install buttons with Cursor's official badge images: dark: Dark theme install button light: Light theme install button html HTML anchor tags with embedded install buttons: dark: Dark theme HTML button light: Light theme HTML button jsx JSX-compatible HTML for React components: dark: Dark theme JSX button light: Light theme JSX button Usage Notes The config parameter in the deeplink contains a base64-encoded JSON configuration All markup formats include proper URL encoding for compatibility The function supports both dark and light theme variants for different UI contexts Install buttons use Cursor's official badge images hosted at cursor.com/deeplink/ Implementation Details The function creates a Cursor deeplink following the format: ` cursor://anysphere.cursor-deeplink/mcp/install?name={SERVERNAME}&config={BASE64CONFIG} ` Where {BASE64_CONFIG} is a base64-encoded JSON object containing: `json { "type": "{server_type}", "url": "{mcpserverurl}" } `

Function Documentation: xAI -> Create a Chat Completion xAI API documentation Overview This function generates a completion using the xAI API based on a user-provided request. It requires parameters such as the model & prompt text. The function validates environment variables and conditions before making an API request and processing the response. Inputs xaiapikey (registry|text) Required Sensitive data Description: The API key for your xAI account. model (enum) Required Description: Specifies the model to be used for generating the completion. Options: Available models will be specified by xAI message (text) Required Description: The input prompt that will be sent to the xAI API for generating the completion. system (text) Required Description: Initial instructions that shape the AI's behavior, role, and response style. Sets the context and guidelines for how the AI should interact throughout the conversation on task. Function Stack xAI API Request API Request to https://api.x.ai/v1/completions Purpose: Sends a request to the xAI API using the specified model and prompt. Precondition: xaiapiresponse.status == 200 Purpose: Confirms that the API request was successful (HTTP status code 200). xAI API Response Create Variable: response Purpose: Stores the response from the xAI API. Response The function returns the generated completion in a structured format Success Response Response provided as a string. Error Response `json { "error": { "message": "Invalid API key provided", "type": "invalidrequesterror" } } ` Example Input `json { "model": "grok-beta", "prompt": "What is Obama's height?" } ` Response ` "Barack Obama is 6 feet 1 inch tall (185 cm)." `

Function Documentation: Postmark → Send Email with Template Overview This function allows you to send emails using the Postmark API with a pre-defined template. You can specify the recipient email address, the template ID, and the data to populate the template placeholders. Inputs postmarkbaseurl (registry|text) Required Description: The base url for calling the Postmark API (e.g., "https://api.postmarkapp.com/"). postmarkservertoken (registry|text) Required Sensitive data Description: This is the Postmark Server API Token (e.g., "14g8dce4-7054-47c9-a18a-2107e5cf4e41"). This is needed for authentication on endpoints. from_email (text) Required Description: The email address that will appear as the sender. Example: noreply@yourdomain.com to_emails (text) Required Description: A list of email addresses to send the batch emails to. Example: user1@example.com template_id (integer) Required Description: The ID of the Postmark template to use. Example: 12345 template_model (json) Required Description: The data to populate the template placeholders. The structure of this data depends on your specific Postmark template. Example: Refer to Postmark documentation for template data structure. Function Stack Create Variable: Create Variable: api_url Purpose: Constructs the API URL for sending emails with templates. Create Variable: Create Variable: api_token Purpose: Stores the Postmark API token. Precondition: 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 and allows comma-separated values. Purpose: Ensures recipient email addresses are formatted correctly and the list is not too long. Precondition: to_email should not exceed 50 email addresses. Purpose: Limits the number of recipients per batch. Postmask API Request: API Request to: https://api.postmarkapp.com/email Purpose: Sends a POST request to the api_url with the following payload: `JSON { "from_email": "noreply@yourdomain.com", "to_email": "user@example.com", "template_id": 12345, "template_model": { "name": "John Doe", "email": "john.doe@example.com" } } ` Create Variable: Create Variable: postmark_response Purpose: Stores the response from the Postmark API. Create Variable: Create Variable: response Purpose: Creates a response object with the result from the Postmark API. Response The function returns the result from the Postmark API response. Success response `json { "To": "user1@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" }, { "To": "user2@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-2", "ErrorCode": 0, "Message": "OK" } ` Error response `json { "ErrorCode": 401, "Message": "Unauthorized: Missing or incorrect API key." } ` Example Input `json { "from_email": "noreply@yourdomain.com", "to_email": "user@example.com", "template_id": 12345, "template_model": { "name": "John Doe", "email": "john.doe@example.com" } } ` Output `json { "To": "user@example.com", "SubmittedAt": "2024-10-07T14:33:15.817Z", "MessageID": "message-id-1", "ErrorCode": 0, "Message": "OK" } `

Function Documentation: OpenAI -> Get Embeddings OpenAI Embeddings API Overview This function generates an embedding for a given text input using the OpenAI API. It requires parameters such as the input text & model. The function ensures that the necessary environment variables are set and verifies conditions before making the API request and processing the response. Inputs openaiapikey (registry|text) Required Sensitive data Description: The API key for your OpenAI account. input_text (text) Required Description: The text input for which an embedding will be generated by the OpenAI API. model (enum) Required Description: Specifies the model to be used for generating the embedding. Options: text-embedding-3-small (default) text-embedding-3-large text-embedding-ada-002 Function Stack OpenAI API Request API Request to https://api.openai.com Purpose: Sends a request to the OpenAI API using the specified model and input text. Precondition: openaiapiresponse.status == 200 Purpose: Confirms that the API request was successful (HTTP status code 200). OpenAI API Response Create Variable: response Purpose: Stores the response from the OpenAI API. Response The function returns the generated embedding. Success response `json { [ 0.020631326, -0.0042284927, . . . 0.03682661 ] } ` Error response `json { "message": "Incorrect API key provided: sk-Nosne***GQPD. You can find your API key at https://platform.openai.com/account/api-keys." } ` Example Input `json { "input_text": "Welcome to Xano Actions!", "model": "text-embedding-3-small", "showtokenusage": true } ` Response `json { [ 0.020631326, -0.0042284927, . . . 0.03682661 ] } `

Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements. | parameter | values | |------------|--------| | array | [1,2,3,4,5] | | size | 2 | gives you a value ` [1, 2], [3, 4], [5] `

Function Documentation: OpenAI -> Create a Chat Completion OpenAI API documentation Overview This function generates a chat completion using the OpenAI API based on a user-provided input text. It requires parameters such as the model & input message. The function validates environment variables and conditions before making an API request and processing the response. Inputs openaiapikey (registry|text) Required Sensitive data Description: The API key for your OpenAI account. model (enum) Required Description: Specifies the model to be used for generating the chat completion. Options: gpt-4o-mini (default) gpt-4o message (text) Required Description: The input message or prompt that will be sent to the OpenAI API for generating the chat completion. Function Stack OpenAI API Request API Request to https://api.openai.com Purpose: Sends a request to the OpenAI API using the specified model and message. Precondition: openaiapiresponse.status == 200 Purpose: Confirms that the API request was successful (HTTP status code 200). OpenAI API Response Create Variable: response Purpose: Stores the response from the OpenAI API. Response The function returns the generated chat completion Success response `json {"Barack Obama is 6 feet 1 inch tall (185 cm)."} ` Error response `json { "message": "Incorrect API key provided: ssk-None***GQPD. You can find your API key at https://platform.openai.com/account/api-keys." } ` Example Input `json { "model": "gpt-4o-mini", "message": "What is Obama's height?" } ` Response `json {"Barack Obama is 6 feet 1 inch tall (185 cm)."} `

Compute the median for a set of values. In the case of an odd number of values, the median will be the average of the two central values Example ` { "values": [1,3,5,4,2] } ` returns ` 5 `

Featured Packages
LeDash
LeDash is a powerful Xano package inspired by Lodash, bringing its robust utility functions to the Xano ecosystem. LeDash ensures predictable data handling by safely managing unpredictable or missing objects. Instead of errors, it returns sensible defaults (e.g., empty arrays, objects, or strings) tailored to your expected type, streamlining development and boosting reliability.

Statistics
Provides core statistical functions including moments, variance, regression, distribution shape (skewness, kurtosis), and common aggregates like mean, median, percentiles, and sums. Supports both biased and unbiased calculations where relevant, making it useful for exploratory data analysis and lightweight modeling.

Notion
The Xano Notion Actions Package is a powerful collection of zero-dependency functions that bridge the gap between your Xano backend and Notion workspaces. Keep your documentation, databases, and workflows perfectly in sync with minimal effort.