You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Zapier CLI中Hook Trigger的inputFields选项未在Zap创建表单显示

Troubleshooting Missing Input Fields for Zapier Hook Trigger

It looks like your Hook Trigger is missing some critical components that Zapier requires to render the input form. Let's break down the issues and fix them step by step:

Key Issues in Your Current Configuration

  1. Missing Required Hook Methods: Zapier's hook type triggers must have subscribe and unsubscribe methods to manage webhook subscriptions. Without these, Zapier can't complete the hook setup flow, so it skips rendering the input fields entirely.
  2. Input Field Missing Label: While your action field has choices, it lacks a clear label—this can cause Zapier to fail to render the field properly.
  3. Generic Display Text: The placeholder text values for display.label and display.description don't provide enough context, though this is more of a usability issue than a functional one.

Fixed Configuration Example

Here's an updated version of your trigger with all necessary components:

{
  key: 'booking',
  noun: 'Booking',
  display: {
    label: 'Booking Events', // Replace with meaningful text
    description: 'Triggers when a booking is created, updated, or canceled.',
    important: true
  },
  operation: {
    type: 'hook',
    inputFields: [
      {
        key: 'action',
        label: 'Trigger On', // Add a clear label for the field
        required: true,
        choices: {
          created: 'New booking placed',
          updated: 'Booking amendment',
          canceled: 'Booking canceled'
        }
      }
    ],
    // Required: Subscribe to the webhook event
    subscribe: async (z, bundle) => {
      // Replace with your actual API endpoint to create webhook subscriptions
      const response = await z.request({
        method: 'POST',
        url: 'https://your-api-domain.com/webhooks/subscribe',
        body: {
          event_type: bundle.inputData.action,
          target_url: bundle.targetUrl // Zapier provides this webhook URL
        }
      });
      // Return subscription data (like an ID) to use in unsubscribe
      return response.data;
    },
    // Required: Unsubscribe from the webhook event
    unsubscribe: async (z, bundle) => {
      // Replace with your API endpoint to delete webhook subscriptions
      await z.request({
        method: 'DELETE',
        url: `https://your-api-domain.com/webhooks/${bundle.subscribeData.id}`
      });
      return true;
    },
    // Optional: Return sample data for testing the trigger
    perform: async (z, bundle) => {
      return [
        {
          id: 'test-booking-123',
          action: bundle.inputData.action,
          customer_name: 'Jane Doe',
          booking_date: new Date().toISOString()
        }
      ];
    }
  }
};

Additional Troubleshooting Steps

  1. Validate Your Configuration: Run zapier validate in your terminal to catch any schema errors you might have missed.
  2. Re-push the Integration: After updating the code, run zapier push again to ensure the changes are deployed to Zapier.
  3. Check Zap Editor for Hidden Options: In some cases, input fields might be collapsed—look for a "Show Options" toggle in the Trigger setup screen after selecting your trigger.

内容的提问来源于stack exchange,提问作者Martin Tsenov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 09:10:17