> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/workflowsactions.md).

# Workflows.Actions

## Overview

### Available Operations

* [Create](#create) - Create Action

## Create

Create an Action for a workflow

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.Workflows.Actions.Create(ctx, "<id>", components.CreateV3WorkflowsActionRequestV3WorkflowsSqCreateStatusPageIssue(
        components.V3WorkflowsSqCreateStatusPageIssue{
            Name: components.V3WorkflowsSqCreateStatusPageIssueNameSqAddStatusPageIssue,
            Data: components.V3WorkflowsSqCreateStatusPageIssueData{
                ComponentAndImpact: []components.V3WorkflowsComponentAndImpact{},
                IssueTitle: "<value>",
                PageStatusID: 179034,
                StatusAndMessage: []components.V3WorkflowsIssueStatusAndMessage{
                    components.V3WorkflowsIssueStatusAndMessage{
                        Messages: []string{
                            "<value 1>",
                            "<value 2>",
                            "<value 3>",
                        },
                        StatusID: 692068,
                    },
                },
                StatusPageID: 368871,
            },
        },
    ))
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        switch res.Object.Data.Type {
            case components.V3WorkflowsActionResponseTypeV3WorkflowsActionResponseSqAttachRunbooks:
                // res.Object.Data.V3WorkflowsActionResponseSqAttachRunbooks is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqMarkIncidentSLOAffecting:
                // res.Object.Data.V3WorkflowsSqMarkIncidentSLOAffecting is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqTriggerManualWebhook:
                // res.Object.Data.V3WorkflowsSqTriggerManualWebhook is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsUpdateIncidentPriority:
                // res.Object.Data.V3WorkflowsUpdateIncidentPriority is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqCreateStatusPageIssue:
                // res.Object.Data.V3WorkflowsSqCreateStatusPageIssue is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqAddIncidentNote:
                // res.Object.Data.V3WorkflowsSqAddIncidentNote is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSlackArchiveChannel:
                // res.Object.Data.V3WorkflowsSlackArchiveChannel is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqAddCommunicationChannel:
                // res.Object.Data.V3WorkflowsSqAddCommunicationChannel is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSlackMessageChannel:
                // res.Object.Data.V3WorkflowsSlackMessageChannel is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSlackMessageUser:
                // res.Object.Data.V3WorkflowsSlackMessageUser is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqMakeHTTPCall:
                // res.Object.Data.V3WorkflowsSqMakeHTTPCall is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSlackCreateIncidentChannel:
                // res.Object.Data.V3WorkflowsSlackCreateIncidentChannel is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsJiraCreateTicket:
                // res.Object.Data.V3WorkflowsJiraCreateTicket is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsMsTeamsMessageChannel:
                // res.Object.Data.V3WorkflowsMsTeamsMessageChannel is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsMsTeamsMessageUser:
                // res.Object.Data.V3WorkflowsMsTeamsMessageUser is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsSqSendEmail:
                // res.Object.Data.V3WorkflowsSqSendEmail is populated
            case components.V3WorkflowsActionResponseTypeV3WorkflowsMsTeamsCreateMeetingLink:
                // res.Object.Data.V3WorkflowsMsTeamsCreateMeetingLink is populated
            case components.V3WorkflowsActionResponseTypeAny:
                // res.Object.Data.Any is populated
        }

    }
}
```

### Parameters

| Parameter                  | Type                                                                                              | Required             | Description                         |
| -------------------------- | ------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`                      | [context.Context](https://pkg.go.dev/context#Context)                                             | :heavy\_check\_mark: | The context to use for the request. |
| `workflowID`               | `string`                                                                                          | :heavy\_check\_mark: | N/A                                 |
| `v3WorkflowsActionRequest` | [components.V3WorkflowsActionRequest](/go-sdk/docs/models/components/v3workflowsactionrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                     | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                  | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.WorkflowsCreateActionResponse**](/go-sdk/docs/models/operations/workflowscreateactionresponse.md)**, error**

### Errors

| Error Type                         | Status Code | Content Type     |
| ---------------------------------- | ----------- | ---------------- |
| apierrors.BadRequestError          | 400         | application/json |
| apierrors.UnauthorizedError        | 401         | application/json |
| apierrors.PaymentRequiredError     | 402         | application/json |
| apierrors.ForbiddenError           | 403         | application/json |
| apierrors.NotFoundError            | 404         | application/json |
| apierrors.ConflictError            | 409         | application/json |
| apierrors.UnprocessableEntityError | 422         | application/json |
| apierrors.InternalServerError      | 500         | application/json |
| apierrors.BadGatewayError          | 502         | application/json |
| apierrors.ServiceUnavailableError  | 503         | application/json |
| apierrors.GatewayTimeoutError      | 504         | application/json |
| apierrors.APIError                 | 4XX, 5XX    | \*/\*            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/workflowsactions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
