The discussion revolves around integrating Sendy with Discourse to automate sending invitations to specific groups via email. rootsh3ll is looking for a solution to send invitations when a customer makes a purchase on their WordPress blog. simon suggests using Zapier to trigger a POST request to Discourse’s invite endpoint when a subscriber is added to a mailing list, providing an example curl command. rootsh3ll finds the curl command useful and plans to create a custom shell script or use Sendy’s API to make the request, promising to update the thread with the script. However, as of hjalali’s inquiry, there is no update on whether the integration was successfully implemented.
I am looking for an integration between Sendy (A self hosted email clients that uses Amazon SES for sending emails) with Discourse. So that whenever a person makes a purchase on my wordpress blog. S/he is automatically sent an invitation for a specific discourse group (based on the item purchased) via email.
I couldn’t find anything even on Zapier. Is anyone aware of anything, any script or tool that uses Sendy or Discourse API to achieve this?
This will not only save a lot of money, but time to manually send invitations to each customer as well,
I’m not familiar with Sendy, or with how it is integrated with your WordPress site, but there seems to be Zapier support for Sendy that can be triggered when a subscriber is added to a mailing list: Sendy Integrations | Connect Your Apps with Zapier.
If you can get WordPress/Sendy/Zapier integration working, you can automate invites by having Zapier create a POST request to https://forum.example.com/invites when a user is added to the list. An example curl request for creating an invite looks like this, with $api_key set to your All Users API Key. Set the api_username to the username of an admin on your site:
curl -X POST -d "api_key=$api_key&api_username=simon&email=inviteduser@example.com&group_names=your_group_name" https://forum.example.com/invites
You can test this out with curl or Postman before trying to set it up with Zapier.
That’s exactly what I was looking for!
I still won’t prefer Zapier since that’s adding an unnecessary pivot to my clean architecture. But the curl command is 100% useful. I can atleast make a custom shell script or use sendy’s API to make this request.
I will update this thread with the script once I get this done. thanks a lot @simon