Getting error while using Integration in portals

Certified Senior Developer

Hi getting error using the integration in portals . Called integration object in the interface and used that interface as page in portal

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    check if that rule has service account/group added in the security , also check if that component is compatible for portal

  • 0
    Certified Senior Developer
    in reply to Abhishek Singh

    integration working fine in the interface page but when added that interface as page in portal it is giving error for integration uuid.

    below is the integration UUID in application and interface code also the ".properties" file used in application".

    as per error screenshot ...it is not accepting the integration (which is called in interface)

    ***********" "c_interface1_input"  Interface Code "********

    a!localVariables(
    local!Input,
    local!PassData,
    local!integration:if(a!isNullOrEmpty(local!Input),{}, rule!C_OpenAI_Integration(Input: local!Input)),
    a!formLayout(
    label: "",
    contents: {
    a!sectionLayout(
    contents: {
    a!richTextDisplayField(
    label: "Chat GPT",
    labelPosition: "COLLAPSED",
    value: {
    a!richTextItem(
    text: {
    "Chat GPT"
    },
    size: "LARGE",
    style: {
    "STRONG"
    }
    )
    },
    align: "CENTER"
    ),
    a!textField(
    label: "Question",
    labelPosition: "ABOVE",
    value:{local!PassData},
    saveInto: {local!PassData},
    refreshAfter: "UNFOCUS",
    validations: {}
    )
    }
    ),
    a!sectionLayout(
    label:"",
    contents: {
    a!buttonArrayLayout(
    buttons: {
    a!buttonWidget(
    label: "Ask GPT",
    icon: "search",
    value: local!PassData,
    saveInto: a!save(local!Input,save!value),
    style: "NORMAL"
    )
    },
    align: "CENTER"
    ),

    a!cardLayout(

    contents: {

    a!richTextDisplayField(

    labelPosition: "COLLAPSED",
    value:{index(index(index(local!integration,"result",{}),"choices",{}),"text",{})
    })
    },
    height: "AUTO",
    showWhen: a!isNotNullOrEmpty(local!Input),
    style: "TRANSPARENT",
    marginBelow: "STANDARD"
    )
    }
    )
    }
    )

    )

    *********" .properties file"

    ## Connected System: 'C Connected System1'
    connectedSystem.'_a-0000e9fe-cbe6-8000-9c71-011c48011c48_41022'.baseUrl='https://pung.appianportals.com/chat-gpt-testing'
    connectedSystem.'_a-0000e9fe-cbe6-8000-9c71-011c48011c48_41022'.apiKeyValue='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'
    **************

  • 0
    Certified Associate Developer
    in reply to Abhishek Singh

    Adding to Abhishek

    Try to re-add the interface and publish the portal and check the service account .

    In integration check you are passing input as an array or not because you local!passData input is an array.

  • 0
    Certified Lead Developer

    If integration doesn't work (which is likely when you try to use it directly in the portal), you can create a process model to call the integration and use "a!startProcess" in your interface. Alternatively, you can create a WebAPI using that process, create an integration, and use it in your interface.