4 n8n Questions I’ve Answered 100+ Times (In 15mins)

Jono CatliffAbout 5 min readMay 26, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • AI Automation Mistakes
  • Chat GPT as RegEx Code
  • Google Sheets Integration (Watch Changes)
  • HTTP Requests & API Integration
  • JSON Data Types & Errors

1. Using Chat GPT as RegEx Code

  • Problem: Using Chat GPT directly to extract structured data from unstructured text (e.g., emails, PDFs) without proper formatting and context.
  • Solution: Employ a structured approach with Chat GPT using three key messages:
    • System Message (Context): Defines Chat GPT's role (e.g., "You are an intelligent bot at pulling out information from text...").
    • User Message (Input): Provides the unstructured text to be processed.
    • Assistant Message (Output Definition): Specifies the desired output format as JSON data.
  • Step-by-Step Process:
    1. Define the desired JSON structure (e.g., {"firstName": "", "lastName": "", "email": ""}). Use Chat GPT to generate this structure if needed, ensuring it only includes one person and no values.
    2. Configure the Chat GPT module in the automation platform (e.g., Make/Integromat) with the three messages.
    3. Enable "Output content as JSON".
    4. Map the extracted JSON data to the desired destination (e.g., Google Sheets).
  • Example: Extracting name, email, and message from an email lead and inserting it into a Google Sheet.
  • Blueprint: The presenter will include a blueprint of the Chat GPT module setup in the description.

2. Watch Changes in Google Sheets

  • Problem: Triggering automation workflows based on changes in a Google Sheet (e.g., when a checkbox is checked).
  • Solution: Use Google Apps Script and webhooks to send data from Google Sheets to the automation platform.
  • Step-by-Step Process:
    1. Set up a Webhook in the Automation Platform: Create a webhook in the automation platform (e.g., Make/Integromat) to receive data from Google Sheets.
    2. Implement Google Apps Script:
      • Open the Script editor in Google Sheets (Extensions > Apps Script).
      • Copy and paste the provided Apps Script code (will be in the description).
      • Replace the placeholder webhook URL in the script with the actual webhook URL from the automation platform.
    3. Create a Trigger:
      • Add a trigger in the Apps Script editor (Triggers > Add Trigger).
      • Configure the trigger to run the script "onChange" and "on form submit"
      • Authorize the script to access your Google account.
    4. Filter Data in the Automation Platform: Use a filter in the automation platform to process only relevant changes (e.g., when a specific column is updated and a checkbox is checked).
  • Example: Sending an email to a user when a checkbox is checked in their row in a Google Sheet.
  • Key Elements in Apps Script:
    • UrlFetchApp.fetch(webhookURL, options): Sends data to the webhook.
    • onChange(e): Function that triggers when a change is made in the Google Sheet.
  • Data Sent: The script sends data about the changed cell, including column and row indices, and the entire row's data.

3. HTTP Requests & API Integration

  • Concept: Using HTTP requests to interact with external APIs (e.g., 11 Labs for voice AI).
  • Explanation: All integrations in automation platforms (e.g., Slack, Google Sheets) are essentially pre-built HTTP requests.
  • Step-by-Step Process:
    1. Find API Documentation: Locate the API documentation for the desired service (e.g., 11 Labs).
    2. Identify the Endpoint: Determine the specific API endpoint for the desired action (e.g., text-to-speech).
    3. Import cURL Request: Copy the cURL request example from the API documentation and import it into an HTTP request module in the automation platform.
    4. Configure Authentication: Add authentication headers (e.g., API key) to the HTTP request.
      • If the cURL request doesn't include authentication, find the authentication method in the API documentation.
      • Duplicate the HTTP request module and import the authentication cURL request to identify the necessary headers.
      • Add the required headers (e.g., xi-api-key) to the main HTTP request module.
      • Obtain the API key from your account settings in the external service.
    5. Test the Request: Test the HTTP request to ensure it's working correctly.
  • Example: Using the 11 Labs API to generate voice AI from text.
  • HTTP Methods:
    • POST: Creates new data (e.g., adding a row to a Google Sheet).
    • PUT: Updates existing data.
    • GET: Retrieves data.
    • DELETE: Deletes data.

4. JSON Data Types & Errors

  • Concept: Understanding JSON data types and how they affect data processing in automation workflows.
  • JSON Data Types:
    • String (Text): Textual data (e.g., "John Smith").
    • Number: Numerical data (e.g., 25).
    • Boolean: True/False values.
    • Object: A collection of key-value pairs enclosed in curly braces {} (like a folder).
    • Array: An ordered list of values enclosed in square brackets [] (like a grocery list).
  • Problem: Incorrect data types can lead to errors and unexpected behavior in automation workflows.
  • Example: Comparing a text value to a number, or a boolean value to a text value.
  • Solution:
    1. Identify Data Type Mismatches: Pay attention to error messages and data type indicators in the automation platform.
    2. Convert Data Types: Use data type conversion functions (e.g., "Convert types where required") to ensure that data types are compatible before performing operations.
  • Impact: JSON data type errors are often silent and can be difficult to diagnose, leading to significant time wasted in troubleshooting.

Synthesis/Conclusion

The video highlights four common mistakes in AI automation: misusing Chat GPT for data extraction, failing to properly integrate Google Sheets with webhooks, neglecting HTTP request configuration for API integration, and misunderstanding JSON data types. By addressing these issues with structured approaches, developers can avoid common pitfalls and build more robust and efficient AI automation workflows. The presenter emphasizes the importance of understanding JSON data types, as they are fundamental to data processing and can cause subtle but significant errors. The video offers actionable insights and practical solutions, encouraging viewers to delve deeper into AI automation through the presenter's school community.

AI summaries can miss context or contain errors. Check important details against the original video.

MAKE IT YOURS

Read. Remember. Reuse.

Free tools

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.