Claude Code + Trigger.dev: I'm Never Building Agents the Same Way

Claude Code + Trigger.dev: I'm Never Building Agents the Same Way

Introduction to Cloud Code and Trigger.dev

Overview of Initial Experience

  • The speaker shares their initial experience with Cloud Code and Trigger.dev, highlighting the ease of setting up automations and agents within a short time frame.
  • They mention creating a workflow to monitor Nate Jones' YouTube videos for new content, which provides key highlights if a new video is available.

Advanced Automation Features

  • The speaker describes building an agent that monitors tasks in ClickUp, conducting research on companies added as tasks, and providing comments back to the user.
  • Emphasizes the non-deterministic nature of this automation, allowing for dynamic decision-making based on different tools and inputs.

Building Workflows with Cloud Code

Understanding Cloud Code Functionality

  • The speaker explains how Cloud Code translates vague requests into actionable automations by specifying necessary components.
  • Discusses the range of tasks that can be automated—from simple API data fetching to complex agents capable of making decisions based on various conditions.

Transitioning to Trigger.dev

  • The advantages of using Trigger.dev over previous platforms like Modal are highlighted: flexibility, scheduled runs, automatic retries, queuing, orchestration capabilities, and a cleaner user interface.

Project Management in Trigger.dev

Task Organization and Scheduling

  • An overview of the current project setup in Trigger.dev is provided, detailing six different tasks including tools for processing videos and research agents.
  • Scheduled tasks are discussed; some run every 2 minutes while others operate every 8 hours.

Monitoring Task Performance

  • The speaker demonstrates how failed runs trigger automatic retries after delays. This feature enhances reliability in task execution.

Live Demonstration of Automation

Real-Time Task Execution

  • A live demo shows adding a new task (Nvidia) in ClickUp. The system processes this input through the research agent seamlessly.
  • Observations during execution reveal multiple calls made by Claude's search tool to ensure comprehensive research output before completion.

Interaction with Research Outputs

  • After completing the research brief on Nvidia, further interaction is demonstrated where follow-up questions about stock performance are posed to assess contextual understanding by the agent.

Demo of Trigger.dev and Cloud Code Workflows

Overview of Trigger.dev

  • The speaker demonstrates the functionality of Trigger.dev, showcasing a response from UpAI after a brief wait.
  • A quick introduction to Cloud Code is provided, with an invitation to watch a related video for beginners to understand the interface and file structure.

Building Workflows in Cloud Code

  • The speaker plans to create a new project step-by-step, emphasizing the importance of understanding how workflows are structured.
  • Key folders and files are highlighted: TypeScript files reside in the src directory under specific workflow categories like AI news digest and company research.

Setting Up the Environment

  • The speaker creates a blank folder named "trigger demo" for building automations using VS Code.
  • Instructions are given to download necessary files (claw.mmd and trigger ref.md) from the community classroom for easier automation building.

Creating an Automation Request

  • A vague request is made to build an automation that searches for dental practices every Monday, demonstrating how it reads from the cloud file.
  • The system prompts questions regarding lead delivery location (ClickUp), search area (nationwide), and API setup status.

Finalizing Automation Details

  • The user specifies parameters such as creating a new list in ClickUp and setting volume limits for leads.
  • An explanation is provided about generating an .env file for storing project secrets like API keys.

Workflow Execution Insights

  • Confirmation is received on readiness to build; details about searching Yelp Fusion AI for leads are shared.
  • Two tools will be created: one for finding leads and another for adding them into ClickUp, ensuring task reliability through item potency checks.

Project Setup Completion

  • The automation process begins with project setup; confirmation of successful creation of ClickUp lists and TypeScript files follows.

Yelp API Changes and Trigger.dev Setup

Setting Up API Keys

  • The speaker discusses the need to obtain a Yelp API key, noting that Yelp has discontinued its free API tier, prompting a switch to SER API instead.
  • After acquiring both the SER and ClickUp API keys, the speaker instructs on how to input these keys into an ENV file, emphasizing the importance of saving changes.

Development Environment Testing

  • The process involves testing in a development environment (trigger.dev), where modifications can be made before pushing updates to production.
  • A project reference is copied from project settings in trigger.dev for integration with Claude Code, which will facilitate task management.

Handling Environment Variables

  • The speaker explains that sensitive information like API keys is not pushed to GitHub or trigger.dev due to being stored in hidden files.
  • To add these variables back into trigger.dev, the speaker demonstrates copying all necessary environment variable data at once rather than individually.

