https://github.com/bst27/go-contact
Forward contact forms via webhook.
https://github.com/bst27/go-contact
contact-form gin-gonic go golang ifttt telegram webhook
Last synced: about 1 month ago
JSON representation
Forward contact forms via webhook.
- Host: GitHub
- URL: https://github.com/bst27/go-contact
- Owner: bst27
- License: mit
- Created: 2020-08-14T10:14:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-14T10:15:11.000Z (almost 6 years ago)
- Last Synced: 2025-10-06T10:57:41.943Z (9 months ago)
- Topics: contact-form, gin-gonic, go, golang, ifttt, telegram, webhook
- Language: Go
- Homepage:
- Size: 168 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# About
This app forwards contact forms via webhook. It receives form submissions via http and forwards them to a defined
webhook target. You can receive form submissions in [Telegram](https://telegram.org/) easily using this
app and [IFTTT](https://ifttt.com/) - and much more.
# Usage
```
./go-contact -url ""
```
```
-debug
Enable debug mode
-messageKey string
The webhook target will receive the message value of a form submission with this key in the json data (default "message")
-nameKey string
The webhook target will receive the name value of a form submission with this key in the json data (default "name")
-port int
Port to listen to for form submissions (default 8080)
-url string
URL to receive form submissions (webhook target)
```
# Example
Execute the application with the following config:
```
./go-contact -url "http://localhost/webhook-receiver" -port 8085 -nameKey "value1" -messageKey "value2"
```
It will start the app and listen on port 8085. After a contact form submission is received it will be forwarded
by the following http post request to your defined url:
```
POST /webhook-receiver HTTP/1.1
Host: localhost
Content-Length: 45
Content-Type: application/json
{
"value2": "Hi there",
"value1": "Max"
}
```
# Build
To build executables for multiple platforms you can use the build script at `scripts/build.sh`.