Back to Catalog

Populate Retell dynamic variables with Google Sheets data for call handling

Agent StudioAgent Studio
1177 views
2/3/2026
Official Page

Overview

  • This workflow provides Retell agent builders with a simple way to populate dynamic variables using n8n.
  • The workflow fetches user information from a Google Sheet based on the phone number and sends it back to Retell.
  • It is based on Retell's Inbound Webhook Call.
  • Retell is a service that lets you create Voice Agents that handle voice calls simply, based on a prompt or using a conversational flow builder.

Who is it for

For builders of Retell's Voice Agents who want to make their agents more personalized.

Prerequisites

How it works

  • The webhook call is received from Retell. We filter the call using their whitelisted IP address.
  • It extracts data from the webhook call and uses it to retrieve the user from Google Sheets.
  • It formats the data in the response to match Retell's expected format.
  • Retell uses this data to replace dynamic variables in the prompts.

How to use it

See the description for screenshots!

  • Set the webhook name (keep it as POST).

  • Copy the Webhook URL (e.g., https://your-instance.app.n8n.cloud/webhook/retell-dynamic-variables) and paste it into Retell's interface. Navigate to "Phone Numbers", click on the phone number, and enable "Add an inbound webhook". Screenshot 20250331 at 16.38.06.png

  • In your prompt (e.g., "welcome message"), use the variable with this syntax: {{variable_name}} (see Retell's documentation). image.png

  • These variables will be dynamically replaced by the data in your Google Sheet.

Notes

  • In Google Sheets, the phone number must start with '+.
  • Phone numbers must be formatted like the example: with the +, extension, and no spaces.
  • You can use any databaseβ€”just replace Google Sheets with your own, making sure to keep the phone number formatting consistent.

πŸ‘‰ Reach out to us if you're interested in analysing your Retell Agent conversations.

Populate Retell Dynamic Variables with Google Sheets Data for Call Handling

This n8n workflow simplifies the process of dynamically populating variables for call handling systems (like Retell) using data stored in Google Sheets. It acts as an API endpoint, allowing external systems to query your Google Sheet and retrieve relevant information.

What it does

This workflow automates the following steps:

  1. Listens for a Webhook Trigger: The workflow is activated by an incoming HTTP POST request to a specific webhook URL. This request is expected to contain parameters that will be used to query the Google Sheet.
  2. Reads Data from Google Sheets: Upon receiving a webhook, the workflow connects to a specified Google Sheet. It reads data from the sheet, likely using parameters from the incoming webhook to filter or select specific rows/columns.
  3. Responds to the Webhook: After retrieving the data from Google Sheets, the workflow formats this data and sends it back as a response to the original webhook request. This response will contain the dynamic variables needed by the call handling system.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • Google Account: A Google account with access to the Google Sheet you intend to use.
  • Google Sheets Credential: An n8n credential configured for Google Sheets (OAuth2 recommended).
  • Google Sheet: A Google Sheet populated with the data you wish to use as dynamic variables for your call handling system.

Setup/Usage

  1. Import the Workflow:
    • Download the provided JSON file for this workflow.
    • In your n8n instance, click "New" in the workflows section.
    • Click the "Import from JSON" button and paste the workflow JSON or upload the file.
  2. Configure Google Sheets Node:
    • Click on the "Google Sheets" node.
    • Select or create a Google Sheets credential.
    • Specify the "Spreadsheet ID" and "Sheet Name" from which you want to read data.
    • Configure the "Operation" (e.g., "Get All Rows", "Get Many Rows") and any "Filters" based on how you expect to query the sheet from your call handling system.
  3. Configure Webhook Node:
    • Click on the "Webhook" node.
    • Note the "Webhook URL" provided. This is the endpoint your call handling system will call.
    • (Optional) Adjust the "HTTP Method" if your external system requires something other than POST.
    • (Optional) Define "Path" parameters if your external system sends data in the URL path.
  4. Configure Respond to Webhook Node:
    • Click on the "Respond to Webhook" node.
    • Map the data retrieved from the Google Sheets node to the desired response format. This is where you'll define the dynamic variables that your call handling system expects.
    • Ensure the "Response Mode" is set appropriately (e.g., "Last Node").
  5. Activate the Workflow:
    • Once configured, activate the workflow by toggling the switch in the top right corner of the n8n editor.
  6. Integrate with your Call Handling System:
    • Provide the "Webhook URL" from the n8n Webhook node to your call handling system (e.g., Retell).
    • Configure your call handling system to send a request to this URL with the necessary parameters (e.g., caller ID, specific query) that the n8n workflow will use to look up data in Google Sheets.

Related Templates

Track daily moods with AI analysis & reports using GPT-4o, Data Tables & Gmail

Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics. This workflow logs moods sent through a webhook (/mood) into Data Tables, analyzes them weekly and monthly with OpenAI (GPT-4o), and emails you clear summaries and actionable recommendations via Gmail. βš™οΈ How It Works Webhook – Mood β†’ Collects new entries (πŸ™‚, 😐, or 😩) plus an optional note. Set Mood Data β†’ Adds date, hour, and note fields automatically. Insert Mood Row β†’ Stores each record in a Data Table. Weekly Schedule (Sunday 20:00) β†’ Aggregates the last 7 days and sends a summarized report. Monthly Schedule (Day 1 at 08:00) β†’ Aggregates the last 30 days for a deeper AI analysis. OpenAI Analysis β†’ Generates insights, patterns, and 3 actionable recommendations. Gmail β†’ Sends the full report (chart + AI text) to your inbox. πŸ“Š Example Auto-Email Weekly Mood Summary (last 7 days) πŸ™‚ 5 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 😐 2 β–ˆβ–ˆβ–ˆβ–ˆ 😩 0 Average: 1.7 (Positive πŸ™‚) AI Insights: You’re trending upward this week β€” notes show that exercise days improved mood. Try keeping short walks mid-week to stabilize energy. 🧩 Requirements n8n Data Tables enabled OpenAI credential (GPT-4o or GPT-4 Turbo) Gmail OAuth2 credential to send summaries πŸ”§ Setup Instructions Connect your credentials: Add your own OpenAI and Gmail OAuth2 credentials. Set your Data Table ID: Open the Insert Mood Row node and enter your own Data Table ID. Without this, new moods won’t be stored. Replace the email placeholder: In the Gmail nodes, replace your.email@example.com with your actual address. Deploy and run: Send a test POST request to /mood (e.g. { "mood": "πŸ™‚", "note": "productive day" }) to log your first entry. ⚠️ Before activating the workflow, ensure you have configured the Data Table ID in the β€œInsert Mood Row” node. 🧠 AI Analysis Interprets mood patterns using GPT-4o. Highlights trends, potential triggers, and suggests 3 specific actions. Runs automatically every week and month. πŸ”’ Security No personal data is exposed outside your n8n instance. Always remove or anonymize credential references before sharing publicly. πŸ’‘ Ideal For Personal mood journaling and AI feedback Therapists tracking client progress Productivity or self-quantification projects πŸ—’οΈ Sticky Notes Guide 🟑 Mood Logging Webhook POST /mood receives mood + optional note. ⚠️ Configure your own Data Table ID in the β€œInsert Mood Row” node before running. 🟒 Weekly Summary Runs every Sunday 20:00 β†’ aggregates last 7 days β†’ generates AI insights + emails report. πŸ”΅ Monthly Summary Runs on Day 1 at 08:00 β†’ aggregates last 30 days β†’ creates monthly reflection. 🟣 AI Analysis Uses OpenAI GPT-4o to interpret trends and recommend actions. 🟠 Email Delivery Sends formatted summaries to your inbox automatically.

Jose CastilloBy Jose Castillo
105

IT ops AI SlackBot workflow - chat with your knowledge base

Video Demo: Click here to see a video of this workflow in action. Summary Description: The "IT Department Q&A Workflow" is designed to streamline and automate the process of handling IT-related inquiries from employees through Slack. When an employee sends a direct message (DM) to the IT department's Slack channel, the workflow is triggered. The initial step involves the "Receive DMs" node, which listens for new messages. Upon receiving a message, the workflow verifies the webhook by responding to Slack's challenge request, ensuring that the communication channel is active and secure. Once the webhook is verified, the workflow checks if the message sender is a bot using the "Check if Bot" node. If the sender is identified as a bot, the workflow terminates the process to avoid unnecessary actions. If the sender is a human, the workflow sends an acknowledgment message back to the user, confirming that their query is being processed. This is achieved through the "Send Initial Message" node, which posts a simple message like "On it!" to the user's Slack channel. The core functionality of the workflow is powered by the "AI Agent" node, which utilizes the OpenAI GPT-4 model to interpret and respond to the user's query. This AI-driven node processes the text of the received message, generating an appropriate response based on the context and information available. To maintain conversation context, the "Window Buffer Memory" node stores the last five messages from each user, ensuring that the AI agent can provide coherent and contextually relevant answers. Additionally, the workflow includes a custom Knowledge Base (KB) tool (see that tool template here) that integrates with the AI agent, allowing it to search the company's internal KB for relevant information. After generating the response, the workflow cleans up the initial acknowledgment message using the "Delete Initial Message" node to keep the conversation thread clean. Finally, the generated response is sent back to the user via the "Send Message" node, providing them with the information or assistance they requested. This workflow effectively automates the IT support process, reducing response times and improving efficiency. To quickly deploy the Knowledge Ninja app in Slack, use the app manifest below and don't forget to replace the two sample urls: { "display_information": { "name": "Knowledge Ninja", "description": "IT Department Q&A Workflow", "background_color": "005e5e" }, "features": { "bot_user": { "display_name": "IT Ops AI SlackBot Workflow", "always_online": true } }, "oauth_config": { "redirect_urls": [ "Replace everything inside the double quotes with your slack redirect oauth url, for example: https://n8n.domain.com/rest/oauth2-credential/callback" ], "scopes": { "user": [ "search:read" ], "bot": [ "chat:write", "chat:write.customize", "groups:history", "groups:read", "groups:write", "groups:write.invites", "groups:write.topic", "im:history", "im:read", "im:write", "mpim:history", "mpim:read", "mpim:write", "mpim:write.topic", "usergroups:read", "usergroups:write", "users:write", "channels:history" ] } }, "settings": { "event_subscriptions": { "request_url": "Replace everything inside the double quotes with your workflow webhook url, for example: https://n8n.domain.com/webhook/99db3e73-57d8-4107-ab02-5b7e713894ad", "bot_events": [ "message.im" ] }, "orgdeployenabled": false, "socketmodeenabled": false, "tokenrotationenabled": false } }

Angel MenendezBy Angel Menendez
39013

Publishing videos across multiple platforms with Blotato (Instagram, YouTube)

Description This workflow automates video distribution to 9 social platforms simultaneously using Blotato's API. It includes both a scheduled publisher (checks Google Sheets for videos marked "Ready") and a subworkflow (can be called from other workflows). Perfect for creators and marketers who want to eliminate manual posting across Instagram, YouTube, TikTok, Facebook, LinkedIn, Threads, Twitter, Bluesky, and Pinterest. --- How It Works Scheduled Publisher Workflow Schedule Trigger – Runs daily at 10 PM (configurable). Fetch Video – Pulls video URL and description from Google Sheets where "ReadyToPost" = "Ready". Upload to Blotato – Sends video to Blotato's media service. Broadcast to 9 Platforms – Publishes simultaneously to all connected social accounts. Update Sheet – Changes "ReadyToPost" to "Finished" so it won't repost. --- Subworkflow: Video Publisher (Reusable) Receive Input – Gets URL, title, and description from parent workflow. Fetch Credentials – Pulls Blotato API key from n8n Data Table. Upload & Distribute – Uploads to Blotato, then posts to all platforms. Completion Signal – Returns to parent workflow when done. > πŸ’‘ Tip: The subworkflow can be called from ANY workflow - great for posting videos generated by AI workflows, webhook triggers, or manual forms. --- Test Workflow (Optional) Form Submission – Upload a video file with title and description. Upload to Dropbox – Generates shareable URL via "[SUB] Dropbox Upload Link" subworkflow. Trigger Publisher – Calls the subworkflow above to distribute the video. --- Setup Instructions Estimated Setup Time: 20-25 minutes Step 1: Blotato Account Setup Create account at Blotato Dashboard Connect all your social media accounts (most time-consuming step) Go to Settings and copy your account IDs for each platform Go to API Settings and copy your API key Step 2: Configure Workflow Update Social IDs: Open "Assign Social Media IDs" node Replace placeholder IDs with your actual Blotato account IDs: json { "instagramid": "YOURID", "youtubeid": "YOURID", "tiktokid": "YOURID", ... } Create Data Table: Create n8n Data Table named "Credentials" Add columns: service and token Add row: service = blotato, token = YOURAPIKEY Set Up Google Sheet: Create sheet with columns: URL VIDEO, ReadyToPost, Description, Titre (Title) Add video data Set ReadyToPost to "Ready" for videos you want to post Connect Your Sheet: Update "Get my video" node with your Google Sheet ID > βš™οΈ Pro Tip: If you don't need the scheduled version, just use the subworkflow and call it from other workflows. --- Use Cases AI Video Workflows: Automatically post videos generated by Veo, Sora, or other AI models to all platforms. Content Schedulers: Queue videos in Google Sheets, let the scheduler post them automatically. Batch Publishing: Generate 10 videos, mark them all "Ready", and let the workflow distribute them. Marketing Campaigns: Coordinate multi-platform launches with a single click. Agencies: Manage multiple client accounts by swapping Blotato credentials in the Data Table. --- Customization Options Remove Unused Platforms: Disconnect any social media nodes you don't use (speeds up execution). Change Schedule: Modify the Schedule Trigger to run multiple times per day or on specific days. Different File Hosts: Replace Dropbox with Google Drive, S3, or Cloudinary in the test workflow. Platform-Specific Captions: Add IF nodes before each platform to customize descriptions or add hashtags. Add Approval Step: Insert a WhatsApp or Telegram notification before posting for manual review. Watermarks: Add a Code node to overlay branding before uploading to Blotato. --- Important Notes ⚠️ Two Workflows in One File: Lines 1-600: Scheduled publisher (checks Google Sheets) Lines 600+: Subworkflow (called by other workflows) ⚠️ Data Table vs. Hardcoding: Scheduled workflow: Hardcoded API keys in HTTP nodes Subworkflow: Uses Data Table for API keys (recommended approach) ⚠️ Why Use the Subworkflow? Can be called from ANY workflow Easier to manage API keys (one place to update) More flexible for complex automation systems

AnthonyBy Anthony
159