with Expensify and AWS?
Creates a Step Function State Machine to publish a message to an SNS topic at a specific timestamp. The SNS topic delivers the message to this Pipedream source, and the source emits it as a new event.
Creates an SNS topic in your AWS account. Messages published to this topic are emitted from the Pipedream source.
The source subscribes to all emails delivered to a specific domain configured in AWS SES. When an email is sent to any address at the domain, this event source emits that email as a formatted event. These events can trigger a Pipedream workflow and can be consumed via SSE or REST API.
Emit new event when a DynamoDB stream receives new events. See the docs here
Creates a new report with transactions in a user's account. See docs here
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',
},
});
},
})
The AWS API unlocks endless possibilities for automation with Pipedream. With this powerful combo, you can manage your AWS services and resources, automate deployment workflows, process data, and react to events across your AWS infrastructure. Pipedream offers a serverless platform for creating workflows triggered by various events that can execute AWS SDK functions, making it an efficient tool to integrate, automate, and orchestrate tasks across AWS services and other apps.
import AWS from 'aws-sdk'
export default defineComponent({
props: {
aws: {
type: "app",
app: "aws",
}
},
async run({steps, $}) {
const { accessKeyId, secretAccessKey } = this.aws.$auth
/* Now, pass the accessKeyId and secretAccessKey to the constructor for your desired service. For example:
const dynamodb = new AWS.DynamoDB({
accessKeyId,
secretAccessKey,
region: 'us-east-1',
})
*/
},
})