The Drift API, contrary to the customer messaging platform, is actually a geocoding service provided by Geocod.io. It allows you to convert physical addresses to geographic coordinates and vice versa, enrich addresses with detailed location data, and offers batch geocoding features for processing multiple addresses simultaneously. With Pipedream, you can harness this API for a variety of location-based automations, enriching customer data with geographical insights, automating logistics, or enhancing marketing campaigns with location targeting.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
drift: {
type: "app",
app: "drift",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://driftapi.com/users/list`,
headers: {
Authorization: `Bearer ${this.drift.$auth.oauth_access_token}`,
},
})
},
})
Customer Address Verification: Automate the process of verifying and standardizing customer addresses in your CRM when new contacts are added. Use Drift's geocoding capabilities to convert addresses into standardized formats and coordinates, ensuring data consistency and reliability for shipping or service provision.
Event Location Broadcast: When a new event is created in your company's event management system, use Drift to geocode the event address, then automatically post the event details along with a map link to company social media channels or send the information via email to your subscribers.
Lead Geographical Segmentation: Integrate Drift with your marketing automation platform to segment leads based on their location. As leads are captured, geocode their addresses, and use this data to trigger specific marketing campaigns tailored to their geographic region, optimizing ad spend and engagement.
Drift uses OAuth authentication. When you connect your Drift account, Pipedream will open a popup window where you can sign into Drift and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Drift API.
Pipedream requests the following authorization scopes when you connect your account:
contact_read
contact_write
all_contact_read
conversation_write
conversation_read
user_write
user_read
account_read
account_write
playbook_read
GET
https://dev.drift.com/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://driftapi.com/oauth2/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://driftapi.com/oauth2/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}}