Deputy is a robust workforce management tool, catering to scheduling, timesheet tracking, and other employee coordination tasks. Leveraging the Deputy API on Pipedream allows you to automate mundane tasks, sync data across platforms, and create custom notifications based on employee actions. You could build workflows to manage shifts, sync employee details with HR systems, or trigger payroll processes, harnessing Pipedream's capability to integrate with various services without the need for manual coding.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
deputy: {
type: "app",
app: "deputy",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.deputy.$auth.endpoint}/api/v1/me`,
headers: {
Authorization: `Bearer ${this.deputy.$auth.oauth_access_token}`,
},
})
},
})
Automate Timesheet Reporting: Pull timesheets from Deputy as they're submitted and feed them into a Google Sheets document. This is great for streamlining payroll processes or providing regular reports to management on employee hours.
Scheduling Sync-Up: When a new shift is published or updated in Deputy, trigger a workflow that syncs this info with a shared company calendar on Office 365 or Google Calendar, keeping everyone informed and up-to-date.
Employee Onboarding: When a new employee is added to Deputy, automatically send their details to an HR system like BambooHR or Workday, and enroll them in necessary training courses via an LMS like Lessonly or TalentLMS.
Adds a new employee or staff member to the organization in Deputy. See the documentation
Starts a work shift for a specified employee in Deputy. See the documentation
Deputy uses OAuth authentication. When you connect your Deputy account, Pipedream will open a popup window where you can sign into Deputy and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Deputy API.
Pipedream requests the following authorization scopes when you connect your account:
longlife_refresh_token
GET
https://once.deputy.com/my/oauth/login
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://once.deputy.com/my/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://{{custom_fields.endpoint}}/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}}
&
scope={{oauth.space_separated_scopes}}
&
redirect_uri={{oauth.redirect_uri}}