The Microsoft Advertising API allows you to programmatically manage your advertising campaigns. Using this API on Pipedream, you can create, read, update, and delete campaigns, ad groups, and ads. You can also retrieve reports to analyze performance. Pipedream's serverless platform lets you connect the Microsoft Advertising API to a plethora of other services to automate workflows, sync data across platforms, and react to events in real time.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_advertising: {
type: "app",
app: "microsoft_advertising",
},
},
async run({steps, $}) {
return await axios($, {
url: `https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/User/Query`,
method: "post",
headers: {
Authorization: `Bearer ${this.microsoft_advertising.$auth.oauth_access_token}`,
DeveloperToken: `${this.microsoft_advertising.$auth.developer_token}`,
},
data: {
User: null,
},
})
},
})
Campaign Performance Reporting: Generate daily or weekly reports on campaign performance and send them via email or to a Google Sheets document. You can schedule a Pipedream workflow to pull the data from Microsoft Advertising, format it, and push it to your preferred reporting medium.
Keyword Bid Adjustment: Monitor your ad campaign performance data and adjust keyword bids based on predefined rules. A Pipedream workflow can analyze your campaign metrics, decide if a bid needs to be increased or decreased, and make the adjustment automatically through the API.
Lead Synchronization with CRM: When a user submits a lead form from a Microsoft ad, you can instantly sync this lead information into a CRM like Salesforce or HubSpot. Pipedream can capture the lead data and create or update the lead records in your CRM, ensuring your sales team has immediate access.
Microsoft Advertising uses OAuth authentication. When you connect your Microsoft Advertising account, Pipedream will open a popup window where you can sign into Microsoft Advertising and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microsoft Advertising API.
Pipedream requests the following authorization scopes when you connect your account:
offline_access
https://ads.microsoft.com/msads.manage
https://ads.microsoft.com/ads.manage
GET
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
prompt=login
POST
https://login.microsoftonline.com/common/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://login.microsoftonline.com/common/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}