Skip to main content

n8n Automation

Connect XenonFlare to n8n to build powerful, low-code video automation pipelines. This integration allows you to trigger video uploads based on external events, such as a new file in Google Drive, a row in Airtable, or a custom webhook.

Prerequisites

  • An active Plus or Pro XenonFlare plan.
  • Your XenonFlare API Key (found in Dashboard > Settings).
  • An instance of n8n (Cloud, Desktop, or Self-hosted).

Setting up the Integration

XenonFlare uses a standardized REST API, which makes it compatible with n8n's HTTP Request node.

1. Create a Trigger

Start your workflow with any trigger, for example:

  • Google Drive: Watch for new files in a specific folder.
  • Airtable: Watch for new records with a "Ready to Post" status.
  • Webhook: Receive data from your own custom application.

2. Configure the HTTP Request Node

Add an HTTP Request node to your workflow and configure it as follows:

  • Method: POST
  • URL: https://xenonflare.com/api/v1/video/upload
  • Authentication: Header Auth
    • Name: X-API-Key
    • Value: {{ $vars.XENONFLARE_API_KEY }} (your actual API key)
  • Send Body: true
  • Body Content Type: Form-Data (Multipart)

3. Map the Fields

In the "Parameters" section of the HTTP Request node, add the following fields:

FieldTypeDescription
fileFileMap the binary file from your trigger node (e.g. Google Drive file content).
platformsJSONe.g. ["youtube", "instagram"]
titleStringThe title of your video.
descriptionStringVideo description or caption.
selectedYoutubeChannelsJSONArray of Channel IDs (get these via GET /api/v1/channels).

Example Workflow: Auto-Post from Google Drive

  1. Google Drive Node: Watch for new files in the folder "Social Posts".
  2. Code Node (Optional): Extract metadata from the filename (e.g., tags, platform names).
  3. HTTP Request Node:
    • URL: https://xenonflare.com/api/v1/video/upload
    • Header: X-API-Key: xf_live_...
    • Body:
      • file: {{ $node["Google Drive"].binary.data }}
      • platforms: ["youtube"]
      • title: {{ $node["Google Drive"].json.name }}
      • selectedYoutubeChannels: ["UCxxxxxx"]

Getting Channel IDs

To get the IDs of your connected accounts for use in n8n, you can make a simple GET request:

curl -H "X-API-Key: YOUR_API_KEY" https://xenonflare.com/api/v1/channels

The response will contain the IDs you need for selectedYoutubeChannels, selectedInstagramAccounts, etc.