Skip to content

Shopify Webhook

This component acts as a listener for your Shopify store. When something happens in Shopify, such as a new order coming in or a product price changing, this component catches that information, organizes it, and passes it along to the rest of your workflow so you can automate actions based on those changes.

How it Works

This component connects directly to the Shopify Admin API to monitor your store in real-time. It works as an intermediary between Shopify and your automation graph:

  1. Listening: It waits for events triggered by changes in your Shopify store based on the settings you configure.
  2. Processing: When an event occurs, the component receives the raw data and structures it into a uniform format.
  3. Output: It produces structured data that includes key details like the event type, resource ID, title, and timestamp. This data can then be used by other components in your workflow to perform actions, make decisions, or trigger AI analysis.

The component is designed to handle data robustly, ensuring that even if the incoming data format varies, it is safely parsed and passed on without breaking your flow.

Connection & Credentials

This component requires configuring a credential in the Nappai panel before interacting with the external service:

  1. Go to the Credentials section in your Nappai panel.
  2. Create a new credential of the type Shopify API and fill in the required fields (Shop URL, API Client ID, API Secret Key, API Version). You can find these credentials by creating an app in your Shopify Admin under Settings > Apps > Develop apps.
  3. In your workflow, select the saved credential in the Credential input field of this node.

Inputs

Input Fields

The following fields are available to configure this component:

  • Resource Type: Specifies the Shopify resource to monitor for changes. Select the type of data you want to track, such as orders, products, or customers.

    • Visible in: All configurations
  • Events: Defines the specific Shopify events to listen for. Use this to filter for actions like Order Created or Order Updated.

    • Visible in: All configurations

Outputs

Output Data Example (JSON)

The component produces structured data that includes metadata and the full record of the event. You can map this output to other components to use the information in your workflow. json { “event”: “order_created”, “resource_type”: “orders”, “id”: “44223311”, “title”: “Order #1025”, “updated_at”: “2024-05-20T14:30:00Z”, “record”: { “name”: “Order #1025”, “status”: “paid”, “total_price”: “150.00”, “customer”: { “email”: “buyer@example.com”, “first_name”: “John” } } }

Connectivity

This component is typically used as a trigger or source within a workflow. It is designed to pass data to downstream components that process or act on Shopify events.

Typical Connections:

  • LLM / AI Nodes: Connect to AI models to analyze order details, draft customer responses, or generate summaries.
  • Action / API Nodes: Connect to components that send notifications (e.g., Email, Slack) or update external databases based on the event.
  • Conditional / Filter Nodes: Connect to logic nodes to route data only when specific criteria are met (e.g., process only high-value orders).

Usage Example

Scenario: Notify the team of new orders

  1. Set Resource Type to orders.
  2. Set Events to select Order Created.
  3. Connect the Data output to an Email Sender component.
  4. In the email body, map the fields from the Shopify Webhook output to include the order ID, customer name, and total amount.
  5. When a new order is placed in Shopify, this workflow automatically triggers and sends a notification to your team.

Tips and Best Practices

  • Select Specific Events: Choose only the events you need (e.g., Order Created vs Order Updated) to reduce unnecessary data processing and improve performance.
  • Validate Credentials: Ensure your Shopify API credential has the necessary permissions for the selected resource type.
  • Use Mapping: Take advantage of the structured output to map specific fields like customer.email or record.total_price to downstream actions.
  • Real-time Monitoring: This component supports listening mode, making it ideal for workflows that require immediate reaction to store changes.

Security Considerations

  • Credential Protection: Never share or expose your Shopify API credentials in shared workflows. Use Nappai’s secure credential system.
  • Least Privilege: When creating your Shopify API app, request only the permissions necessary for the resources you monitor to minimize security risks.
  • Data Privacy: Be mindful of sensitive data in Shopify records (like customer PII) when passing data to AI models or external services. Ensure your downstream components comply with relevant data protection regulations.