Find Flow Run Trigger Value

📘 Definition

The “Find Flow Run Trigger Value” action allows you to retrieve the complete JSON data that originally triggered a specific Zenphi flow run. While most trigger-related data is already available through the standard Trigger Outputs, this action provides a deeper, raw, and structured view into all parameters — especially useful when:

  • Certain fields are not exposed directly in the trigger output.
  • You want to reference the trigger data of a different flow run.
  • You need to reuse trigger data (e.g., from a form, email, HTTP call, or Google audit log) in another flow.
  • You're building technical, reusable, or cross-flow integrations, where having the full payload is critical.

Whether the trigger was an HTTP call, a Google Form submission, a received email, or an audit event, this action helps you extract and work with the exact values that started the automation. Paired with tools like “JSON to Object”, it becomes a powerful way to parse and use that data throughout your flow.



🧩 Example Use Cases

🔁 Replay or Reuse Trigger Data Across Flows

Use the action to retrieve the original trigger data of a completed flow run and reuse it in a new flow — for example, resending a webhook or triggering a follow-up workflow with the same input data.


🕵️‍♂️ Debugging or Auditing Flow Behavior

When debugging a flow, retrieve the exact values (form answers, email content, webhook body, etc.) that started a specific run. This helps in identifying incorrect data or missing fields.


📨 Access Complete Email Details

If your flow is triggered by Email Arrival, and the built-in trigger output doesn’t include all headers or metadata, use this action to retrieve the full JSON — including headers, recipient lists, or mailing list info.


📄 Restore Previous Form Submissions

For flows triggered by a Zenphi Form, you can fetch the original form answers even after the flow has run. This is useful for audit trails or archiving submissions.


🧠 Training & Testing Flows With Real Data

Want to test a new version of a flow using real-world data? Pull the trigger data from a previous flow run and use it to simulate production behavior.


🔍 Extract Full Google Audit Activity Metadata

If using Google Audit Activity triggers, you might need raw metadata (like parameters, actor info, etc.) not directly available in the default outputs. This action provides the complete dataset for more advanced conditions or compliance logging.



🔧 Inputs

This action requires two inputs that identify the specific flow and run whose trigger data you want to retrieve:


📌 Flow Id

**(You can select flow id from the list or add it as a token)**Specifies the flow you want to inspect.

  • You can choose a flow from your workspace using the dropdown.
  • Alternatively, use a dynamic token if the flow is referenced earlier in your automation (e.g., from a “List Flows” action).
  • This field helps Zenphi locate the automation that was executed.

Tip: This is scoped to your workspace — flows across all spaces will be listed.


🔁 Flow Run Id

**(Id of the run. You can get that from “List Flow Runs”)**Identifies the specific execution instance of the flow.

  • Each time a flow runs, Zenphi creates a unique ID for that run (called the flow run ID).
  • This input tells Zenphi which flow run’s trigger data you want to retrieve.
  • Typically obtained using a “List Flow Runs” action in a previous step.

Tip: Make sure the run ID matches the flow ID you provided above — they must belong to the same flow.



📤 Outputs

This action returns one output — but it’s the core of many powerful automations.


🔹 Trigger Value

(The JSON string of the trigger data that originally started this flow run)

This output contains all parameters, metadata, and content passed in by the trigger that started the flow. It's a full snapshot of the triggering context — ideal for:

  • 📦 Extracting input values with JSON to Object
  • 📊 Auditing who/what initiated the run
  • 🧠 Using dynamic data in later actions
  • 🔄 Replaying or simulating the same run inputs

🧬 Structure: Depends on the Trigger Type

Below are examples of what this JSON might look like, customized per trigger type, with fake data to illustrate clearly.


📬 Email Received Trigger

{
  "from": "[email protected]",
  "subject": "Invoice #45678 Ready",
  "deliveredTo": "[email protected]",
  "date": "2025-06-14T09:00:00Z",
  "htmlBody": "<p>Your invoice is attached.</p>",
  "textBody": "Your invoice is attached.",
  "attachments": [
    {
      "fileName": "Invoice45678.pdf",
      "downloadUrl": "..."
    }
  ],
  "threadId": "16abcc4597abc123",
  "labelIds": ["INBOX", "IMPORTANT"]
}

