Actor picture

Execution ID To XLS Send

vaclavrut/executionid-to-xls-and-send

This actor takes JSON at input, creates it as XLS from the execution ID result and then sends a link by email. The URL is also outputted in the log. Solves attaching XLS files to emails.

Author's avatarVaclav Rut
  • Modified
  • Used by2 users
  • Used412 times
Actor picture
Execution ID To XLS Send

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

const ApifyClient = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("vaclavrut/executionid-to-xls-and-send").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();