কর্মীদের ব্যক্তিগতকৃত প্রশংসা শংসাপত্র পাঠান
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
কোডিং স্তর : শিক্ষানবিস
সময়কাল : 15 মিনিট
প্রকল্পের ধরন : একটি কাস্টম মেনু সহ অটোমেশন
উদ্দেশ্য
- বুঝুন সমাধান কি করে।
- সমাধানের মধ্যে অ্যাপস স্ক্রিপ্ট পরিষেবাগুলি কী করে তা বুঝুন।
- আপনার পরিবেশ সেট আপ করুন।
- স্ক্রিপ্ট সেট আপ করুন।
- স্ক্রিপ্ট চালান।
এই সমাধান সম্পর্কে
Google পত্রকগুলিতে কর্মচারী ডেটা সহ Google স্লাইড কর্মচারী শংসাপত্র টেমপ্লেট স্বয়ংক্রিয়ভাবে কাস্টমাইজ করুন, তারপর Gmail ব্যবহার করে শংসাপত্রগুলি পাঠান৷


এটা কিভাবে কাজ করে
স্ক্রিপ্টটি স্লাইড থেকে কর্মচারী শংসাপত্র উপস্থাপনা টেমপ্লেট এবং কর্মচারীর বিবরণ সহ একটি শীট স্প্রেডশীট ব্যবহার করে। স্ক্রিপ্ট টেমপ্লেট অনুলিপি করে এবং স্প্রেডশীট থেকে ডেটা দিয়ে স্থানধারকদের প্রতিস্থাপন করে। একবার স্ক্রিপ্ট প্রতিটি কর্মচারীর জন্য একটি স্লাইড তৈরি করে, এটি প্রতিটি পৃথক স্লাইডকে পিডিএফ সংযুক্তি হিসাবে বের করে এবং কর্মীদের কাছে শংসাপত্র পাঠায়।
অ্যাপস স্ক্রিপ্ট পরিষেবা
এই সমাধানটি নিম্নলিখিত পরিষেবাগুলি ব্যবহার করে:
- ড্রাইভ পরিষেবা - স্লাইড কর্মচারী শংসাপত্রের টেমপ্লেট অনুলিপি করে৷
- স্প্রেডশীট পরিষেবা - কর্মচারীর বিবরণ প্রদান করে এবং তালিকাভুক্ত প্রতিটি কর্মচারীর অবস্থা আপডেট করে।
- স্লাইড পরিষেবা - স্প্রেডশীট থেকে কর্মচারী ডেটা দিয়ে উপস্থাপনায় স্থানধারকদের প্রতিস্থাপন করে।
- Gmail পরিষেবা - পিডিএফ হিসাবে পৃথক স্লাইডগুলি পায় এবং সেগুলি কর্মীদের কাছে পাঠায়৷
পূর্বশর্ত
এই নমুনা ব্যবহার করতে, আপনার নিম্নলিখিত পূর্বশর্ত প্রয়োজন:
- একটি Google অ্যাকাউন্ট (Google Workspace অ্যাকাউন্টের জন্য অ্যাডমিনিস্ট্রেটরের অনুমোদনের প্রয়োজন হতে পারে)।
- ইন্টারনেট অ্যাক্সেস সহ একটি ওয়েব ব্রাউজার।
আপনার পরিবেশ সেট আপ করুন
কর্মচারী শংসাপত্র স্লাইড টেমপ্লেটের একটি অনুলিপি করতে নিম্নলিখিত বোতামে ক্লিক করুন৷
একটি কপি করুন
পরবর্তী ধাপে ব্যবহারের জন্য আপনার উপস্থাপনা আইডি নোট করুন। আপনি URL এ আইডি খুঁজে পেতে পারেন:
https://docs.google.com/presentation/d/ PRESENTATION_ID /edit
ড্রাইভে, শংসাপত্রগুলি ধরে রাখতে একটি নতুন ফোল্ডার তৈরি করুন৷
পরবর্তী ধাপে ব্যবহারের জন্য আপনার ফোল্ডার আইডি নোট করুন। আপনি URL-এ ID খুঁজে পেতে পারেন: https://drive.google.com/drive/folders/ FOLDER_ID
স্ক্রিপ্ট সেট আপ করুন
কর্মচারী শংসাপত্রের নমুনা স্প্রেডশীটের একটি অনুলিপি করতে নীচের বোতামে ক্লিক করুন৷ এই সমাধানের জন্য অ্যাপস স্ক্রিপ্ট প্রকল্পটি স্প্রেডশীটের সাথে সংযুক্ত রয়েছে৷
একটি কপি করুন
স্প্রেডশীটে, এক্সটেনশন > অ্যাপস স্ক্রিপ্টে ক্লিক করে অ্যাপস স্ক্রিপ্ট প্রকল্পটি খুলুন।
slideTemplateId
ভেরিয়েবলের জন্য, PRESENTATION_ID
প্রতিস্থাপন করুন PRESENTATION_ID
আপনার উপস্থাপনার আইডি সহ।
tempFolderId
ভেরিয়েবলের জন্য, FOLDER_ID
প্রতিস্থাপন করুন FOLDER_ID
আপনার ফোল্ডারের আইডি দিয়ে।
Save এ ক্লিক করুন
.
স্ক্রিপ্ট চালান
- স্প্রেডশীটে ফিরে যান এবং প্রশংসা > শংসাপত্র তৈরি করুন ক্লিক করুন। এই কাস্টম মেনু প্রদর্শিত হওয়ার জন্য আপনাকে পৃষ্ঠাটি রিফ্রেশ করতে হতে পারে।
অনুরোধ করা হলে, স্ক্রিপ্ট অনুমোদন করুন. যদি OAuth সম্মতি স্ক্রীন সতর্কতা প্রদর্শন করে, এই অ্যাপটি যাচাই করা হয়নি , তাহলে Advanced > Go to {Project Name} (অনিরাপদ) নির্বাচন করে চালিয়ে যান।
প্রশংসা ক্লিক করুন > আবার শংসাপত্র তৈরি করুন ।
একবার সমস্ত সারির স্ট্যাটাস কলাম তৈরিতে আপডেট হয়ে গেলে, প্রশংসা > সার্টিফিকেট পাঠান ক্লিক করুন।
কোড পর্যালোচনা করুন
এই সমাধানের জন্য অ্যাপস স্ক্রিপ্ট কোড পর্যালোচনা করতে, নীচের উৎস কোড দেখুন ক্লিক করুন:
অবদানকারী
এই নমুনাটি তৈরি করেছেন সৌরভ চোরারিয়া, ব্লগার এবং গুগল ডেভেলপার এক্সপার্ট।
এই নমুনা Google ডেভেলপার বিশেষজ্ঞদের সাহায্যে Google দ্বারা রক্ষণাবেক্ষণ করা হয়।
পরবর্তী পদক্ষেপ
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThis solution automates the process of creating and sending personalized employee certificates using Google Slides, Sheets, and Gmail.\u003c/p\u003e\n"],["\u003cp\u003eThe script copies a certificate template, replaces placeholders with employee data from a spreadsheet, and sends the certificates as PDF attachments via email.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need a Google Account, a web browser, and copies of the provided Google Slides template and spreadsheet to use this solution.\u003c/p\u003e\n"],["\u003cp\u003eBefore running the script, you need to set up your environment by making copies of the template and spreadsheet, creating a folder for certificates, and updating the script with the relevant IDs.\u003c/p\u003e\n"],["\u003cp\u003eTo execute the solution, you'll use custom menu options within the spreadsheet to create and send the certificates after authorizing the script.\u003c/p\u003e\n"]]],[],null,["# Send personalized appreciation certificates to employees\n\n**Coding level** : Beginner \n\n**Duration** : 15 minutes \n\n**Project type** : Automation with a [custom menu](/apps-script/guides/menus)\n\nObjectives\n----------\n\n- Understand what the solution does.\n- Understand what the Apps Script services do within the solution.\n- Set up your environment.\n- Set up the script.\n- Run the script.\n\nAbout this solution\n-------------------\n\nAutomatically customize the Google Slides Employee Certificate template\nwith employee data in Google Sheets, then send the certificates using\nGmail.\n\n### How it works\n\nThe script uses the Employee Certificate presentation template from\nSlides and a Sheets spreadsheet with the employee\ndetails. The script copies the template and\nreplaces the placeholders with data from the spreadsheet. Once the script\ncreates a slide for every employee, it extracts each individual slide as a PDF\nattachment and sends the certificates to the employees.\n\n### Apps Script services\n\nThis solution uses the following services:\n\n- [Drive service](/apps-script/reference/drive)--Copies the Slides Employee Certificate template.\n- [Spreadsheet service](/apps-script/reference/spreadsheet)--Provides the employee details and updates the status against each listed employee.\n- [Slides service](/apps-script/reference/slides)--Replaces the placeholders in the presentation with the employee data from the spreadsheet.\n- [Gmail service](/apps-script/reference/gmail)--Gets the individual slides as PDFs and sends them to the employees.\n\nPrerequisites\n-------------\n\nTo use this sample, you need the following prerequisites:\n\n- A Google Account (Google Workspace accounts might require administrator approval).\n- A web browser with access to the internet.\n\nSet up your environment\n-----------------------\n\n1. Click the following button to make a copy of the **Employee certificates**\n Slides template.\n\n [Make a copy](https://docs.google.com/presentation/d/1gEHDjlSqnKnfi_Ahbt9Jhhz4oW2badtd8kLKjzC_tM0/copy)\n\n2. Take note of your presentation ID for use in a later step. You can\n find the ID in the URL:\n\n `https://docs.google.com/presentation/d/`\u003cvar translate=\"no\"\u003ePRESENTATION_ID\u003c/var\u003e`/edit`\n3. In Drive, create a new folder to hold the certificates.\n\n4. Take note of your folder ID for use in a later step. You can find the\n ID in the URL:\n `https://drive.google.com/drive/folders/`\u003cvar translate=\"no\"\u003eFOLDER_ID\u003c/var\u003e\n\nSet up the script\n-----------------\n\n1. Click the button below to make a copy of the **Employee certificates** sample\n spreadsheet. The Apps Script project for this\n solution is attached to the spreadsheet.\n\n [Make a copy](https://docs.google.com/spreadsheets/d/14qudjFSn9PP7-aZ1JkmUmd37-lpZMyfE-0IdD5ZW5Uo/copy)\n\n2. In the spreadsheet, open the Apps Script project by clicking\n **Extensions** \\\u003e **Apps Script**.\n\n3. For the `slideTemplateId` variable, replace\n \u003cvar translate=\"no\"\u003ePRESENTATION_ID\u003cvar translate=\"no\"\u003e\u003c/var\u003e\u003c/var\u003e with the ID of your presentation.\n\n4. For the `tempFolderId` variable, replace \u003cvar translate=\"no\"\u003eFOLDER_ID\u003cvar translate=\"no\"\u003e\u003c/var\u003e\u003c/var\u003e\n with the ID of your folder.\n\n5. Click Save .\n\nRun the script\n--------------\n\n1. Switch back to the spreadsheet and click **Appreciation** \\\u003e **Create certificates**. You might need to refresh the page for this custom menu to appear.\n2. When prompted, authorize the script.\n If the OAuth consent screen displays the warning, **This app isn't verified** ,\n continue by selecting **Advanced** \\\u003e\n **Go to {Project Name} (unsafe)**.\n\n3. Click **Appreciation** \\\u003e\n **Create certificates** again.\n\n4. Once the status column of all the rows has been updated to **Created** , click\n **Appreciation** \\\u003e **Send certificates**.\n\nReview the code\n---------------\n\nTo review the Apps Script code for this solution, click\n**View source code** below: \n\n#### View source code\n\n### Code.gs\n\n\u003cbr /\u003e\n\nsolutions/automations/employee-certificate/Code.js \n[View on GitHub](https://github.com/googleworkspace/apps-script-samples/blob/main/solutions/automations/employee-certificate/Code.js) \n\n```javascript\n// To learn how to use this script, refer to the documentation:\n// https://developers.google.com/apps-script/samples/automations/employee-certificate\n\n/*\nCopyright 2022 Google LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nconst slideTemplateId = 'PRESENTATION_ID';\nconst tempFolderId = 'FOLDER_ID'; // Create an empty folder in Google Drive\n\n/**\n * Creates a custom menu \"Appreciation\" in the spreadsheet\n * with drop-down options to create and send certificates\n */\nfunction onOpen() {\n const ui = SpreadsheetApp.getUi();\n ui.createMenu('Appreciation')\n .addItem('Create certificates', 'createCertificates')\n .addSeparator()\n .addItem('Send certificates', 'sendCertificates')\n .addToUi();\n}\n\n/**\n * Creates a personalized certificate for each employee\n * and stores every individual Slides doc on Google Drive\n */\nfunction createCertificates() {\n // Load the Google Slide template file\n const template = DriveApp.getFileById(slideTemplateId);\n\n // Get all employee data from the spreadsheet and identify the headers\n const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();\n const values = sheet.getDataRange().getValues();\n const headers = values[0];\n const empNameIndex = headers.indexOf('Employee Name');\n const dateIndex = headers.indexOf('Date');\n const managerNameIndex = headers.indexOf('Manager Name');\n const titleIndex = headers.indexOf('Title');\n const compNameIndex = headers.indexOf('Company Name');\n const empEmailIndex = headers.indexOf('Employee Email');\n const empSlideIndex = headers.indexOf('Employee Slide');\n const statusIndex = headers.indexOf('Status');\n\n // Iterate through each row to capture individual details\n for (let i = 1; i \u003c values.length; i++) {\n const rowData = values[i];\n const empName = rowData[empNameIndex];\n const date = rowData[dateIndex];\n const managerName = rowData[managerNameIndex];\n const title = rowData[titleIndex];\n const compName = rowData[compNameIndex];\n\n // Make a copy of the Slide template and rename it with employee name\n const tempFolder = DriveApp.getFolderById(tempFolderId);\n const empSlideId = template.makeCopy(tempFolder).setName(empName).getId();\n const empSlide = SlidesApp.openById(empSlideId).getSlides()[0];\n\n // Replace placeholder values with actual employee related details\n empSlide.replaceAllText('Employee Name', empName);\n empSlide.replaceAllText('Date', 'Date: ' + Utilities.formatDate(date, Session.getScriptTimeZone(), 'MMMM dd, yyyy'));\n empSlide.replaceAllText('Your Name', managerName);\n empSlide.replaceAllText('Title', title);\n empSlide.replaceAllText('Company Name', compName);\n\n // Update the spreadsheet with the new Slide Id and status\n sheet.getRange(i + 1, empSlideIndex + 1).setValue(empSlideId);\n sheet.getRange(i + 1, statusIndex + 1).setValue('CREATED');\n SpreadsheetApp.flush();\n }\n}\n\n/**\n * Send an email to each individual employee\n * with a PDF attachment of their appreciation certificate\n */\nfunction sendCertificates() {\n // Get all employee data from the spreadsheet and identify the headers\n const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();\n const values = sheet.getDataRange().getValues();\n const headers = values[0];\n const empNameIndex = headers.indexOf('Employee Name');\n const dateIndex = headers.indexOf('Date');\n const managerNameIndex = headers.indexOf('Manager Name');\n const titleIndex = headers.indexOf('Title');\n const compNameIndex = headers.indexOf('Company Name');\n const empEmailIndex = headers.indexOf('Employee Email');\n const empSlideIndex = headers.indexOf('Employee Slide');\n const statusIndex = headers.indexOf('Status');\n\n // Iterate through each row to capture individual details\n for (let i = 1; i \u003c values.length; i++) {\n const rowData = values[i];\n const empName = rowData[empNameIndex];\n const date = rowData[dateIndex];\n const managerName = rowData[managerNameIndex];\n const title = rowData[titleIndex];\n const compName = rowData[compNameIndex];\n const empSlideId = rowData[empSlideIndex];\n const empEmail = rowData[empEmailIndex];\n\n // Load the employee's personalized Google Slide file\n const attachment = DriveApp.getFileById(empSlideId);\n\n // Setup the required parameters and send them the email\n const senderName = 'CertBot';\n const subject = empName + ', you\\'re awesome!';\n const body = 'Please find your employee appreciation certificate attached.' +\n '\\n\\n' + compName + ' team';\n GmailApp.sendEmail(empEmail, subject, body, {\n attachments: [attachment.getAs(MimeType.PDF)],\n name: senderName\n });\n\n // Update the spreadsheet with email status\n sheet.getRange(i + 1, statusIndex + 1).setValue('SENT');\n SpreadsheetApp.flush();\n }\n}\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nContributors\n------------\n\nThis sample was created by Sourabh Choraria, blogger and Google Developer\nExpert.\n\n- Find Sourabh on Twitter [@schoraria911](https://twitter.com/schoraria911).\n- Read Sourabh's [blog](https://script.gs/).\n\nThis sample is maintained by Google with the help of Google Developer Experts.\n\nNext steps\n----------\n\n- [Custom menus in Google Workspace](/apps-script/guides/menus)"]]