Run Apache Airflow DAG and retrieve XCom value
Run Apache Airflow DAG and Retrieve XCom Value What this workflow does This workflow integrates the Apache Airflow API DAGRun and XCom. It enables n8n to trigger Airflow DAGs and retrieve the execution results. Preparation: Update Airflow API Link Prefix Navigate to the airflow-api node. Update the prefix of the Airflow API link in the format: http(s)://ip:port. Example: https://airflow.example.com Configure Authentication Go to the Airflow: dag_run node. Update the Basic Auth credentials with your Airflow username and password. Repeat this step for Airflow: dagrun - state and Airflow: dagrun - get result nodes. Security Note: Using Basic Authentication requires storing credentials in plaintext. If possible, consider using API Keys or Tokens for enhanced security. An example is setting Airflow's API Authentication to basic\_auth. Choose other authentication methods if needed. Ensure the user account has the following permissions: can create on DAG Runs, can read on DAG Runs, can read on XComs, can edit on DAGs, and can read on DAGs. How to Use: To execute this workflow, use the Execute Sub-workflow node with the following input parameters: dag\_id: The DAG ID (name) in Airflow that you want to trigger. task\id: The Task ID (name) from which you want to retrieve the XCom return\value. conf: Input data for the Airflow DAG run. wait: Delay (in seconds) between each Airflow: dag_run - state check. wait\time: The maximum time (in seconds) to wait for Airflow: dagrun - state before returning an error. Output: The workflow returns the XCom result from Airflow: dag_run - get result. The XCom return_value is stored in the value field.
Clone and change your voice 🤖🎙️with Elevenlabs and Telegram
This workflow creates a voice AI assistant accessible via Telegram that leverages ElevenLabs* powerful voice synthesis technology. Users can either clone their own voice or transform their voice using pre-existing voice models, all through simple voice messages sent to a Telegram bot. *ONLY FOR STARTER, CREATOR, PRO PLAN This workflow allows users to: Clone their voice by sending a voice message to a Telegram bot (creates a new voice profile on ElevenLabs) Change their voice to a cloned voice and save the output to Google Drive --- For Best Results Important Considerations for Best Results: For optimal voice cloning via Telegram voice messages: Recording Quality & Environment Record in a quiet room with minimal echo and background noise Use a consistent microphone position (10-15cm from mouth) Ensure clear audio without distortion or clipping Content Selection & Variety Send 1 voice messages totaling 5-10 minutes of speech Include diverse vocal sounds, tones, and natural speaking cadence Use complete sentences rather than isolated words Audio Consistency Maintain consistent volume, tone, and distance from microphone Avoid interruptions, laughter, coughs, or background voices Speak naturally without artificial effects or filters Technical Preparation Ensure Telegram isn't overly compressing audio (use HQ recording) Record all messages in the same session with same conditions Include both neutral speech and varied emotional expressions --- How it works Trigger The workflow starts with a Telegram trigger that listens for incoming messages (text, voice notes, or photos). Authorization check A Code node checks whether the sender’s Telegram user ID matches your predefined ID. If not, the process stops. Message routing A Switch node routes the message based on its type: Text → Not processed further in this flow. Voice message → Sent to the “Get audio” node to retrieve the audio file from Telegram. Photo → Not processed further in this flow. Two main options From the “Get audio” node, the workflow splits into two possible paths: Option 1 – Clone voice The audio file is sent to ElevenLabs via an HTTP request to create a new cloned voice. The voice ID is returned and can be saved for later use. Option 2 – Voice changer The audio is sent to ElevenLabs for speech-to-speech conversion using a pre-existing cloned voice (voice ID must be set in the node parameters). The resulting audio is saved to Google Drive. Output Cloned voice ID (for Option 1). Converted audio file uploaded to Google Drive (for Option 2). --- Set up steps Telegram bot setup Create a bot via BotFather and obtain the API token. Set up the Telegram Trigger node with your bot credentials. Authorization configuration In the “Sanitaze” Code node, replace XXX with your Telegram user ID to restrict access. ElevenLabs API setup Get an API key from ElevenLabs. Configure the HTTP Request nodes (“Create Cloned Voice” and “Generate cloned audio”) with: API key in the Xi-Api-Key header. Appropriate endpoint URLs (including voice ID for speech-to-speech). Google Drive setup (for Option 2) Set up Google Drive OAuth2 credentials in n8n. Specify the target folder ID in the “Upload file” node. Voice ID configuration For voice cloning: The voice name can be customized in the “Create Cloned Voice” node. For voice changing: Replace XXX in the “Generate cloned audio” node URL with your ElevenLabs voice ID. Test the workflow Activate the workflow. Send a voice note from your authorized Telegram account to trigger cloning or voice conversion. --- 👉 Subscribe to my new YouTube channel. Here I’ll share videos and Shorts with practical tutorials and FREE templates for n8n. [](https://youtube.com/@n3witalia) --- Need help customizing? Contact me for consulting and support or add me on Linkedin.