with Jotform and Expensify?
Creates a new report with transactions in a user's account. See docs here
Gets number of form submissions received this month. Also, get number of SSL form submissions, payment form submissions and upload space used by user See the docs here
Jotform’s API is a powerhouse for automating form and survey data management. With Pipedream, harness this API to trigger workflows from new form submissions, manipulate and analyze your form data, and sync it across various platforms. Think streamlined data entry to CRMs, instant notifications for new leads or feedback, and timely data backups to cloud storage.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
jotform: {
type: "app",
app: "jotform",
}
},
methods: {
_getBaseUrl() {
return this.jotform.$auth.subdomain
? `https://${this.jotform.$auth.subdomain}.jotform.com/API/`
: `https://${this.jotform.$auth.region}.jotform.com/`;
},
},
async run({steps, $}) {
const baseUrl = this._getBaseUrl();
return await axios($, {
url: `${baseUrl}user`,
params: {
apiKey: `${this.jotform.$auth.api_key}`,
},
})
},
})
The Expensify API enables the automation of expense reporting and management tasks. By harnessing this API within Pipedream, you can craft workflows that streamline the expense submission process, synchronize financial data across platforms, and trigger actions based on expense report statuses. With Pipedream’s serverless platform, these automations can run in the background, allowing for real-time data processing and interaction between Expensify and a myriad of other apps and services.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
expensify: {
type: "app",
app: "expensify",
}
},
async run({ steps, $ }) {
// The Expensify API requires the request data to be sent as
// a URL-encoded form with a key of "requestJobDescription".
// The value of this key must be a JSON string.
// First, define the JSON object as per the Expensify API documentation.
const requestJobDescription = {
type: "get",
credentials: {
partnerUserID: this.expensify.$auth.partnerUserId,
partnerUserSecret: this.expensify.$auth.partnerUserSecret,
},
inputSettings: {
type: "policyList",
}
};
// Use URLSearchParams to create a properly formatted form body.
const formData = new URLSearchParams();
formData.append('requestJobDescription', JSON.stringify(requestJobDescription));
// Make the API call with the correctly formatted data.
return await axios($, {
method: "post",
url: `https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations`,
data: formData,
// It's good practice to explicitly set the Content-Type header
// to match the data format.
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
});
},
})