A comprehensive Google Apps Script utility library for social media automation, Telegram bot integration, and service management. Features include calendar operations, traffic monitoring, property advertising, and Steam Gifts automation.
git clone https://github.com/sudtanj/App-Script-SwissKnife.gitA comprehensive Google Apps Script utility library for social media automation, Telegram bot integration, and service management. Features include calendar operations, traffic monitoring, property advertising, and Steam Gifts automation.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/sudtanj/App-Script-SwissKnifeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a Google Apps Script developer and create a script using the App-Script-SwissKnife library. The script should automate [SPECIFIC TASK] for [COMPANY] in the [INDUSTRY] sector. Include error handling and logging. Use [DATA] to populate the script with realistic values.
# Google Apps Script for Social Media Automation
```javascript
// Import the App-Script-SwissKnife library
const SwissKnife = require('App-Script-SwissKnife');
// Initialize the library with API keys and credentials
const config = {
telegramBotToken: 'YOUR_TELEGRAM_BOT_TOKEN',
calendarId: 'YOUR_CALENDAR_ID',
socialMediaCredentials: {
twitter: {
consumerKey: 'YOUR_TWITTER_CONSUMER_KEY',
consumerSecret: 'YOUR_TWITTER_CONSUMER_SECRET',
accessToken: 'YOUR_TWITTER_ACCESS_TOKEN',
accessTokenSecret: 'YOUR_TWITTER_ACCESS_TOKEN_SECRET'
}
}
};
// Initialize the SwissKnife library
const swissKnife = new SwissKnife(config);
// Function to automate social media posting
function automateSocialMediaPosting() {
try {
// Get data from a Google Sheet
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('SocialMediaPosts');
const data = sheet.getDataRange().getValues();
// Loop through the data and post to social media
data.forEach((row, index) => {
if (index === 0) return; // Skip header row
const [platform, message, scheduledTime] = row;
// Schedule the post
swissKnife.scheduleSocialMediaPost({
platform,
message,
scheduledTime
});
});
Logger.log('Social media posts scheduled successfully.');
} catch (error) {
Logger.log('Error scheduling social media posts: ' + error.message);
}
}
// Function to monitor website traffic
function monitorWebsiteTraffic() {
try {
// Get traffic data from Google Analytics
const trafficData = swissKnife.getGoogleAnalyticsData({
viewId: 'YOUR_GOOGLE_ANALYTICS_VIEW_ID',
startDate: '7daysAgo',
endDate: 'today',
metrics: ['sessions', 'pageviews', 'users']
});
// Log the traffic data
Logger.log('Website Traffic Data: ' + JSON.stringify(trafficData));
} catch (error) {
Logger.log('Error monitoring website traffic: ' + error.message);
}
}
// Function to manage property advertising
function managePropertyAdvertising() {
try {
// Get property data from a Google Sheet
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Properties');
const data = sheet.getDataRange().getValues();
// Loop through the data and update property listings
data.forEach((row, index) => {
if (index === 0) return; // Skip header row
const [propertyId, status, price, location] = row;
// Update the property listing
swissKnife.updatePropertyListing({
propertyId,
status,
price,
location
});
});
Logger.log('Property listings updated successfully.');
} catch (error) {
Logger.log('Error managing property advertising: ' + error.message);
}
}
// Function to automate Steam Gifts
function automateSteamGifts() {
try {
// Get gift data from a Google Sheet
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('SteamGifts');
const data = sheet.getDataRange().getValues();
// Loop through the data and send gifts
data.forEach((row, index) => {
if (index === 0) return; // Skip header row
const [steamId, gameId, message] = row;
// Send the gift
swissKnife.sendSteamGift({
steamId,
gameId,
message
});
});
Logger.log('Steam gifts sent successfully.');
} catch (error) {
Logger.log('Error automating Steam Gifts: ' + error.message);
}
}
// Run the functions
automateSocialMediaPosting();
monitorWebsiteTraffic();
managePropertyAdvertising();
automateSteamGifts();
```