# Datadog: Create a Graph Snapshot

Generates a Datadog graph snapshot image from a specified metric query, giving responders visual context for an active incident.


> **Availability:** See the [Incident Workflow Actions Overview table](/workflow-actions) for the plans this workflow is available on.

## Description

Generate a snapshot graph from a metric query.

## Instructions

1. If you have not done so, follow the instructions to [Create an Incident Workflow](/ai-automation/automation/incident-workflows#create-an-incident-workflow).
2. When the instructions prompt you to [add actions](/ai-automation/automation/incident-workflows#add-actions), select **this action**.
3. Enter the following **Inputs** and click **Save**.
4. Continue following instructions to **Publish** the Workflow.
5. When the action runs, you will see the **Outputs** listed below.

## Inputs

> **Field References:** Fields with the **\{+\}** icon accept [Field References](/ai-automation/automation/incident-workflows#field-references), which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click **\{+\}**, or enter `{{`, and select relevant fields. Refer to the [Field References](/ai-automation/automation/incident-workflows#field-references) article for more information.

| Name                   | Description                                                                                                                                                 |
| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Integration            | Select a [Workflow Integration](/ai-automation/automation/incident-workflows/workflow-integrations)  or click **New Datadog Connection** to establish a new one. |
| Metric Query           | Enter the metric query or JSON graph definition. You can paste here from the "Copy query to clipboard" option on your Datadog graph.                        |
| Start Time             | Select a value from the dropdown. This represent's the graph's start time.                                                                                  |
| End Time               | Select a value from the dropdown. This represent's the graph's end time.                                                                                    |
| Graph Height in Pixels | The height of the graph in pixels. Must be between `100` and `10,000`.                                                                                      |
| Graph Width in Pixels  | The width of the graph in pixels. Must be between `100` and `10,000`.                                                                                       |

## Outputs

| Name | Description |
| :--- | :--- |
| Graph Snapshot URL | The URL of the graph snapshot. Reference this field in a subsequent action, e.g., [Send a Message to a Channel](/workflow-actions/slack/send-a-message-to-a-channel) . Please read [Action-Specific Field References](/ai-automation/automation/incident-workflows#action-specific-field-references) for more information about referencing output values in subsequent actions. If you have the [Datadog Slack app](https://slack.com/apps/AR28NTK5M-datadog) installed in your Slack instance, you can include this URL in a Slack message to see an unfurled image of the graph. This feature requires that Slack is not configured to block images from the Datadog domain. |
| Result | Value that shows if the action was successful or not. Either "Success" or "Failed." |
| Result Summary | Brief description of what the action did or if it failed. |
| Error | Brief description that is populated if the action failed. |
