UNPKG

@anjir/app-google-forms

Version:

Google Forms App for ANJIR automation platform - اتصال Google Forms به بیش از 1000+ برنامه و خودکارسازی فرآیندهای کاری با فرم‌ها و نظرسنجی‌ها

61 lines (58 loc) 3.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.googleForms = exports.googleFormsAuth = void 0; const tslib_1 = require("tslib"); const apps_common_1 = require("@anjir/apps-common"); const apps_framework_1 = require("@anjir/apps-framework"); const shared_1 = require("@anjir/shared"); const new_form_response_1 = require("./lib/triggers/new-form-response"); exports.googleFormsAuth = apps_framework_1.PieceAuth.OAuth2({ description: ` **اتصال Google Forms به ANJIR:** با اتصال Google Forms به پلتفرم ANJIR، می‌توانید: • پاسخ‌های فرم‌ها را بین Google Forms و سایر برنامه‌ها همگام‌سازی کنید • فرآیندهای کاری تکراری را خودکار کنید • مدیریت فرم‌ها و نظرسنجی‌ها را بهبود بخشید **مراحل راه‌اندازی:** 1. وارد [کنسول گوگل کلاود](https://console.cloud.google.com/) شوید 2. پروژه جدیدی ایجاد کنید یا از پروژه موجود استفاده کنید 3. به بخش **APIs & Services** بروید و **Google Forms API** و **Google Drive API** را فعال کنید 4. به **OAuth consent screen** بروید و نوع **External** را انتخاب کنید 5. اطلاعات برنامه را پر کنید و روی **Save and Continue** کلیک کنید 6. در بخش **Scopes**، scope های زیر را اضافه کنید: - https://www.googleapis.com/auth/forms.responses.readonly - https://www.googleapis.com/auth/drive.readonly 7. در بخش **Credentials**، **OAuth client ID** ایجاد کنید 8. نوع **Web Application** را انتخاب کنید 9. آدرس https://app.anjirauto.com/redirect را در **Authorized redirect URIs** اضافه کنید 10. **Client ID** و **Client Secret** را کپی کرده و در فیلدهای زیر وارد کنید`, authUrl: 'https://accounts.google.com/o/oauth2/auth', tokenUrl: 'https://oauth2.googleapis.com/token', required: true, scope: [ 'https://www.googleapis.com/auth/forms.responses.readonly', 'https://www.googleapis.com/auth/drive.readonly', ], }); exports.googleForms = (0, apps_framework_1.createPiece)({ displayName: 'Google Forms', description: 'اتصال Google Forms به بیش از 1000+ برنامه و خودکارسازی فرآیندهای کاری با فرم‌ها و نظرسنجی‌ها', minimumSupportedRelease: '0.30.0', logoUrl: 'https://cdn.anjirauto.com/apps/google-forms.png', categories: [shared_1.PieceCategory.FORMS_AND_SURVEYS], authors: ["kishanprmr", "MoShizzle", "khaledmashaly", "abuaboud", "Startouf"], auth: exports.googleFormsAuth, actions: [ (0, apps_common_1.createCustomApiCallAction)({ baseUrl: () => 'https://forms.googleapis.com/v1', auth: exports.googleFormsAuth, authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ Authorization: `Bearer ${auth.access_token}`, }); }), }), ], triggers: [new_form_response_1.newResponse], }); //# sourceMappingURL=index.js.map