# Viewing detailed logs for a flow run

## Introduction

Having [accessed run logs](https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue) and selected the `view logs` option for a given flow run, you can view:

* [An insights summary with performance-related information for the process flow](#insights-summary)
* [Detailed logs for each step in the flow](#detailed-logs)

## Insights summary

The insights summary is divided into three functional areas:&#x20;

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F4aY6c9BZLvnFnkWfSRXB%2Fview%20logs%20annotated.png?alt=media&#x26;token=e40eb9da-fce8-41bc-bb4c-dea7b58abee8" alt=""><figcaption></figcaption></figure></div>

At the top of the page, you'll find the unique `flow run id` <mark style="color:$danger;">**(A)**</mark>, followed by an ellipses option <mark style="color:$danger;">**(B)**</mark> providing access to [additional options](#additional-options) - these options will vary, depending on whether the run succeeded or failed. &#x20;

{% hint style="info" %}
You'll notice a  `copy link with current company id` icon to the right of the unique `flow run id`. This can be used to copy a link to this log, including your company profile id:&#x20;

<img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FMuVLwHlnwmD9esorYJ2z%2Fprocess%20flow%20canvas%20copy%20company%20link.png?alt=media&#x26;token=d1b41661-ef61-4943-8fe2-784530cc6933" alt="" data-size="original">

This is useful if:

* You manage multiple Patchworks profiles. Sharing this link with other team members (who have sufficient permissions) means they can access the log directly, seamlessly switching to the relevant company profile.&#x20;
* You need to raise a support query regarding a process flow run. Including this link in your support ticket means that a member of our Support team can access the log more efficiently, seamlessly switching to the relevant company profile.&#x20;
  {% endhint %}

Below the `flow run id`, you can see basic details for the process flow <mark style="color:$danger;">**(C)**</mark> - this includes `name`, `id`, and `version`, together with `triggered by`, `status`, `start time`, `duration`, `CPU time`, and `data`.&#x20;

{% hint style="info" %}
If this log relates to [an inactive process flow version that's been deleted](https://doc.wearepatchworks.com/product-documentation/building-process-flows/process-flow-versioning#deleting-an-inactive-version), you'll see a message to this effect against `flow version` - for example:

<img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fn78qRMkF0QF7MvL4KuRC%2Frun%20logs%20-%20deleted%20flow%20version%20b.png?alt=media&#x26;token=c660ca19-3586-4b2a-8d0c-007928e7dc2f" alt="" data-size="original">
{% endhint %}

The lower panel <mark style="color:$danger;">**(D)**</mark> shows every step (i.e. every shape) in the flow. These are listed in processing sequence, with the following information:

## Detailed logs

In the lower panel of the insights summary, you can click any entry to access detailed logs:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FW3xUyIc0uZ4FvnZsb1SQ%2Flog%20details%201.png?alt=media&#x26;token=0c5476b8-2c67-43f4-8a4e-6c1cc7ad0a37" alt=""><figcaption></figcaption></figure></div>

In the top section, you can see a full history of what happened during this step - this will often display over multiple pages.

In the lower section, you can view and download any payloads associated with this step. Click the 'view' icon associated with any payload to see the contents:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FHytGT2vZT1wfgC5prL8v%2Flog%20details%202.png?alt=media&#x26;token=87c18e83-a431-4d4b-a346-bb187637b0ac" alt=""><figcaption></figcaption></figure></div>

...the payload is displayed:&#x20;

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FKrMPQe0fCuFWYAdNhPUg%2Flog%20details%203.png?alt=media&#x26;token=9512532d-747e-45db-ac78-db3fba307da2" alt=""><figcaption></figcaption></figure>

Longer payloads are trimmed but you can use the download option to retrieve the full content:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FBgVnYWtHRQGPQfMlCtkR%2Flog%20details%204.png?alt=media&#x26;token=a5e5918c-cfae-48b8-ab42-d8e1ff7eb49c" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Payloads are available for 72 hours after the process flow has run.&#x20;
{% endhint %}

{% hint style="info" %}
If a [failed payload was removed](https://doc.wearepatchworks.com/product-documentation/building-process-flows/process-flow-settings#understanding-process-flow-settings) so that the flow run could continue (either because connector settings are set to do this OR a [try/catch shape](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/try-catch-shape) has found exceptions), it's displayed with a *failed payload* status - for example:\
\
![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FelCpR1U69NJP9sBMXnqo%2F2failed%20payload%20in%20logs.png?alt=media\&token=13b6d00d-c219-48eb-b0e2-bc076f2b1289)
{% endhint %}

## Additional options

The ellipses icon in the top, right-hand corner provides access to additional options. These options vary, depending on whether the run failed or succeeded.

When a run is successful or partially successful, you can [download run logs](https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue/working-with-run-logs/downloading-run-logs). If the run failed, you can [download logs](https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue/working-with-run-logs/downloading-run-logs) and also [retry the run](https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue/working-with-run-logs/handling-failed-process-flow-runs/retrying-a-failed-process-flow-run).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue/working-with-run-logs/viewing-detailed-logs-for-a-flow-run.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
