> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novu.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Go SDK

> Connect a Go application to Novu with the official server SDK to trigger workflows, manage subscribers, and send notifications from Go services.

Novu's Go SDK provides simple, yet comprehensive notification management, and delivery capabilities through multiple channels that you can implement using code that integrates seamlessly with your Go application.

[Explore the source code on GitHub](https://github.com/novuhq/novu-go)

## Installation

```go theme={null}
go get github.com/novuhq/novu-go
```

## Usage

<Tabs>
  <Tab title="US Region">
    ```go theme={null}
    package main

    import (
    	"context"
    	novugo "github.com/novuhq/novu-go"
    	"github.com/novuhq/novu-go/models/components"
    	"log"
    	"os"
    )

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

        s := novugo.New(
        	novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
        )

        res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
        	WorkflowID: "workflow_identifier",
        	Payload: map[string]any{
        		"comment_id": "string",
        		"post": map[string]any{
        			"text": "string",
        		},
        	},
        	Overrides: map[string]map[string]any{
        		"email": map[string]any{
        			"bcc": "no-reply@novu.co",
        		},
        	},
        	To: components.CreateToSubscriberPayloadDto(
        		components.SubscriberPayloadDto{
        			SubscriberID: "subscriber_uniuqe_identifier",
        			FirstName: "Albert",
        			LastName: "Einstein",
        			Email: "albert@einstein.com",
        		},
        	),
        }, nil)
        if err != nil {
        	log.Fatal(err)
        }
        if res.TriggerEventResponseDto != nil {
        	// handle response
        }

    }

    ```
  </Tab>

  <Tab title="EU Region">
    ```go theme={null}
    package main

    import (
    	"context"
    	novugo "github.com/novuhq/novu-go"
    	"github.com/novuhq/novu-go/models/components"
    	"log"
    	"os"
    )

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

    	s := novugo.New(
    		novugo.WithServerURL("https://eu.api.novu.co"),
    		novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
    	)

    	res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
    		WorkflowID: "workflow_identifier",
    		Payload: map[string]any{
    			"comment_id": "string",
    			"post": map[string]any{
    				"text": "string",
    			},
    		},
    		Overrides: map[string]map[string]any{
    			"email": map[string]any{
    				"bcc": "no-reply@novu.co",
    			},
    		},
    		To: components.CreateToSubscriberPayloadDto(
    			components.SubscriberPayloadDto{
    				SubscriberID: "subscriber_uniuqe_identifier",
    				FirstName: "Albert",
    				LastName: "Einstein",
    				Email: "albert@einstein.com",
    			},
    		),
    	}, nil)
    	if err != nil {
    		log.Fatal(err)
    	}
    	if res.TriggerEventResponseDto != nil {
    		// handle response
    	}
    }
    ```
  </Tab>
</Tabs>
