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

Slack Node does not return "profile.fields" for User Get operation. #7825

Closed
oleksandrborniak opened this issue Nov 27, 2023 · 4 comments
Closed
Assignees
Labels

Comments

@oleksandrborniak
Copy link

Describe the bug
Slack Node, Resource: User, Operation: Get doesn't return "profile.fields" JSON values.

To Reproduce
Steps to reproduce the behavior:

  1. Execute Slack node, Resource: User Operation: Get for the user
Screenshot 2023-11-27 at 13 48 09

Expected behavior
The Slack Node should return "profile.fields" for the user because API https://slack.com/api/users.profile.get returns them.
Example of what "profile.fields" should contain:
Screenshot 2023-11-27 at 13 58 11

Environment:

  • OS: MacOS
  • n8n Version: 1.17.1
  • Database system: SQLite
@Joffcom
Copy link
Member

Joffcom commented Nov 27, 2023

Hey @oleksandrborniak,

Thanks for the report, I have quickly taken a look at this and while it says null for fields this looks to be correct based on the API call we are using. We use users.info which doesn't return the same data as users.profile.get you can compare the output of both below.

image

As it looks to contain the same information on both calls we could maybe look at changing the endpoint we use in the future.

@Joffcom
Copy link
Member

Joffcom commented Nov 27, 2023

Popped in a quick PR to add a new option to the Slack node to support getting a users profile, The PR can be above or here: #7829

@oleksandrborniak
Copy link
Author

@Joffcom Thank you!

Joffcom added a commit that referenced this issue Nov 29, 2023
Github issue / Community forum post (link here to close automatically):
#7825

This adds support for getting a users profile which returns different
data to the existing user info (Get) operation we have.

Test Workflow
```
{
  "meta": {
    "instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd"
  },
  "nodes": [
    {
      "parameters": {},
      "id": "69f437fb-9962-4d51-91bb-0ef4b3827e49",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        880,
        380
      ]
    },
    {
      "parameters": {
        "resource": "user",
        "user": {
          "__rl": true,
          "value": "U035F563JSW",
          "mode": "list",
          "cachedResultName": "jonathan"
        }
      },
      "id": "826828db-598b-40c7-b085-5b01f2c10d73",
      "name": "Get Info",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [
        1120,
        260
      ],
      "credentials": {
        "slackApi": {
          "id": "E4DnXIyNuRxi5GSz",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "resource": "user",
        "operation": "getProfile",
        "user": {
          "__rl": true,
          "value": "U035F563JSW",
          "mode": "list",
          "cachedResultName": "jonathan"
        }
      },
      "id": "9de02c3f-e17c-4a32-a64e-11aaa0b36120",
      "name": "Get Profile",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [
        1120,
        440
      ],
      "credentials": {
        "slackApi": {
          "id": "E4DnXIyNuRxi5GSz",
          "name": "Slack account"
        }
      }
    }
  ],
  "connections": {
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Get Info",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {}
}
```
@janober
Copy link
Member

janober commented Dec 1, 2023

Fix got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants