> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Push Benchling Request Notification to Slack

> **Warning**
>
> **This recipe is outdated**
>
> Requests are a legacy feature, and are no longer being enabled for customers. This article is in the process of being modernized. Interested customers should instead consider [Benchling Workflows](https://www.benchling.com/resources/benchling-workflows-product-sheet).
>
> The integration below listens for the V2 `v2.request.created` event over AWS EventBridge. It has no [V3](/docs/v3-api-overview) equivalent today: V3 emits no request events, and [V3 events](/docs/v3-events) are in beta and delivered over webhooks only, not EventBridge. Workflows emit their own V2 events, such as `v2.workflowTaskGroup.created`; see the [Events Reference](/docs/events-reference).

## Overview

A guide to a serverless integration using AWS services to connect the Benchling Requests application with your Slack workspace. This integration will use the [Benchling Events Framework](/docs/events-getting-started) to post a notification of a newly created Benchling Request to a Slack channel.

![A Slack message announcing a newly created Benchling Request, with its name, requestor, and comments](/_fern-files/_img/f83d087fa93b35609c5e6a66922954e15e30f07c2685050999286bc1237ef7e3.webp)

### High Level Integration Flow

![A diagram showing a Benchling Request event flowing through AWS EventBridge to a Lambda function, which posts to Slack and logs to CloudWatch](/_fern-files/_img/72db198c61fb2b2a233a8286ace9bc9e3421404e339ab14215ac8bbe5f0f45da.webp)

* [**Benchling Requests**](https://help.benchling.com/hc/en-us/sections/39551547645709-Legacy-Requests): A single system for request submission and fulfillment and an integrated part of the Benchling platform.
* [**AWS EventBridge**](https://aws.amazon.com/eventbridge/): This integration receives Benchling events through AWS EventBridge Partner Event Sources. Benchling can also deliver events to apps over [webhooks](/docs/getting-started-with-webhooks).
* [**AWS Lambda**](https://aws.amazon.com/lambda/): AWS Lambda is a serverless compute service that runs your code in response to events such as EventBridge partner events and automatically manages the underlying compute resources for you.
* [**AWS CloudWatch**](https://aws.amazon.com/cloudwatch/): AWS CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real time, essentially built-in logs.
* [**Slack**](https://slack.com/): Cloud-based team collaboration tool commonly used to simplify internal communication in order to increase efficiency.

### Prerequisites

1. AWS Account with access to AWS EventBridge, AWS Lambda, AWS CloudWatch
2. Benchling Events Framework Enabled
3. Slack Workspace with Admin permissions to create a Slack App

## Benchling Configurations

### Benchling Request

Let's start by configuring a simple Benchling Request within Benchling's **Admin Request Settings**. Refer to the help article for details on configuring a [new Request Schema](https://help.benchling.com/hc/en-us/articles/39949604916237-Configure-legacy-Requests).

For this example use the below JSON to configure a Benchling Request Schema with an optional field "Request Comments".

```json
{
    "fields": [
        {
            "isMulti": false,
            "type": "text",
            "displayName": "Request Comments",
            "name": "request_comments",
            "isRequired": false
        }
    ],
    "idPrefix": "SR",
    "taskSchemas": []
}
```

![The Benchling request schema settings page with the Request Comments text field configured](/_fern-files/_img/db34d69f1f653cddc752e4edc30ade78ccc7134148059f8e79ee599f5492ef2d.webp)

### Benchling Events

Benchling's Events Configuration is part of the Benchling **Developer Console** and needs to be enabled by a Benchling Admin. Please reach out to your Benchling contact to get access to this functionality.

Next, **before continuing**, follow the [Events Getting Started Guide](/docs/events-getting-started) to subscribe to the `v2.request.created` event.

![The Benchling Developer Console event subscription form, subscribing to the v2.request.created event](/_fern-files/_img/e086c892a350daabcbb92449875b601ac69203b84883dc56846ec9953b9a81d1.webp)

## AWS EventBridge

After activating your event bus in the linked AWS account, set the following AWS EventBridge event rule pattern to route the `v2.request.created` event:

> **Warning**
>
> **Associate the Event Rule to the correct Event Bus**
>
> Make sure to select the Benchling event bus you activated from the available event buses dropdown, before creating a new rule. AWS will have a default event bus pre-selected which is not the correct event bus.

```json
{
  "detail-type": [
    "v2.request.created"
  ]
}
```

> **Note**
>
> If you have other requests configured in Benchling the rule above will apply to all requests. You
> can add additional fields to the event rule to filter on a specific request.

For example:

```json
{
  "detail-type": [
    "v2.request.created"
  ],
  "detail": {
    "schema": {
      "name": ["Slack Request"]
    }
  }
}
```

Add a CloudWatch **Log group** target for the event rule to confirm you are able to receive events when a request is created.

![An EventBridge rule with a CloudWatch log group configured as its target](/_fern-files/_img/35d0dee17cec004e020088585f71843f15ba481b62f97d09c56a803f3d98e296.webp)

[Create a new request](https://help.benchling.com/hc/en-us/articles/39948200885261-Create-manage-and-execute-legacy-Requests) in Benchling, and check the CloudWatch log group to confirm you are able to receive the event in your AWS environment.

## Slack Configuration

Now we can configure our Slack workspace to receive messages via a webhook URL. From the setup we will need the Slack authentication **Token** and a **Webhook URL** for our Lambda function.

1. Go to [https://api.slack.com/apps/](https://api.slack.com/apps/) and create a new app in your workspace.
2. Go to Incoming Webhooks and activate it and create a webhook URL in the Slack channel you would like to receive the messages.
   1. Save the **Webhook URL** that is generated.
3. Go into the app settings. Find the OAuth & Permissions options under Features, and save the access token.

![The Incoming Webhooks page of the Slack app settings, with the feature toggled on](/_fern-files/_img/bb9a19e91657e37fd97e3bc0b5e14a043d82b22e3ccde2e6838c8fb41faf0504.webp)![The Slack authorization dialog granting the app permission to post to a selected channel](/_fern-files/_img/9c706b039e5aaf74d77562a29ad5b532b754adb7e10e82415ba80f5460219f66.webp)![The OAuth and Permissions page of the Slack app settings, showing the bot user OAuth token](/_fern-files/_img/ea4c5d0bac3c85f7db3c7e6e4867c5d9fc012e17a573fb8710dc8592cf61caf5.webp)

Remember the Webhook URL and Slack token will be referenced in our Lambda function.

## AWS Lambda

In the same AWS account and region that you set up your EventBridge rule, **author a new Lambda function from scratch** and select the latest Python runtime.

![The AWS Lambda create function screen with Author from scratch selected and a Python runtime chosen](/_fern-files/_img/ae6c34699cd57fd072fe889fded9ff20363213d1be7826d61e2557b3a501997c.webp)

In the Lambda code editor paste the [`lambda_function.py`](https://github.com/benchling/integration-examples/blob/master/events_examples/benchling_request_to_slack/lambda_function.py) file available in the public Benchling Integration Examples GitHub repository.

**Create the environment variables referenced in the code, and enter the values from your Slack App settings.**

![The Lambda configuration page with environment variables set for the Slack webhook URL and token](/_fern-files/_img/0b74574a7acad38455cb1ed2147b6a757a9aa819b8b63ef9652cff3adb98adcd.webp)

You can leave the remaining basic Lambda settings or adjust appropriately based on the usage of the function. **Deploy** your function.

![The Lambda code editor with the Deploy button highlighted](/_fern-files/_img/2fca44846739193edbe36f3f1999d15522a151c7e38df1e8617236b2bab9f0f5.webp)

The final step is to connect your EventBridge rule to your deployed Lambda function. There are two ways you can do this from the AWS console:

1. Directly in the Lambda settings you can **Add a trigger** for the Lambda function. Use the dropdown to select AWS EventBridge and use the existing rule that we set up.
2. Navigate back to the EventBridge rule and **edit** the rule. You can now add an additional **target** similar to how we set up the Log Group. Select AWS Lambda in the dropdown options. The Lambda function that was deployed should be available. Don't forget to update the rule settings after adding the target.

Either of the above options will set up a trigger for your Lambda function as seen below:

![The Lambda function overview showing EventBridge configured as a trigger](/_fern-files/_img/c5bb42548157f5425fb5769c77815aa0da6bd6d8d585952265f9a9fc99bf809b.webp)

🎊 **Log into your Benchling account and [create a Benchling Request](https://help.benchling.com/hc/en-us/articles/39948200885261-Create-manage-and-execute-legacy-Requests) to see the notification posted to the Slack channel!** 🎊