Skip to content

rog22rz/thrive-webserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thrive Webserver

Go Version License

TLDR: This is a webserver designed to POST a new item to a Webflow CMS when it receives a POST from a Webflow webhook.

About

This project was started because a friend of mine approached me with a problem she was having with her Webflow website. She wanted to have a form that would directly add items to their CMS when the form was submitted. The problem was that Webflow doesn't allow that functionality, which forces users to go through 3rd party software such as Zapier to link a form to a CMS, and costs a monthly subscription.

After a bit of research, I saw that Webflow allow their users to have webhooks that send POST requests on form submission with the details of the form, and also an API for adding items to their CMS. They simply lacked the middle layer, a web server, which could connect the two functionalities. I thought to myself that such a web server, which would simply handle the data from the webhook, format it and then POST it to the CMS would be quite an easy task and would allow me to play around with Golang. I would also save my friend around 40$ a month, which would allow more funds for her grassroots project.

Therefore, this repo contains the code that I have written for the webserver to handle the task that I have described above. I then deployed the web server using Docker and Google Cloud Run.

Please feel free to reach out to me if you have any questions or if you just want to connect!

PS: Also go check out my friend's awesome project which showcases the new generation of Toronto Creatives: https://thrive-artwork-afefc46898-d9f19e4ce600d.webflow.io/

Installation

To install, simply clone the project and make sure you have all the packages installed. There is an app.env file missing for obvious security reasons which would contain the API key and CMS collection ID. However, if you replace the url on line 72 of main.go with your own link form https://webhook.site/, and send a POST request to your localhost:8080 with an item such as the JSON below, you should see the request appear on your https://webhook.site/ with the new format of the CMS.

{
  "name": "Email Form",
  "site": "dsa888dsa888dsa",
  "data": {
    "Name of Artist": "Test",
    "Name": "Test2",
    "Pronouns": "",
    "Preferred Method of Contact": "Phone Call",
    "Phone/Email": "321-321-3211",
    "Budget": "",
    "Delivery Date": "",
    "field": "Test"
  },
  "d": "2023-06-09T20:50:58.746Z",
  "_id": "dsa888dsa888das888dsa"
}

Prerequisites

Clone the repository

git clone https://github.com/rog22rz/thrive-webserver

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published