﻿{
  "name": "[SAMPLE] Finalized invoice webhook handler",
  "type": "SHARED",
  "summary": "",
  "description": "",
  "tags": [],
  "blogUrl": "",
  "metadata": {},
  "author": "Sucrine Club",
  "categories": [],
  "pieces": [
    "@activepieces/piece-webhook",
    "@activepieces/piece-store",
    "@activepieces/piece-http"
  ],
  "flows": [
    {
      "displayName": "[SAMPLE] Finalized invoice webhook handler",
      "trigger": {
        "name": "trigger",
        "valid": true,
        "displayName": "Invoice.finalized Webhook",
        "nextAction": {
          "name": "step_11",
          "skip": false,
          "type": "PIECE",
          "valid": true,
          "settings": {
            "input": {
              "fields": {
                "body": {},
                "status": 200,
                "headers": {}
              },
              "respond": "respond",
              "responseType": "json"
            },
            "pieceName": "@activepieces/piece-webhook",
            "actionName": "return_response",
            "sampleData": {},
            "pieceVersion": "0.1.36",
            "propertySettings": {
              "fields": {
                "type": "MANUAL",
                "schema": {
                  "body": {
                    "type": "JSON",
                    "required": true,
                    "displayName": "JSON Body"
                  },
                  "status": {
                    "type": "NUMBER",
                    "required": false,
                    "displayName": "Status",
                    "defaultValue": 200
                  },
                  "headers": {
                    "type": "OBJECT",
                    "required": false,
                    "displayName": "Headers"
                  }
                }
              },
              "respond": {
                "type": "MANUAL"
              },
              "responseType": {
                "type": "MANUAL"
              }
            },
            "errorHandlingOptions": {
              "retryOnFailure": {
                "value": false
              },
              "continueOnFailure": {
                "value": false
              }
            }
          },
          "nextAction": {
            "name": "step_9",
            "skip": false,
            "type": "PIECE",
            "valid": true,
            "settings": {
              "input": {
                "key": "SUCRINEPRO_API_KEY",
                "store_scope": "COLLECTION",
                "defaultValue": "changeme"
              },
              "pieceName": "@activepieces/piece-store",
              "actionName": "get",
              "sampleData": {},
              "pieceVersion": "0.6.15",
              "propertySettings": {
                "key": {
                  "type": "MANUAL"
                },
                "store_scope": {
                  "type": "MANUAL"
                },
                "defaultValue": {
                  "type": "MANUAL"
                }
              },
              "errorHandlingOptions": {
                "retryOnFailure": {
                  "value": false
                },
                "continueOnFailure": {
                  "value": false
                }
              }
            },
            "nextAction": {
              "name": "step_3",
              "skip": false,
              "type": "PIECE",
              "valid": true,
              "settings": {
                "input": {
                  "url": "https://app.sucrine.club/api/professional/contacts/{{trigger['output']['body']['data']['customerContactId']}}",
                  "body": {},
                  "method": "GET",
                  "headers": {
                    "Authorization": "ApiKey {{step_9['output']}}"
                  },
                  "authType": "NONE",
                  "body_type": null,
                  "use_proxy": false,
                  "authFields": {},
                  "failureMode": "continue_none",
                  "queryParams": {},
                  "proxy_settings": {},
                  "followRedirects": true,
                  "response_is_binary": false
                },
                "pieceName": "@activepieces/piece-http",
                "actionName": "send_request",
                "sampleData": {},
                "pieceVersion": "0.11.10",
                "propertySettings": {
                  "url": {
                    "type": "MANUAL"
                  },
                  "body": {
                    "type": "MANUAL",
                    "schema": {}
                  },
                  "method": {
                    "type": "MANUAL"
                  },
                  "headers": {
                    "type": "MANUAL"
                  },
                  "timeout": {
                    "type": "MANUAL"
                  },
                  "authType": {
                    "type": "MANUAL"
                  },
                  "body_type": {
                    "type": "MANUAL"
                  },
                  "use_proxy": {
                    "type": "MANUAL"
                  },
                  "authFields": {
                    "type": "MANUAL",
                    "schema": {}
                  },
                  "failureMode": {
                    "type": "MANUAL"
                  },
                  "queryParams": {
                    "type": "MANUAL"
                  },
                  "proxy_settings": {
                    "type": "MANUAL",
                    "schema": {}
                  },
                  "followRedirects": {
                    "type": "MANUAL"
                  },
                  "response_is_binary": {
                    "type": "MANUAL"
                  }
                },
                "errorHandlingOptions": {
                  "retryOnFailure": {
                    "value": false
                  },
                  "continueOnFailure": {
                    "value": false
                  }
                }
              },
              "displayName": "Get Contact from invoice",
              "lastUpdatedDate": "2026-08-07T22:01:04.811Z"
            },
            "displayName": "Get API KEY",
            "lastUpdatedDate": "2026-08-07T21:59:51.110Z"
          },
          "displayName": "Return Response",
          "lastUpdatedDate": "2026-08-07T21:58:54.179Z"
        },
        "lastUpdatedDate": "2026-08-07T21:58:54.179Z",
        "type": "PIECE_TRIGGER",
        "settings": {
          "propertySettings": {
            "authType": {
              "type": "MANUAL"
            },
            "authFields": {
              "type": "MANUAL",
              "schema": {}
            },
            "liveMarkdown": {
              "type": "MANUAL"
            },
            "syncMarkdown": {
              "type": "MANUAL"
            },
            "testMarkdown": {
              "type": "MANUAL"
            }
          },
          "pieceName": "@activepieces/piece-webhook",
          "pieceVersion": "0.1.36",
          "triggerName": "catch_webhook",
          "input": {
            "authType": "none",
            "authFields": {}
          }
        }
      },
      "valid": true,
      "schemaVersion": "22",
      "notes": []
    }
  ],
  "status": "PUBLISHED"
}