The Mautic API empowers marketers to automate and integrate a wide range of marketing tasks directly into Pipedream workflows. With Mautic's API, you can manage contacts, campaigns, emails, and reports, and use triggers to automate responses based on user behavior. It's a robust tool to align marketing efforts with real-time data and actions, making it possible to personalize communication, streamline follow-ups, and ultimately drive conversions with less manual effort.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mautic: {
type: "app",
app: "mautic",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.mautic.$auth.mautic_url}/api/users/self`,
headers: {
Authorization: `Bearer ${this.mautic.$auth.oauth_access_token}`,
},
})
},
})
Lead Scoring Automation: Automatically update lead scores in Mautic when specific events occur in a connected CRM like Salesforce. For instance, if a contact closes a deal, use Pipedream to listen for the event and then increase the contact's lead score in Mautic.
Dynamic Email Campaigns: Use Pipedream to monitor customer activity from an e-commerce platform like Shopify. When a customer makes a purchase, trigger a Mautic API call to enroll them in a post-purchase email sequence, providing relevant cross-sells, upsells, or loyalty program details.
Real-Time Analytics Sync: Integrate Mautic with a tool like Google Sheets using Pipedream. Whenever a new campaign report is generated in Mautic, automatically send the data to Google Sheets for real-time analysis, enabling marketers to make data-driven decisions quickly.
Mautic uses OAuth authentication. When you connect your Mautic account, Pipedream will open a popup window where you can sign into Mautic and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Mautic API.
Pipedream requests the following authorization scopes when you connect your account:
GET
{{custom_fields.mautic_url}}/oauth/v2/authorize
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
{{custom_fields.mautic_url}}/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
{{custom_fields.mautic_url}}/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}