Route Form Submissions by Company Type

Difficulty
4/10
Tags
switch-nodeconditional-routinggoogle-sheetsslackform-trigger
Requirements
Google Sheets ApiSlack Api

Your startup receives inbound leads from a web form. Each submission includes a company_type field that can be: ideal_customer, high_value, low_value, or none.

Not every submission deserves the same treatment — high-value prospects need immediate attention, while low-value leads can be nurtured automatically.

What you'll practice:

  • Switch node for multi-path routing
  • Google Sheets integration
  • Slack notifications
  • Handling "no match" cases

Hints

  1. Use an HTTP Request node to fetch the form submissions
  2. Add a Switch node to route based on the company_type field
  3. Connect each output to the appropriate destination node

Setup required:

  • Google Sheets: Create a sheet with two tabs ("High Value Leads" and "Nurture List") with headers: ID, Name, Email, Company, Message, Submitted At
  • Slack: Connect your workspace and choose a channel

Constraints:

  • Use a Switch node (not multiple IF nodes)
  • Slack messages should include name, company, and message
  • Google Sheets rows should include all relevant fields
  • none submissions should trigger no action

Alternatives: No Google Sheets? Use Notion/Airtable. No Slack? Use Discord/Email.

Explanation

The solution uses a Switch node to evaluate the company_type field and route data to different paths.

Key concepts demonstrated:

  • Fetching JSON data with an HTTP Request node
  • Using the Switch node with multiple outputs based on field values
  • Configuring Google Sheets nodes to append rows to specific sheets
  • Formatting Slack messages with dynamic data using expressions
  • Leaving the "none" path unconnected (or using a No Operation node) to ignore submissions

Login to see the exercise

Create an account to access challenges and track your progress.

Log in to see exercise