useplunk / plunk

The Open-Source Email Platform
https://www.useplunk.com
GNU Affero General Public License v3.0
2.62k stars 114 forks source link

Webhook for subscribe #22

Open kof opened 1 month ago

kof commented 1 month ago

As a user of no-code platforms like Webflow or Webstudio (https://webstudio.is) I would like to be able to connect a Webhook Form directly to plunk without adding an additional backend. To do so I need Plunk to support a webhook interface for subscriptions.

Alternative workflow is creating a webhook in another platform or custom backend which would call a plunk rest api, which involves a second service for something relatively simple.

tttp commented 1 month ago

Hi,

I'm not sure I understood you, what is missing on plunk rest api that prevents it to be called directly from no-code platforms as a webhook?

The platforms I used (eg ITTT, Zapier...) provide an easier integration by providing an more convenient wrapping around the API of external services, but you can quite easily call directly any rest API too (dealing with authentication is usually the slightly less easy part)

In that sense, the work to put a wrapper is specific to the no-code platform and can be (and often is) implemented by other folks than the main developers of the software to integrate with.

...but I might not have understood your need and it might be something missing on plunk side ;)

kof commented 1 month ago

Webhook doesn't have ablity to provide headers. Using zapier etc means you have 3 platforms in total instead of 2, definitely not great for such a simple use case.

tttp commented 1 month ago

Hi,

I wasn't advocating to use zappier, just gave it as an example ;)

Webhook is a generic term that basically just means "call that external API every time a specific event happens", it doesn't imply anything about the ability to set headers or not.

plunk uses the "Authorization" header to be sure only approved external systems are allowed: https://docs.useplunk.com/api-reference/authentication

This is a very very standard way of dealing with permissions, so it is likely your no-code system does allow you to set that header, but it might be something you configure through "external accounts" or "permissions" or wherever they let you set up an external service they interface with.

Check with your no-code provider how they handle authentication on external services, they might already be providing the needed.

kof commented 1 month ago

I wasn't advocating to use zappier, just gave it as an example ;)

yeah, I was literally talking about this type of solution with an additional backend in between as a suboptimal solution

kof commented 1 month ago

just imagine for someone to have a form working, they need to pay additional ~$20 per month just to get the hook working

tttp commented 1 month ago

again, not trying to push zappier, for the record, not a big fan of their service ;)

webstudio seems to already have a webhook interface with n8n (that is using the same header for authentication), you might be able to use n8n to integrate with plunk? or directly add plunk as n8n is used (I am not familiar with webstudio, I'm not sure what the n8n integration provides)?

This being said, I might have misunderstood your use case: you wanted that the visitors fill the form and submits directly from that form on the page to plunk, ie without submitting first to your no-code plateform that would synchronise it with plunk in the backend?

(mailchimp provide these options for reference) https://mailchimp.com/help/about-signup-form-options/

if it's the case, it not a "simple" api/webhook that you need, but something that is able to deal with spam and integrate with re-captcha and the usual things you need to put in place to prevent getting tons of bots submitting random crap

kof commented 1 month ago

you might be able to use n8n to integrate with plunk?

Plunk token of each user needs to be provided by each user on their webhook form. In fact we are going to add ability to use custom headers with forms. But this is just us, nobody else will do that. Also this is not a standard thig to do with forms, forms generally don't have ability to provide headers with the request.

kof commented 1 month ago

if it's the case, it not a "simple" api/webhook that you need, but something that is able to deal with spam and integrate with re-captcha and the usual things you need to put in place to prevent getting tons of bots submitting random crap

Yeah, this is Form responsibilty in our case, we are already dealing with that effectively.