The ServiceM8 API allows businesses to streamline their field service management by automating tasks and integrating with other tools. Through Pipedream, you can harness this API to create custom workflows that trigger actions within ServiceM8 or sync data with other apps. Automate job scheduling, dispatching, invoicing, and more by reacting to events in real-time. Enhance productivity by connecting ServiceM8 to CRMs, accounting software, or custom databases, ensuring consistent and updated information across platforms.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
servicem8: {
type: "app",
app: "servicem8",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.servicem8.com/api_1.0/staff.json`,
headers: {
Authorization: `Bearer ${this.servicem8.$auth.oauth_access_token}`,
},
})
},
})
Job Status to Slack Notifications: Whenever a job status is updated in ServiceM8, trigger a Pipedream workflow that sends a customized message to a designated Slack channel. This keeps teams immediately informed about job progress without manually checking the ServiceM8 app.
Automated Invoicing with QuickBooks: Create a workflow that detects job completion in ServiceM8 and automatically generates an invoice in QuickBooks. This eliminates the need to manually enter data, reducing errors, and accelerating the billing cycle.
Dynamic Scheduling with Google Calendar: Sync ServiceM8 job bookings with a Google Calendar, updating the calendar in real-time when new jobs are scheduled or existing ones are modified. This improves coordination and ensures that all stakeholders have visibility into the schedule.
Emit new event when a new Form Response is created.
Emit new event when a new job is created. By creating this trigger, any other Job
triggers will stop working as ServiceM8 will replace any previous ones.
Emit new event when a job completes. By creating this trigger, any other Job
triggers will stop working as ServiceM8 will replace any previous ones.
Emit new event when a job is queued. By creating this trigger, any other Job
triggers will stop working as ServiceM8 will replace any previous ones.
ServiceM8 uses OAuth authentication. When you connect your ServiceM8 account, Pipedream will open a popup window where you can sign into ServiceM8 and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any ServiceM8 API.
Pipedream requests the following authorization scopes when you connect your account:
staff_locations
staff_activity
publish_sms
publish_email
vendor
vendor_logo
vendor_email
read_locations
manage_locations
read_staff
manage_staff
read_customers
manage_customers
read_customer_contacts
manage_customer_contacts
read_jobs
manage_jobs
create_jobs
read_job_contacts
manage_job_contacts
read_job_materials
manage_job_materials
read_job_categories
manage_job_categories
read_job_queues
manage_job_queues
read_tasks
manage_tasks
read_schedule
manage_schedule
read_inventory
manage_inventory
read_job_notes
publish_job_notes
read_job_photos
publish_job_photos
read_job_attachments
publish_job_attachments
read_inbox
read_messages
manage_notifications
manage_templates
manage_badges
read_assets
manage_assets
GET
https://go.servicem8.com/oauth/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://go.servicem8.com/oauth/access_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://go.servicem8.com/oauth/access_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}}