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


এটা কিভাবে কাজ করে
যখন কেউ একজন ব্যবহারকারীর ইমেল সহ একটি ফর্ম জমা দেয় এবং ব্যবহারকারীকে যে গ্রুপে যুক্ত করা উচিত, স্ক্রিপ্টটি পরীক্ষা করে যে ব্যক্তিটি ইতিমধ্যেই সেই গোষ্ঠীর অন্তর্গত কিনা। যদি তারা করে, ব্যবহারকারী একটি ইমেল পাবেন যে তারা ইতিমধ্যেই গোষ্ঠীতে আছেন। অন্যথায়, স্ক্রিপ্ট ব্যবহারকারীকে গ্রুপে যোগ করে এবং তাদের একটি স্বাগত ইমেল পাঠায়।
অ্যাপস স্ক্রিপ্ট পরিষেবা
এই সমাধানটি নিম্নলিখিত পরিষেবাগুলি ব্যবহার করে:
- স্ক্রিপ্ট পরিষেবা - ট্রিগার তৈরি করে যা প্রতিবার কেউ একটি ফর্ম জমা দেওয়ার সময় স্ক্রিপ্টটি ফায়ার করে।
- গ্রুপ পরিষেবা - ফর্মে জমা দেওয়া ইমেলটি ইতিমধ্যেই গ্রুপের সদস্য কিনা তা পরীক্ষা করে।
- অ্যাডমিন SDK ডিরেক্টরি উন্নত পরিষেবা - ফর্মে জমা দেওয়া ইমেলটি গ্রুপে যোগ করে।
- মেল পরিষেবা - তাদের গ্রুপ সদস্যতা নিশ্চিত করতে বা তাদের গ্রুপে স্বাগত জানাতে ফর্মে জমা দেওয়া ইমেল ঠিকানায় একটি ইমেল পাঠায়।
- স্প্রেডশীট পরিষেবা - ফর্ম প্রতিক্রিয়া স্প্রেডশীটে ব্যবহারকারীর স্থিতি যোগ করে। স্ট্যাটাসটি হয় ইতিমধ্যেই গ্রুপে বা নতুন যোগ করা হয়েছে ।
- URL আনয়ন পরিষেবা - একটি HTML স্ট্রিং হিসাবে একটি Google ডক্স নথি নিয়ে আসে। নথিতে ইমেলের বিষয়বস্তু থাকে যা স্ক্রিপ্ট পাঠায়।
পূর্বশর্ত
স্ক্রিপ্ট সেট আপ করুন
নতুন নিয়োগের স্প্রেডশীটের সাথে সম্পদ শেয়ার করার জন্য নিচের বোতামে ক্লিক করুন। এই সমাধানের জন্য অ্যাপস স্ক্রিপ্ট প্রকল্পটি স্প্রেডশীটের সাথে সংযুক্ত রয়েছে৷
একটি কপি করুন
এক্সটেনশন > অ্যাপস স্ক্রিপ্টে ক্লিক করুন।
পরিষেবাগুলির অধীনে, নিশ্চিত করুন যে অ্যাডমিনডিরেক্টরি পরিষেবাটি তালিকাভুক্ত রয়েছে৷ যদি এটি হয়, ধাপ 6 এ যান। যদি এটি না হয়, পরবর্তী ধাপে চালিয়ে যান।
পরিষেবাগুলির পাশে, একটি পরিষেবা add করুন ক্লিক করুন৷
ডায়ালগে, অ্যাডমিন SDK API নির্বাচন করুন এবং যোগ করুন ক্লিক করুন।
ফাংশন ড্রপডাউনে, installTrigger নির্বাচন করুন।
রান এ ক্লিক করুন।
অনুরোধ করা হলে, স্ক্রিপ্ট অনুমোদন করুন. যদি 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 allows Google Workspace administrators to easily share resources with new employees by automatically adding them to a Google Group.\u003c/p\u003e\n"],["\u003cp\u003eThe script uses an event-driven trigger to add new employees to a group when their information is submitted via a Google Form.\u003c/p\u003e\n"],["\u003cp\u003eThe script utilizes various Apps Script services including Groups, Admin SDK Directory, Mail, and Spreadsheet to manage group memberships and communicate with users.\u003c/p\u003e\n"],["\u003cp\u003eSetup requires copying a spreadsheet, enabling the AdminDirectory service, and authorizing the script to run.\u003c/p\u003e\n"],["\u003cp\u003eRunning the script involves submitting a form with the new employee's email and desired group, triggering the automatic addition and email notifications.\u003c/p\u003e\n"]]],["This solution automates sharing resources with new hires using Google Workspace. It utilizes a Google Form submission to trigger a script that adds new employees to a specified Google Group. The script checks for existing membership, adds the user if necessary, and sends either a welcome or confirmation email. It leverages Apps Script services, including Script, Groups, Admin SDK Directory, Mail, Spreadsheet, and URL Fetch to manage triggers, check group membership, add users, send emails, and update form response spreadsheet with user status.\n"],null,["# Share resources with new hires\n\n**Coding level** : Beginner \n\n**Duration** : 20 minutes \n\n**Project type** : Automation with an [event-driven trigger](/apps-script/guides/triggers/installable#event-driven_triggers)\n\nObjectives\n----------\n\n- Understand what the solution does.\n- Understand what the Apps Script services do within the solution.\n- Set up the script.\n- Run the script.\n\nAbout this solution\n-------------------\n\n**Important**: You must be a Google Workspace Administrator to use this\nsolution.\n\nShare resources with incoming employees in one step. This solution uses a form\nin Google Forms to add new employees to a group in Google Groups. By sharing\nresources with that group's address, you can easily give new hires access to the\nresources they need.\n\nIf you have permission to add users to a group, you can use this solution to\ndistribute the responsibility to other members of your team. When they submit\nthe form, the event-driven trigger runs the script as you and adds the new\nperson's email to the group.\n\nOptionally, you can turn on notifications to [get an email every time someone\nsubmits the form](https://support.google.com/a/users/answer/9308874).\n\n### How it works\n\nWhen someone submits a form with a user's email and the group the user should be\nadded to, the script checks whether or not the person already belongs to that\ngroup. If they do, the user receives an email confirming that they're already in\nthe group. Otherwise, the script adds the user to the group and sends them a\nwelcome email.\n\n### Apps Script services\n\nThis solution uses the following services:\n\n- [Script service](/apps-script/reference/script)--Creates the trigger that fires the script each time someone submits a form.\n- [Groups service](/apps-script/reference/groups)--Checks whether the email submitted on the form is already a member of the group.\n- [Admin SDK Directory advanced service](/apps-script/advanced/admin-sdk-directory)--Adds the email submitted on the form to the group.\n- [Mail service](/apps-script/reference/mail)--Sends an email to the email address submitted on the form to either confirm their group membership or welcome them to the group.\n- [Spreadsheet service](/apps-script/reference/spreadsheet)--Adds the user's status to the form responses spreadsheet. The status is either **Already in\n group** or **Newly added**.\n- [URL Fetch service](/apps-script/reference/url-fetch)--Fetches a Google Docs document as an HTML string. The document contains the content of the email that the script sends.\n\nPrerequisites\n-------------\n\n- A [Google Workspace account](https://workspace.google.com/features/)\n- You must be a Google Workspace Administrator\n\nSet up the script\n-----------------\n\n1. Click the following button to copy the **Share resources with new hires**\n spreadsheet. The Apps Script\n project for this solution is attached to the spreadsheet.\n\n [Make a copy](https://docs.google.com/spreadsheets/d/1IK9nIanIOxInnvUtaY9lsXHAqokkA9xqcC43VRxQ-fo/copy?usp=sharing)\n\n2. Click **Extensions** \\\u003e **Apps Script**.\n\n3. Under **Services** , make sure the **AdminDirectory** service is\n listed. If it is, skip to step 6. If it's not, continue to the next step.\n\n4. Next to **Services** , click Add a service add.\n\n5. In the dialog, select **Admin SDK API** and click **Add**.\n\n6. In the function dropdown, select **installTrigger**.\n\n7. Click **Run**.\n\n8. 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\n**Important**: If you run this function more than once, it generates multiple\ntriggers and will send duplicate emails. To delete extra triggers, take the\nfollowing steps:\n\n1. Click **Triggers** .\n2. Next to the trigger, click More \\\u003e **Delete trigger**.\n\nRun the script\n--------------\n\n1. Return to the spreadsheet and click **Tools** \\\u003e **Manage form** \\\u003e **Go to live form**.\n2. Fill out the form with your email address and a group that you have permission to manage the membership for and click **Submit**.\n3. Return to the spreadsheet and view the form entry. The status column shows whether your email address was added to or already a member of the group.\n4. Check your email for either a welcome email or confirmation of your group membership.\n\nContributors\n------------\n\nThis sample is maintained by Google with the help of Google Developer Experts.\n\nNext steps\n----------\n\n- [Event-driven triggers](/apps-script/guides/triggers/installable#event-driven_triggers)\n- [Extend Google Sheets](/apps-script/guides/sheets)"]]