PromptBase
Close icon
General
Home
Marketplace
Hire
Create
Login
Sell
Explore
🤖 GPT

Google App Script

Google App Script gpt prompt mini thumbnail
4Heart icon
Favorites
84Eye icon
Views
GPT-3.5-TURBO
TestedTick icon
TipsTick icon
Are you looking to automate tedious processes and save time? This Google App Script prompt can help! It takes any process or task you have and automates it through Google App Script. This will free up your time and reduce the need for manual intervention. So if you're looking to streamline your processes and have more time to focus on your business, order this prompt now!
...more
$3.99
Get prompt
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
Over 1 month ago

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
130 ($0.00030 / call)
Example input
Task description: Create a script that will automatically generate a report of the total number of emails sent by each user in the past week.
Example output
/** * This function returns an object that maps each user's email to the total number of emails sent by them in the past week * * @returns {Object} Object containing mapping of email to number of emails sent in the past week */ function getEmailCountByUser() { // Get threads with emails sent in the past week var threads = GmailApp.search('after:' + new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000).toDateString()); // Initialize an object to map email to email count var emailCount = {}; // Loop through the threads to count the number of emails for each user for (var i = 0; i < threads.length; i++) { var messages = threads[i].getMessages(); for (var j = 0; j < messages.length; j++) { var from = messages[j].getFrom(); if (emailCount[from]) { emailCount[from]++; } else { emailCount[from] = 1; } } } return emailCount; } /** * This is the main function that logs the email count by user to the console */ function logEmailCountByUser() { var emailCountByUser = getEmailCountByUser(); // Log the email count by user to the console for (var email in emailCountByUser) { Logger.log(email + ': ' + emailCountByUser[email]); } }
Browse Marketplace