Actor picture

Motionmail Send Invoice

vaclavrut/motionmail-send-invoice

Motionmailapp.com doesn't send invoices for paid accounts, so in case you don't want to visit this app every month and send the invoice to the accounting department, you can use this act, which will do it for you automatically. In the input, specify to whom should the act send the email with an attached invoice in PDF. In the settings of the act (source) update the environment attributes the Username and the Password, then you should create a Scheduler, which should be set with the value 0 0 X * * for Cron expression, where X should be the date when the invoice is created in the motionmailapp.com, check it there. For me, it is the 21th day of the month so I would put 0 0 23 * * to the scheduler settings, adding 2 days extra just in case something would go wrong and they would delay creating the invoice.

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const Apify = require('apify');

// Set API token
Apify.client.setOptions({ token: '<YOUR_API_TOKEN>' });

// Prepare actor input
const input = {};

// Run the actor
const run = await Apify.call('vaclavrut/motionmail-send-invoice', input);

// Print actor output (if any)
console.log('Output');
console.dir(run.output);

// Fetch and print actor results from the run's dataset (if any)
console.log('Results from dataset');
const dataset = await Apify.openDataset(run.defaultDatasetId, { forceCloud: true });
await dataset.forEach(async (item, index) => {
    console.log(JSON.stringify(item));
});
  • Updated
  • Last run
  • Used58 times
  • Used by1 user