Member Junction
    Preparing search index...

    Action to update an existing SurveyMonkey survey

    IMPORTANT: When MergeWithExisting is true (default), fetches the current survey and merges your changes. When false, replaces entire survey data (use with caution).

    The action uses PATCH for partial updates when MergeWithExisting=true, which is the recommended approach for most use cases.

    Security: Uses secure credential lookup via CompanyID instead of accepting tokens directly.

    await runAction({
    ActionName: 'Update SurveyMonkey',
    Params: [{
    Name: 'CompanyID',
    Value: 'your-company-id'
    }, {
    Name: 'SurveyID',
    Value: 'abc123'
    }, {
    Name: 'Title',
    Value: 'Updated Survey Title'
    }, {
    Name: 'MergeWithExisting',
    Value: true
    }]
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    • Get all responses with automatic pagination

      Parameters

      • surveyId: string
      • accessToken: string
      • Optionaloptions: {
            end_created_at?: string;
            end_modified_at?: string;
            maxResponses?: number;
            sort_by?: "date_modified" | "date_created";
            sort_order?: "ASC" | "DESC";
            start_created_at?: string;
            start_modified_at?: string;
            status?: "completed" | "partial" | "overquota" | "disqualified";
        }

      Returns Promise<SurveyMonkeyResponse[]>

    • Gets credentials from environment variables Format: BIZAPPS_{PROVIDER}{COMPANY_ID}{CREDENTIAL_TYPE} Example: BIZAPPS_TYPEFORM_12345_API_TOKEN

      Falls back to: BIZAPPS_{PROVIDER}_{CREDENTIAL_TYPE} if no company-specific credential found Example fallback: BIZAPPS_TYPEFORM_API_TOKEN

      Parameters

      • companyId: string
      • credentialType: string

      Returns string

    • Helper to securely retrieve API token for a company. This method should be used by all form builder actions instead of accepting tokens as parameters.

      Parameters

      • companyId: string

        The MemberJunction company ID (required)

      • contextUser: UserInfo

        The user context for database queries

      Returns Promise<string>

      The API token for the specified company

      Error if no credentials are found or company integration is not configured

    • Get responses from a SurveyMonkey survey

      Parameters

      • surveyId: string
      • accessToken: string
      • Optionaloptions: {
            end_created_at?: string;
            end_modified_at?: string;
            page?: number;
            per_page?: number;
            sort_by?: "date_modified" | "date_created";
            sort_order?: "ASC" | "DESC";
            start_created_at?: string;
            start_modified_at?: string;
            status?: "completed" | "partial" | "overquota" | "disqualified";
        }

      Returns Promise<SurveyMonkeyResponsesResult>

    • Update survey details

      Parameters

      • surveyId: string
      • accessToken: string
      • updateData: {
            buttons_text?: {
                done_button?: string;
                exit_button?: string;
                next_button?: string;
                prev_button?: string;
            };
            custom_variables?: Record<string, string>;
            language?: string;
            nickname?: string;
            title?: string;
        }

      Returns Promise<SurveyMonkeySurveyDetails>