See llms.txt for all machine-readable content.

Back to Templates

Triage Shopify refund and fraud requests with Gemini, Sightengine, Jira and Slack

Quick overview

Youtube Video: https://youtu.be/0lc_UfiqvIA

This workflow collects refund requests via an n8n Form, validates the order in Shopify, save contact to Klaviyo and Shopify journey data, checks images with Sightengine, and uses Gemini to generate fraud triage decision that is logged to Sheets, filed in Jira, and posted to Slack.

How it works

  1. Receives a refund request through an n8n Form with order details, reason, and an optional image attachment.
  2. Writes the submission to Google Sheets with a PENDING_TRIAGE status, then looks up the order in Shopify and checks that the order exists and the submitted email matches.
  3. If the order cannot be verified, updates the Google Sheets row with an invalid status and sends an alert to Slack.
  4. If the order is verified, looks up the customer in Klaviyo and creates a profile if one does not already exist.
  5. Fetches recent order history and customerJourneySummary data from Shopify GraphQL and builds a single AI context payload that also preserves the uploaded image.
  6. Sends the attachment to Sightengine’s GenAI detector, converts the result into an authenticity status and score, and passes everything to Google Gemini to produce a structured refund recommendation, fraud risk score, and notes.
  7. Creates a Jira issue with the AI triage report, updates the original Google Sheets row with the decision and Jira key, and notifies the support team in Slack.

Setup

  1. Create and publish the n8n Form, then share its public URL with customers or embed it where you collect refund requests.
  2. Connect Shopify OAuth2 credentials and ensure the workflow can access both the Admin REST API (order lookup) and Admin GraphQL API (customerJourneySummary query).
  3. Add Google Sheets service account credentials and update the spreadsheet ID and the “Refund Requests” sheet name/columns to match your document.
  4. Add Slack credentials and set the target channel(s) for unverified-order alerts and triaged-refund notifications.
  5. Add Jira Software Cloud credentials and select the target project and issue type for refund tickets.
  6. Add Klaviyo API credentials and configure the account that should own/track customer profiles, and provide Sightengine API credentials for the image authenticity check.