Share feedback, ideas and get community help

Updated 4 months ago

Getting error on enum

At a glance

A community member is trying to integrate Google Calendar into their bot template but is encountering an error when trying to add the Google Calendar block by drag and drop. Another community member provided further details on the error, explaining that they have set up the necessary files and configurations according to the contribution guidelines, but are still facing issues when trying to use the block in the integration tab. The thread was closed in favor of a discussion on a Discord channel.

Useful resources
I am trying to integrate the google calendar. Now I am getting this error when I try add google calendar by drag and drop in bot template. Screenshot attached. Any help will be highly appreciated.
Attachment
Capture.PNG
z
B
2 comments
Further Error description:

so according to the contribution file we have created our folder in the given path with three file schema, constant, index.ts and we have given the variable in the integerationblocktype enum function in the constant.ts and i have put the schema function in the schema.ts that was global also initilized the path in global index.ts and this is the initial test file i created
Plain Text
 
import test from '@playwright/test';
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions';
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers';
import { createId } from '@paralleldrive/cuid2';
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants';

test.describe('Google Calendar block', () => {
  test('its configuration should work', async ({ page }) => {
    const typebotId = createId();
    await createTypebots([
      {
        id: typebotId,
        ...parseDefaultGroupWithBlock({
            type: IntegrationBlockType.GOOGLE_CALENDAR,
          }),
      },
    ]);

    await page.goto(/typebots/${typebotId}/edit)
    await page.getByText('Configure...').click()
    await page.fill('input[placeholder="OAuth Client ID"]', ${process.env.CLIENT_ID});
    await page.fill('input[placeholder="Calendar ID"]', 'your-calendar-id');
    await page.fill('input[placeholder="Monday to Friday, 9 AM to 5 PM"]', 'availability-settings');
    // Add additional configuration steps if needed
  });
});

but when i try to use the block in the integration tab it gives me the above error in the screenshot can you please guide me thank you.
Add a reply
Sign up and join the conversation on Discord