diff --git a/apps/docs/app/developer-docs/integrations/google-sheets/link-survey-with-sheet.webp b/apps/docs/app/developer-docs/integrations/google-sheets/link-survey-with-sheet.webp
index 90e1e02d7b..daa7a1ee90 100644
Binary files a/apps/docs/app/developer-docs/integrations/google-sheets/link-survey-with-sheet.webp and b/apps/docs/app/developer-docs/integrations/google-sheets/link-survey-with-sheet.webp differ
diff --git a/apps/docs/app/developer-docs/integrations/google-sheets/link-with-questions.webp b/apps/docs/app/developer-docs/integrations/google-sheets/link-with-questions.webp
index 767a2f4143..c09b0656d0 100644
Binary files a/apps/docs/app/developer-docs/integrations/google-sheets/link-with-questions.webp and b/apps/docs/app/developer-docs/integrations/google-sheets/link-with-questions.webp differ
diff --git a/apps/docs/app/developer-docs/integrations/google-sheets/page.mdx b/apps/docs/app/developer-docs/integrations/google-sheets/page.mdx
index 5b3a934e33..f02a163a16 100644
--- a/apps/docs/app/developer-docs/integrations/google-sheets/page.mdx
+++ b/apps/docs/app/developer-docs/integrations/google-sheets/page.mdx
@@ -21,7 +21,8 @@ export const metadata = {
The Google Sheets integration allows you to automatically send responses to a Google Sheet of your choice.
- If you are on a self-hosted instance, you will need to configure this integration separately. Please follow the guides [here](/self-hosting/integrations) to configure integrations on your self-hosted instance.
+ If you are on a self-hosted instance, you will need to configure this integration separately. Please follow
+ the guides [here](/self-hosting/integrations) to configure integrations on your self-hosted instance.
## Connect Google Sheets
@@ -70,7 +71,7 @@ Before the next step, make sure that you have a Formbricks Survey with at least
className="max-w-full rounded-lg sm:max-w-3xl"
/>
-6. Select the Google Sheet you want to link with Formbricks and the Survey. On doing so, you will be asked with what questions' responses you want to feed in the Google Sheet. Select the questions and click on the "Link Sheet" button.
+6. Enter the spreadsheet URL for the Google Sheet you want to link with Formbricks and the Survey. On doing so, you will be asked with what questions' responses you want to feed in the Google Sheet. Select the questions and click on the "Link Sheet" button.
We store as little personal information as possible.
diff --git a/apps/docs/app/self-hosting/integrations/page.mdx b/apps/docs/app/self-hosting/integrations/page.mdx
index 4122e9a5e0..e88b3ff7d8 100644
--- a/apps/docs/app/self-hosting/integrations/page.mdx
+++ b/apps/docs/app/self-hosting/integrations/page.mdx
@@ -116,7 +116,7 @@ Integrating Google Sheets with a self-hosted Formbricks instance requires config
1. Go to the **[Google Cloud Console](https://console.cloud.google.com/)** and **create a new project**.
2. Enable necessary APIs:
- Now select the project you just created and go to the **APIs & Services** section.
- - Click on the **Enable APIs and Services** button and search for **Google Sheets API** & **Google Drive API** and enable it.
+ - Click on the **Enable APIs and Services** button and search for **Google Sheets API** and enable it.
3. Configure OAuth Consent Screen:
- Go to **OAuth Consent screen** and select the appropriate User Type (External or Internal). Select **Internal** if you want only the users of your Google Workspace to be able to use the integration.
- Fill the required details:
@@ -128,12 +128,11 @@ Integrating Google Sheets with a self-hosted Formbricks instance requires config
- Click on the **Add or Remove Scopes** button and add the scopes:
- `https://www.googleapis.com/auth/userinfo.email`
- `https://www.googleapis.com/auth/spreadsheets`
- - `https://www.googleapis.com/auth/drive`
- Click on the **Update** button. Verify the scopes and click on the **Save and Continue** button.
- Skip the **Test Users** section and click on the **Save and Continue** button.
-1. View the OAuth Consent Screen summary and click on the **Back to Dashboard** button.
-2. Register OAuth Client:
+5. View the OAuth Consent Screen summary and click on the **Back to Dashboard** button.
+6. Register OAuth Client:
- Navigate to **Credentials** > **Create Credentials** > **OAuth Client ID**.
- Select **Web Application** and set:
@@ -142,13 +141,10 @@ Integrating Google Sheets with a self-hosted Formbricks instance requires config
- Authorized redirect URIs: `https:///api/google-sheet/callback`
- Save and note the Client ID and Client Secret.
-1. Copy the Client ID and Client Secret and set them as environment variables in your Formbricks instance:
+7. Copy the Client ID and Client Secret and set them as environment variables in your Formbricks instance:
- `GOOGLE_SHEETS_CLIENT_ID`
- `GOOGLE_SHEETS_CLIENT_SECRET`
- `GOOGLE_SHEETS_REDIRECT_URL`
-2. Enable Google Drive API:
- - Go to the **APIs & Services** section and click on the **Enable APIs and Services** button.
- - Search for **Google Drive API** and enable it.
Now just copy **GOOGLE_SHEETS_CLIENT_ID**, **GOOGLE_SHEETS_CLIENT_SECRET** and **GOOGLE_SHEETS_REDIRECT_URL** for your integration & add it to your **Formbricks environment variables** as in the docker compose file:
diff --git a/apps/web/app/(app)/environments/[environmentId]/integrations/airtable/components/AddIntegrationModal.tsx b/apps/web/app/(app)/environments/[environmentId]/integrations/airtable/components/AddIntegrationModal.tsx
index fdfd65c664..66cca1115b 100644
--- a/apps/web/app/(app)/environments/[environmentId]/integrations/airtable/components/AddIntegrationModal.tsx
+++ b/apps/web/app/(app)/environments/[environmentId]/integrations/airtable/components/AddIntegrationModal.tsx
@@ -1,11 +1,13 @@
"use client";
import { createOrUpdateIntegrationAction } from "@/app/(app)/environments/[environmentId]/integrations/actions";
+import { BaseSelectDropdown } from "@/app/(app)/environments/[environmentId]/integrations/airtable/components/BaseSelectDropdown";
import { fetchTables } from "@/app/(app)/environments/[environmentId]/integrations/airtable/lib/airtable";
+import AirtableLogo from "@/images/airtableLogo.svg";
import Image from "next/image";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
-import { Control, Controller, UseFormSetValue, useForm } from "react-hook-form";
+import { Controller, useForm } from "react-hook-form";
import { toast } from "react-hot-toast";
import { getLocalizedValue } from "@formbricks/lib/i18n/utils";
@@ -25,8 +27,6 @@ import { Label } from "@formbricks/ui/Label";
import { Modal } from "@formbricks/ui/Modal";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui/Select";
-import AirtableLogo from "../images/airtable.svg";
-
type EditModeProps =
| { isEditMode: false; defaultData?: never }
| { isEditMode: true; defaultData: IntegrationModalInputs & { index: number } };
@@ -56,69 +56,16 @@ const NoBaseFoundError = () => {
);
};
-interface BaseSelectProps {
- control: Control;
- isLoading: boolean;
- fetchTable: (val: string) => Promise;
- airtableArray: TIntegrationItem[];
- setValue: UseFormSetValue;
- defaultValue: string | undefined;
-}
-
-const BaseSelect = ({
+export const AddIntegrationModal = ({
+ open,
+ setOpenWithStates,
+ environmentId,
airtableArray,
- control,
- fetchTable,
- isLoading,
- setValue,
- defaultValue,
-}: BaseSelectProps) => {
- return (
-