CONNECT APP
Build with ServiceM8
Business Management
- OAuth
MCP
Give your agent ServiceM8 tools
Every ServiceM8 action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's ServiceM8 account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "servicem8",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Attachment:
const result = await mcp.callTool({
name: "servicem8-create-dboattachment",
arguments: {
relatedObject: "Related Object",
relatedObjectUuid: "Related record",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "servicem8",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Attachment:
result = await session.call_tool("servicem8-create-dboattachment", {
"relatedObject": "Related Object",
"relatedObjectUuid": "Related record",
})API PROXY
Call the ServiceM8 API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the ServiceM8 API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.servicem8.com/api_1.0/staff.json",
})
// Any allowed ServiceM8 endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.servicem8.com/api_1.0/staff.json
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuc2VydmljZW04LmNvbS9hcGlfMS4wL3N0YWZmLmpzb24?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run ServiceM8 actions from your backend
Connect a user's ServiceM8 account once, then run Create Attachment on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "servicem8-create-dboattachment",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
servicem8: { authProvisionId: "apn_xxxxxxx" },
relatedObject: "Related Object",
relatedObjectUuid: "Related record",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="servicem8-create-dboattachment",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"servicem8": {"authProvisionId": "apn_xxxxxxx"},
"relatedObject": "Related Object",
"relatedObjectUuid": "Related record",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "servicem8-create-dboattachment",
"configured_props": {
"servicem8": { "authProvisionId": "apn_xxxxxxx" },
"relatedObject": "Related Object",
"relatedObjectUuid": "Related record"
}
}'TOOLS
ServiceM8 actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Attachment
actionCreate an attachment. See the documentationWritev0.0.1 -
Create Badge
actionCreate a badge. See the documentationWritev0.0.2 -
Create Category
actionCreate a job category. See the documentationWritev0.0.1 -
Create Company
actionCreate a company (client). See the documentationWritev0.0.1 -
Create Company Contact
actionCreate a company contact. See the documentationWritev0.0.2 -
Create Job
actionCreate a job. See the documentationWritev0.0.1 -
Create Job Activity
actionCreate a job activity. See the documentationWritev0.0.1 -
Create Job Contact
actionCreate a job contact. See the documentationWritev0.0.1 -
Create Job Material
actionCreate a job material line. See the documentationWritev0.0.2 -
Create Job Payment
actionCreate a job payment. See the documentationWritev0.0.1 -
Create Job Queue
actionCreate a job queue. See the documentationWritev0.0.2 -
Create Note
actionCreate a note. See the documentationWritev0.0.1 -
Create Staff Member
actionCreate a staff member. See the documentationWritev0.0.1 -
Create Webhook Subscription
actionCreate or update an object webhook subscription. See the documentationWritev0.0.2 -
Delete Attachment
actionDelete an attachment by UUID. See the documentationWritev0.0.1 -
Delete Badge
actionDelete a badge by UUID. See the documentationWritev0.0.1 -
Delete Category
actionDelete a category by UUID. See the documentationWritev0.0.1 -
Delete Company
actionDelete a company by UUID. See the documentationWritev0.0.1 -
Delete Company Contact
actionDelete a company contact by UUID. See the documentationWritev0.0.1 -
Delete Job
actionDelete a job by UUID. See the documentationWritev0.0.1 -
Delete Job Activity
actionDelete a job activity by UUID. See the documentationWritev0.0.1 -
Delete Job Contact
actionDelete a job contact by UUID. See the documentationWritev0.0.1 -
Delete Job Material
actionDelete a job material by UUID. See the documentationWritev0.0.1 -
Delete Job Payment
actionDelete a job payment by UUID. See the documentationWritev0.0.1 -
Delete Note
actionDelete a note by UUID. See the documentationWritev0.0.1 -
Delete Queue
actionDelete a job queue by UUID. See the documentationWritev0.0.1 -
Delete Staff
actionDelete a staff member by UUID. See the documentationWritev0.0.1 -
Delete Webhook Subscription
actionDelete a webhook subscription by object type. See the documentationWritev0.0.1 -
Get Attachment
actionGet an attachment by UUID. See the documentationRead-onlyv0.0.1 -
Get Badge
actionGet a badge by UUID. See the documentationRead-onlyv0.0.1 -
Get Category
actionGet a category by UUID. See the documentationRead-onlyv0.0.1 -
Get Company
actionGet a company by UUID. See the documentationRead-onlyv0.0.1 -
Get Company Contact
actionGet a company contact by UUID. See the documentationRead-onlyv0.0.1 -
Get Feedback
actionGet feedback by UUID. See the documentationRead-onlyv0.0.1 -
Get Job
actionGet a job by UUID. See the documentationRead-onlyv0.0.1 -
Get Job Activity
actionGet a job activity by UUID. See the documentationRead-onlyv0.0.1 -
Get Job Contact
actionGet a job contact by UUID. See the documentationRead-onlyv0.0.1 -
Get Job Material
actionGet a job material by UUID. See the documentationRead-onlyv0.0.1 -
Get Job Payment
actionGet a job payment by UUID. See the documentationRead-onlyv0.0.1 -
Get Note
actionGet a note by UUID. See the documentationRead-onlyv0.0.1 -
Get Queue
actionGet a job queue by UUID. See the documentationRead-onlyv0.0.1 -
Get Staff
actionGet a staff member by UUID. See the documentationRead-onlyv0.0.1 -
List Attachments
actionList attachments with optional filters. See the documentationRead-onlyv0.0.1 -
List Badges
actionList badges with optional filters. See the documentationRead-onlyv0.0.1 -
List Categories
actionList categories with optional filters. See the documentationRead-onlyv0.0.1 -
List Companies
actionList companies (clients) with optional filters. See the documentationRead-onlyv0.0.1 -
List Company Contacts
actionList company contacts with optional filters. See the documentationRead-onlyv0.0.1 -
List Feedback
actionList feedback with optional filters. See the documentationRead-onlyv0.0.1 -
List Job Activities
actionList job activities with optional filters. See the documentationRead-onlyv0.0.1 -
List Job Contacts
actionList job contacts with optional filters. See the documentationRead-onlyv0.0.1 -
List Job Materials
actionList job materials with optional filters. See the documentationRead-onlyv0.0.1 -
List Job Payments
actionList job payments with optional filters. See the documentationRead-onlyv0.0.1 -
List Jobs
actionList jobs with optional filters. See the documentationRead-onlyv0.0.1 -
List Notes
actionList notes with optional filters. See the documentationRead-onlyv0.0.1 -
List Queues
actionList job queues with optional filters. See the documentationRead-onlyv0.0.1 -
List Staff
actionList staff with optional filters. See the documentationRead-onlyv0.0.1 -
List Webhook Subscriptions
actionList webhook subscriptions. See the documentationRead-onlyv0.0.1 -
Make API Request
actionSend an authenticated ServiceM8 API request. See the documentationWritev0.0.2 -
Produce Invoice
actionGenerate a job invoice (PDF, DOCX, or JPG). See the documentationWritev0.0.2 -
Produce Quote
actionGenerate a job quote (PDF, DOCX, or JPG). See the documentationWritev0.0.2 -
Send Email
actionSend an email via the Messaging API. See the documentationWritev0.0.2 -
Send SMS
actionSend an SMS via the Messaging API (charges may apply). See the documentationWritev0.0.2 -
Update Attachment
actionUpdate an attachment (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Badge
actionUpdate a badge (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.2 -
Update Category
actionUpdate a category (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Company
actionUpdate a company (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Company Contact
actionUpdate a company contact (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.2 -
Update Job
actionUpdate a job (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Job Activity
actionUpdate a job activity (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Job Contact
actionUpdate a job contact (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Job Material
actionUpdate a job material line (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.2 -
Update Job Payment
actionUpdate a job payment (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Job Queue
actionUpdate a job queue (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.2 -
Update Note
actionUpdate a note (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1 -
Update Staff Member
actionUpdate a staff member (loads the record, merges your fields, then POSTs). See the documentationWritev0.0.1
EVENTS
ServiceM8 triggers
Event sources your backend can deploy for users and receive through a webhook.
-
New Client (Instant)
triggerEmit new event when a new client is created.Instantv0.0.3 -
New Form Response (Instant)
triggerEmit new event when a new Form Response is created.Instantv0.0.3 -
New Job (Instant)
triggerEmit new event when a new job is created. By creating this trigger, any otherJobtriggers will stop working as ServiceM8 will replace any previous ones.Instantv0.0.3 -
New Job Completed (Instant)
triggerEmit new event when a job completes. By creating this trigger, any otherJobtriggers will stop working as ServiceM8 will replace any previous ones.Instantv0.0.3 -
New Job Queued (Instant)
triggerEmit new event when a job is queued. By creating this trigger, any otherJobtriggers will stop working as ServiceM8 will replace any previous ones.Instantv0.0.3
- App slug
- servicem8
- Authentication
- OAuth
- Categories
- Business Management
- Actions
- 75
- Triggers
- 5
- API proxy
- Available
OAuth scopes
These are the scopes Pipedream's managed ServiceM8 OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.
- 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
- read_attachments