π Compute verified campaign statistics with Amazon Bedrock AgentCore and Slack
β‘ 2 views Β· π Market Research & Insights
Description
Quick overview
This workflow receives a webhook payload of numeric campaign values, computes descriptive statistics using Amazon Bedrock AgentCore with the Code Interpreter tool, verifies the results in n8n, and posts a formatted summary to a Slack channel.
How it works
- Receives an HTTP POST request on a webhook with a JSON body containing a
valuesarray and an optionallabel. - Normalizes the incoming payload and sets defaults such as the agent name, Slack channel, label, and values list.
- Sends the label and values to an Amazon Bedrock AgentCore agent configured to run Python via Code Interpreter and return strict JSON statistics.
- Parses the agent response, recomputes the mean and count locally, and flags the output as verified only if it matches within a small tolerance.
- Posts the verified (or unverified) statistics summary to the configured Slack channel.
Setup
- Create and select an Amazon Bedrock AgentCore API credential for the agent step.
- Create a Slack credential and set the target channel name (or update/remove the Slack posting step if you donβt want notifications).
- Activate the workflow, copy the webhook URL, and send POST requests to it with a JSON body that includes
values(and optionallylabel).
π Nodes Used
Slack, Webhook
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File