Storage Layer
Introduction
Webhooked supports multiple storage backends for persisting webhook data. You can write to one or multiple backends simultaneously, with each backend supporting its own formatting and transformation.
Storage Context Variables
Variables available in security conditions:
.SpecName
Name of the current spec as defined in config
"user-events"
.SpecEntrypointURL
EntrypointURL of the current spec as defined in config
"/user-events"
.ConnID
Unique connection ID
123549841
.ConnTime
Connection established time
time.Time object 2025-08-20T21:10:00Z
.Host
Host header of request
"example.com"
.IsTLS
Whether request is HTTPS
true
.Method
HTTP method used
"POST"
.Payload
Raw request body
{"data": "value"}
.QueryArgs
Query parameters object
fasthttp.Args{"id":"123","token":"abc"}
.RemoteAddr
Remote Addr
"192.168.1.10:54321"
.RemoteIP
Remote network address
"192.168.1.1"
.RequestTime
Time when request was received
time.Time object 2025-08-20T21:10:00Z
.Request
Full fasthttp.Request object
&fasthttp.Request{...}
.URI
Request URI
"/webhooks/..."
.UserAgent
Client User-Agent header
"Mozilla/5.0 (X11; Linux x86_64)"
.StorageType
Type as defined in spec
"redis"
Storages Providers
Redis
host
string
Host of the redis server
port
integer
Port of the redis server
username
string
Username to connect to redis
password
string
Password to connect to redis
database
integer
Database to use (default to 0)
key
string
Key used to store with RPush command
PostgreSQL
databaseUrl
string
Database URL of the postgres server
query
string
The query to execute with named arguments
args
map
Map of naed arguments used in the query
RabbitMQ Storage
databaseUrl
string
Database URL of the rabbitmq server
queueName
string
Name of the queue
maxAttempt
integer
Maximum retry attempts
durable
bool
Survive broker restart
deleteWhenUnused
bool
Don't delete when unused
exclusive
bool
Not exclusive to connection
noWait
bool
Wait for confirmation
exchange
string
Exchange to bind the queue
contentType
string
Content type for messages
mandatory
bool
Return message if not routable
immediate
bool
Deliver immediately or fail
IMPORTANT: Configuration of the queue and exchange must match your existing declaration. If no queue are present, webhooked try to defined it.
NoOp
NoOp storage is for testing and development where persistence isn't needed.
Storage Formatting
Each storage can have its own data transformation.
See more about formating on the dedicated page : Formatting
Last updated