Improving Workflow Execution

  • It’s recommended to set up both development and production environments simultaneously for efficiency when adding new variables.
  • The discussion includes enhancing test runs by configuring the MCP server within trigger.dev for better workflow execution.

Observing Test Runs and Results

  • After initiating a test run, multiple executions are observed as each dental lead found triggers a corresponding create action in ClickUp.
  • The results show successful creation of 25 leads across five cities within nine seconds, demonstrating effective automation through cloud code integration.

How to Push Your Project into Production

Preparing for Production

  • The workflow involves continuous improvement, adding features like personalized outreach and AI elements before pushing the project into production.
  • It's crucial to maintain an open connection with the local development server; otherwise, processes won't run as expected when transitioning from development to production.

Using GitHub for Deployment

  • The recommended method for pushing code is through GitHub, where the entire project can be stored in a repository.
  • Ensure that sensitive information (like API keys) is not included in public repositories; it's best practice to keep them private and manage them securely within trigger.dev.

Syncing with Trigger.dev

  • After authenticating with GitHub, it becomes easy to create repositories and make commits. This integration allows live automation or sites to sync automatically with GitHub.
  • Version control via GitHub facilitates collaboration among engineers and keeps project files secure in the cloud.

Connecting Repositories

  • Once the new GitHub repository is created, connect it within trigger.dev settings. Every push to the master branch will trigger a deployment in production.
  • If automatic syncing fails or isn't preferred, manual deployment options are available through Cloud Code.

Testing and Debugging Leads

  • A test run was conducted to find leads; however, some duplicates were identified during this process.
  • Adjustments were made in workflows to prevent duplication by implementing checks before creating new leads. This highlights the importance of thorough planning before executing builds.

Importance of Planning

  • The experience underscored the necessity of having a clear plan and understanding search criteria thoroughly before initiating automated processes.

Cloud Code and Automation Insights

Development Environment and Deployment Process

  • The speaker discusses the importance of using a development environment to avoid disrupting production systems, emphasizing a cautious approach to software deployment.
  • After validating changes in the development environment, the process involves pushing updates to GitHub, which triggers automatic live updates for users.
  • The goal is to ensure that everything is ready for deployment by Monday at 8 a.m., highlighting the need for timely preparation.

Building Automations with AI Tools

  • The speaker encourages viewers to utilize Cloud Code and resources from their community to create automations that can be integrated into trigger.dev for continuous operation.
  • A key takeaway is the recognition of AI as a "black box," where while models are powerful, they require clear communication and guidance from users during interaction.

Community Engagement and Learning Opportunities

  • The speaker expresses enthusiasm about learning new tools and invites feedback on what content viewers would like to see next.
  • They promote their paid community, AIS Plus, which offers courses, live Q&As, and networking opportunities among over 3,000 members interested in building businesses with AI.

Conclusion and Call to Action

  • The video concludes with an invitation for viewers to engage by liking the video if they found it helpful or informative.
  • Appreciation is expressed towards viewers who watch until the end, reinforcing community connection.
Video description

Full courses + unlimited support: https://www.skool.com/ai-automation-society-plus/about All my FREE resources: https://www.skool.com/ai-automation-society/about Work with me: https://uppitai.com/ My Tools💻 14 day FREE n8n trial: https://n8n.partnerlinks.io/22crlu8afq5r Code NATEHERK to Self-Host n8n for 10% off (annual plan): http://hostinger.com/nateherk Voice to text: https://ref.wisprflow.ai/nateherk I just discovered Trigger.dev and within 90 minutes I had multiple automations and AI agents running in the cloud by just talking to Claude Code in natural language. In this video, I walk you through exactly how to go from a vague idea to a fully deployed automation. We build a dental lead generator from scratch that runs every Monday, scrapes the web for leads, and drops them straight into ClickUp, all built with plain English prompts in Claude Code. Sponsorship Inquiries: 📧 sponsorships@nateherk.com Timestamps: 0:00 - Results & What We're Building 1:19 - How Claude Code + Trigger.dev Work Together 2:29 - Trigger.dev Dashboard Walkthrough 3:24 - Live Demo: Research Agent 5:23 - Building a Dental Lead Generator from Scratch 9:30 - Setting Up API Keys & Environment Variables 12:55 - Testing the Full Workflow 15:01 - Pushing to Production via GitHub 18:37 - Fixing Bugs & Iterating 19:42 - Final Thoughts & Key Takeaway 20:33 - Want to Master AI Automation?