Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hubspot CMS #886

Merged
merged 33 commits into from
Jul 19, 2021
Merged

Hubspot CMS #886

merged 33 commits into from
Jul 19, 2021

Conversation

troystaylor
Copy link
Contributor


When submitting a connector, please check the following conditions for your PR.

  • I attest that the connector works and I verified by deploying and testing all the operations.
  • I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
  • I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff.

Copy link
Contributor

@mamurshe mamurshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update empty titles but don't update this PR yet. We will submit this version for certification. Once it is available for testing you can submit this fix and any new issues that we discover.

"type": "integer",
"format": "int32",
"description": "The category id of the template",
"title": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the title empty?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix all the titles.

@mamurshe
Copy link
Contributor

[[certify-connector]]

@mamurshe mamurshe changed the title certify-connector Hubspot CRM Jun 15, 2021
@mamurshe
Copy link
Contributor

[[certify-connector]]

1 similar comment
@mamurshe
Copy link
Contributor

[[certify-connector]]

@troystaylor troystaylor changed the title Hubspot CRM Hubspot CMS Jun 17, 2021
@troystaylor
Copy link
Contributor Author

Updated apiProperties

Copy link
Contributor

@mamurshe mamurshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to create a custom connector using these asset with paconn CLI I get an error. Can you please update the apiProperties.json using paconn download command?

independent-publisher-connectors\HubSpot CMS>paconn create -d apiDefinition.swagger.json -p apiProperties.json -e 5827fea3-d788-43a6-9861-3c82de256bce
'properties'
Traceback (most recent call last):
  File "c:\python\lib\site-packages\knack\cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "c:\python\lib\site-packages\knack\invocation.py", line 188, in execute
    cmd_result = parsed_args.func(params)
  File "c:\python\lib\site-packages\knack\commands.py", line 131, in __call__
    return self.handler(*args, **kwargs)
  File "c:\python\lib\site-packages\knack\commands.py", line 238, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
  File "c:\python\lib\site-packages\paconn\commands\create.py", line 47, in create
    connector_id = upsert(
  File "c:\python\lib\site-packages\paconn\operations\upsert.py", line 82, in upsert
    properties = property_definition[_PROPERTIES]
KeyError: 'properties'

Copy link
Contributor

@mamurshe mamurshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the additional redirect URL

"redirectUrl": ["https://global.consent.azure-apim.net/redirect", "https://global-test.consent.azure-apim.net/redirect"],

to

"redirectUrl": "https://global.consent.azure-apim.net/redirect",

Copy link
Contributor

@mamurshe mamurshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add connectionParameters section as shown below? It's needed for deployment.

  "properties": {
    "connectionParameters": {
      "api_key": {
        "type": "securestring",
        "uiDefinition": {
          "constraints": {
            "clearText": false,
            "required": "true",
            "tabIndex": 3
          },
          "schema": {
            "description": "Enter your API Key for HubSpot",
            "type": "securestring"
          },
          "displayName": "API Key generated in HubSpot"
        }
      }
    },
    "connectionParameterSets": {

@@ -0,0 +1,75 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete the api-key auth.

{
  "properties": {
    "connectionParameters": {
      "token": {
        "type": "oauthSetting",
        "oAuthSettings": {
          "identityProvider": "oauth2",
          "clientId": "[Your_Value]",
          "scopes": [
            "forms files hubdb transactional-email settings.users.write conversations.visitor_identification.tokens.create integration-sync tickets e-commerce files.ui_hidden.read crm.objects.marketing_events.read accounting crm.objects.marketing_events.write crm.schemas.custom.read crm.objects.custom.read crm.objects.feedback_submissions.read sales-email-read crm.objects.custom.write forms-uploaded-files settings.users.read crm.import contacts content reports social automation settings.billing.write actions timeline business-intelligence"
          ],
          "redirectMode": "Global",
          "redirectUrl": "https://global.consent.azure-apim.net/redirect",
          "properties": {
            "IsFirstParty": "False"
          },
          "customParameters": {
            "authorizationUrl": {
              "value": "https://app.hubspot.com/oauth/authorize"
            },
            "tokenUrl": {
              "value": "https://api.hubapi.com/oauth/v1/token"
            },
            "refreshUrl": {
              "value": "https://api.hubapi.com/oauth/v1/token"
            }
          }
        }
      }
    },
    "iconBrandColor": "#da3b01",
    "capabilities": [],
    "publisher": "Hitachi Solutions",
    "stackOwner": "HubSpot"
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove securityDefinitons since API Properties file already has the definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
}
},
"security": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove security since API Properties file already has the definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mamurshe mamurshe merged commit 9761424 into microsoft:dev Jul 19, 2021
joshuaapple pushed a commit to docjuris/PowerPlatformConnectors that referenced this pull request Oct 6, 2021
* certify-connector

HubSpot CRM, CMS, and Marketing connectors

* certify-connector

Xero Accounting and Payroll connectors

* Revert "certify-connector"

This reverts commit 5fb06db.

* Revert "certify-connector"

This reverts commit 160b208.

* certify-connector

* certify-connector

* certify-connector

* Update apiDefinition.swagger.json

Fixed description

* Update apiDefinition.swagger.json

Cut to below 500

* Update apiDefinition.swagger.json

Cut to below 500.

* Delete icon.png

* Delete settings.json

* Delete independent-publisher-connectors/HubSpot CRM directory

* Delete independent-publisher-connectors/HubSpot Marketing directory

* Delete independent-publisher-connectors/Xero Accounting directory

* Delete independent-publisher-connectors/Xero Payroll - UK directory

* Delete independent-publisher-connectors/Xero Projects directory

* Fix remaining descriptions, scope should be string

* Fix clientId

* apiProperties fix

* Update apiProperties.json

* Update README.md

* Update README.md

* Update apiProperties.json

* Update apiProperties.json

* Change connectionParameters to parameters

* Update required scopes

* Change to "redirectUrl": "https://global.consent.azure-apim.net/redirect"

* Fixed scopes

* Removed unused scopes

* Fix hapikey

* Removed API key connection

* Removed security

Co-authored-by: Mahbub Murshed <mamurshe@microsoft.com>
Co-authored-by: Mahbub Murshed <48570820+mamurshe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants