with Twilio SendGrid and Expensify?
Allows you to add one or more email addresses to the global suppressions group. See the docs here
Creates a new report with transactions in a user's account. See docs here
Allows you to create a new contact list. See the docs here
The Twilio SendGrid API opens up a world of possibilities for email automation, enabling you to send emails efficiently and track their performance. With this API, you can programmatically create and send personalized email campaigns, manage contacts, and parse inbound emails for data extraction. When you harness the power of Pipedream, you can connect SendGrid to hundreds of other apps to automate workflows, such as triggering email notifications based on specific actions, syncing email stats with your analytics, or handling incoming emails to create tasks or tickets.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sendgrid: {
type: "app",
app: "sendgrid",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.sendgrid.com/v3/user/account`,
headers: {
Authorization: `Bearer ${this.sendgrid.$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',
},
});
},
})