🧠 Use case: Parse subject line, save attachments, or extract invoice data.


🛡 Google Audit Activity Trigger

{
  "eventTime": "2025-03-01T08:22:13Z",
  "applicationName": "drive",
  "eventName": "edit",
  "actor": {
    "email": "[email protected]"
  },
  "parameters": [
    { "name": "doc_id", "value": "abcd1234" },
    { "name": "doc_title", "value": "Confidential Strategy" },
    { "name": "ip_address", "value": "10.0.0.25" }
  ]
}

🧠 Use case: Detect edits to sensitive files and route alerts based on file title.


🌐 HTTP Trigger (Webhook)

{
  "httpMethod": "POST",
  "remoteIp": "172.16.254.3",
  "headers": [
    { "key": "User-Agent", "value": "Zapier" },
    { "key": "Content-Type", "value": "application/json" }
  ],
  "httpBody": {
    "FirstName": "Leila",
    "LastName": "Durand",
    "Email": "[email protected]",
    "Status": "New Lead"
  }
}

🧠 Use case: External platforms trigger this flow to process a lead capture or webhook signal.


📝 Zenphi Form Submission Trigger

{
  "form": {
    "Email": "[email protected]",
    "LeaveType": "Parental Leave",
    "StartDate": "2025-08-10",
    "EndDate": "2025-08-24",
    "Notes": "Expecting twins"
  },
  "initiator": {
    "ipAddress": "192.168.1.55",
    "submitTime": "2025-08-01T10:20:30Z"
  }
}

🧠 Use case: Extract leave dates, calculate duration, notify HR, update calendars.


📄 Google Sheet Row Added Trigger

{
  "Row": {
    "Full Name": "Tariq Mansour",
    "Department": "Operations",
    "Start Date": "2025-07-01",
    "Contract Type": "Part-Time"
  },
  "Sheet Name": "Hiring Pipeline",
  "SpreadsheetId": "1a2b3cXYZ"
}

🧠 Use case: Auto-generate contract documents or schedule onboarding tasks.


⚙️ Manual Trigger

{
  "TriggeredBy": "[email protected]",
  "Comment": "Running a test with July’s pricing data"
}

🧠 Use case: Track who triggered manually and log reason/comment for audit.


🧩 Pro Tip: Use JSON to Object to Break It Down

Once you retrieve the Trigger Value, you can pass it directly into the “JSON to Object” action. That lets you:

  • 🔍 Access fields like form.Email or httpBody.Status
  • 🛠 Use values dynamically in branches, variables, or filters
  • 📥 Store or log structured trigger data



📘 Example Scenario: Retrieving Original Email Details for Support Ticket Automation

Situation:

Your flow is triggered whenever a new email arrives in [email protected]. The trigger provides basic email info, but you need the full original trigger data (including headers, metadata, and raw content) to perform more detailed processing.

How to set it up:

  1. Start with your email arrival trigger flowThis flow activates when an email arrives at [email protected] and handles basic email processing.

  2. Find the original flow run for this emailUse actions in the Zenphi category like “List Flow Runs” to get recent runs of the email trigger flow.

  3. Filter flow runs to find the relevant oneUse the “Query Collection” action to filter the list and select the second-to-last flow run (i.e., the flow run before the most recent one), or whichever run corresponds to the email you want to analyze.

  4. Add the “Find Flow Run Trigger Value” action in a follow-up flow:

    • Flow ID: Select the ID of your email arrival flow.
    • Flow Run ID: Pass the filtered flow run ID from the previous step.
  5. Parse the JSON trigger outputUse a “JSON to Object” action to transform the JSON string into a structured object.

  6. Access detailed email dataExtract full headers, raw body, metadata, or any other hidden fields that were not available in the original trigger outputs.

  7. Perform advanced automationFor example:

    • Analyze email headers for spam detection.
    • Extract custom metadata for routing.
    • Generate detailed reports or logs with full email info.

Benefits:

  • Access complete, raw trigger data for more in-depth processing.
  • Combine Zenphi actions to locate and retrieve specific flow run details.
  • Enhance your email automation workflows with richer data and better control.