Google App Engine based webhook listener for syncing Freemius plugin users to Mautic marketing automation software
git clone https://github.com/koen12344/fs-mautic-hooks.gitThe fs-mautic-hooks skill is a Google App Engine-based webhook listener designed to streamline the synchronization of Freemius plugin users with Mautic marketing automation software. This skill enables seamless data transfer, ensuring that your marketing efforts are always aligned with the latest user information from your Freemius plugins. By automating this process, you can focus on crafting effective marketing strategies without the hassle of manual data entry. One of the primary benefits of implementing the fs-mautic-hooks skill is the significant reduction in time spent on user management tasks. Although specific time savings are currently unknown, the automation of syncing user data can lead to enhanced productivity and more efficient workflows. This skill is particularly beneficial for marketing teams looking to leverage user data for targeted campaigns, thus improving engagement and conversion rates. This skill is ideal for developers, product managers, and AI practitioners who are involved in marketing automation. It is designed for those who understand the importance of integrating user data into their marketing platforms and are looking for a straightforward solution to enhance their workflow automation. With an intermediate implementation difficulty and a time frame of approximately 30 minutes, it is accessible for teams that are familiar with Google App Engine and webhook configurations. In practical use cases, consider a marketing team that regularly launches campaigns based on user behavior and demographics. By using fs-mautic-hooks, they can ensure that their Mautic system is always updated with the latest user information from Freemius, allowing for timely and relevant marketing communications. This skill fits seamlessly into an AI-first workflow, enabling teams to harness the power of automation and focus on strategic initiatives rather than manual processes.
[{"step":"Deploy the webhook to Google App Engine. Clone the [fs-mautic-hooks GitHub repo](https://github.com/freemius/fs-mautic-hooks) and run `gcloud app deploy` after configuring `app.yaml` with your project ID and region.","tip":"Use the `us-central1` region for lowest latency to Mautic's API endpoints. Set environment variables in `app.yaml` for `FREMIUS_SECRET_KEY`, `MAUTIC_API_URL`, and `MAUTIC_USERNAME_PASSWORD`."},{"step":"Configure Freemius webhooks. In your Freemius dashboard, go to **Settings > Webhooks** and add the App Engine URL (e.g., `https://fs-mautic-hooks-2024.uc.r.appspot.com/webhook`). Select the events to trigger (e.g., `user_registered`, `subscription_updated`).","tip":"Test with a dummy event first using Freemius's 'Send Test Event' feature to verify the webhook URL and signature validation."},{"step":"Map Freemius fields to Mautic contact fields. Edit the `field_mapping.json` in the repo to align Freemius data (e.g., `plan_id`) with Mautic custom fields (e.g., `plan_type`).","tip":"Use Mautic's 'Custom Fields' feature to create fields like `plan_id` if they don't exist. Test the mapping with a single user before full deployment."},{"step":"Set up error handling and logging. Configure Cloud Logging to monitor for `503` errors (Mautic API down) or `401` errors (invalid credentials). Add a retry mechanism for transient failures using Cloud Tasks.","tip":"Set up a Slack webhook to alert your team when errors exceed a threshold (e.g., 5 failures in 1 hour)."},{"step":"Validate the sync. In Mautic, go to **Contacts > Manage Contacts** and search for a recently synced user (e.g., `[email protected]`). Verify that fields like `plan_type` and `source` are correctly populated.","tip":"Use Mautic's 'Segments' feature to group contacts by `plan_type` and cross-check counts with Freemius's user dashboard."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/koen12344/fs-mautic-hooksCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up a Google App Engine webhook listener to sync Freemius plugin user data to Mautic for [COMPANY_NAME]. Configure the webhook to trigger on [FREMIUS_EVENT_TYPE] (e.g., 'user_registered', 'subscription_updated'). Map the following Freemius fields to Mautic contact fields: [FREMIUS_FIELDS] (e.g., 'user_email', 'first_name', 'plan_id'). Ensure the webhook validates the Freemius signature using [FREMIUS_SECRET_KEY] and handles errors by logging them to [LOGGING_SERVICE].
### Freemius-to-Mautic Sync Report
**Webhook Status:** Successfully deployed on Google App Engine (Project ID: `fs-mautic-hooks-2024`).
**Triggered Events (Last 24h):**
1. **User Registered** (Event ID: `evt_782f1a`)
- Freemius Data: {"user_email": "[email protected]", "first_name": "Jane", "plan_id": "pro_monthly", "user_id": "fs_12345"}
- Mautic Response: Contact created with ID `mautic_67890` (Status: Active). Tags applied: `plan_pro_monthly`, `source_freemius`.
- Latency: 1.2s (App Engine region: us-central1).
2. **Subscription Updated** (Event ID: `evt_9a3b2c`)
- Freemius Data: {"user_email": "[email protected]", "plan_id": "enterprise_yearly", "old_plan": "pro_monthly"}
- Mautic Response: Contact updated (ID: `mautic_54321`). Fields updated: `plan`, `plan_expiry_date`. Segment reassigned to `Enterprise Users`.
- Errors: None (Signature validated with secret `fs_sk_abc123...`).
**Error Logs (Last 7 days):**
- 3 failed syncs due to Mautic API rate limits (Retried after 5s delay).
- 1 invalid signature rejection (Freemius secret mismatch).
**Next Steps:**
- Monitor App Engine logs for `503` errors (Mautic API down).
- Add a retry queue for failed syncs (Cloud Tasks recommended).
- Schedule a weekly report to [COMPANY_SLACK_CHANNEL] with sync stats.Open-source marketing automation
Managed WordPress hosting and website builder
Agents that listen, think and act for you.
Automate your browser workflows effortlessly
Managed WordPress hosting with 99.97% uptime
Hosting solutions for WordPress, optimized with AI and advanced caching.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan