-
Notifications
You must be signed in to change notification settings - Fork 5.5k
LinkedIn improvements and new action #17401
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
Changes from all commits
2cba8cd
6c27687
9dd9e99
6c9abae
f5ff6d1
c1731fc
c15945e
973c26b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,15 +3,17 @@ import linkedin from "../../linkedin.app.mjs"; | |||||
| export default { | ||||||
| key: "linkedin-get-organization-access-control", | ||||||
| name: "Gets Organization Access Control", | ||||||
| description: "Gets an organization's access control information, given the organization urn. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/organization-access-control?context=linkedin/compliance/context#find-access-control-information)", | ||||||
| version: "0.1.6", | ||||||
| description: "Gets a selected organization's access control information. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-access-control)", | ||||||
| version: "0.2.0", | ||||||
|
Comment on lines
+6
to
+7
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify the updated documentation URL is accessible. The documentation URL has been updated to Microsoft's LinkedIn API documentation. Please ensure this URL is accessible and points to the correct documentation for the organization access control endpoint. 🌐 Web query: 💡 Result: The URL you provided for the LinkedIn API documentation: is not valid or accessible as a current, up-to-date documentation page.
Recommendation: Citations:
Outdated LinkedIn API documentation version • File: components/linkedin/actions/get-organization-access-control/get-organization-access-control.mjs description: "Gets a selected organization's access control information. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-01&tabs=http#find-organization-access-control)",
-version: "0.2.0",
+description: "Gets a selected organization's access control information. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/organization-access-control-by-role?view=li-lms-2025-06&tabs=http#find-organization-access-control)",
version: "0.2.0",
🤖 Prompt for AI Agents |
||||||
| type: "action", | ||||||
| props: { | ||||||
| linkedin, | ||||||
| organizationUrn: { | ||||||
| type: "string", | ||||||
| label: "Organization Urn", | ||||||
| description: "The organizational entity for which the access control information is being retrieved. Must be in URN format urn:li:organization:{id}.", | ||||||
| organizationId: { | ||||||
| propDefinition: [ | ||||||
| linkedin, | ||||||
| "organizationId", | ||||||
| ], | ||||||
| description: "The ID of the organization for which the access control information is being retrieved", | ||||||
| }, | ||||||
| max: { | ||||||
| propDefinition: [ | ||||||
|
|
@@ -25,12 +27,14 @@ export default { | |||||
| const count = 50; | ||||||
| const results = []; | ||||||
|
|
||||||
| const params = `q=organization&organization=${this.organizationUrn.replace(/:/g, "%3A")}&count=${count}`; | ||||||
| const organizationUrn = `urn:li:organization:${this.organizationId}`; | ||||||
|
|
||||||
| const params = `q=organization&organization=${organizationUrn.replace(/:/g, "%3A")}&count=${count}`; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Replace manual URL encoding with proper encoding function. The manual replacement of colons with - const params = `q=organization&organization=${organizationUrn.replace(/:/g, "%3A")}&count=${count}`;
+ const params = `q=organization&organization=${encodeURIComponent(organizationUrn)}&count=${count}`;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| let done = false; | ||||||
| do { | ||||||
| const { data: { elements } } = await this.linkedin.getAccessControl({ | ||||||
| params: params + `&start=${start}`, | ||||||
| strParams: params + `&start=${start}`, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify parameter name consistency with LinkedIn app method. The parameter name changed from 🏁 Script executed: #!/bin/bash
# Description: Verify the getAccessControl method signature and parameter usage across LinkedIn actions
# Search for the getAccessControl method definition in the LinkedIn app
ast-grep --pattern 'getAccessControl($_, $_) {
$$$
}'
# Search for all usages of getAccessControl to ensure consistent parameter naming
rg -A 3 'getAccessControl\('Length of output: 1927 Ensure all • components/linkedin/actions/get-member-organization-access-control/get-member-organization-access-control.mjs await this.linkedin.getAccessControl({
$,
- params,
+ strParams: params,
});
🤖 Prompt for AI Agents |
||||||
| }); | ||||||
|
|
||||||
| results.push(...elements); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import linkedin from "../../linkedin.app.mjs"; | ||
| import constants from "../../common/constants.mjs"; | ||
|
|
||
| export default { | ||
| key: "linkedin-get-profile-picture-fields", | ||
| name: "Get Profile Picture Fields", | ||
| description: "Gets the authenticated user's profile picture data including display image and metadata. [See the documentation](https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile/profile-picture)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| linkedin, | ||
| includeOriginalImage: { | ||
| type: "boolean", | ||
| label: "Include Original Image", | ||
| description: "Whether to include the original image data in the response (requires special permissions)", | ||
| optional: true, | ||
| default: false, | ||
| }, | ||
| }, | ||
| methods: { | ||
| getProfilePictureFields(args) { | ||
| return this.linkedin._makeRequest({ | ||
| url: `${constants.BASE_URL}v2/me`, | ||
| ...args, | ||
| }); | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| let projection = "id,profilePicture(displayImage~digitalmediaAsset:playableStreams"; | ||
|
|
||
| if (this.includeOriginalImage) { | ||
| projection += ",originalImage~digitalmediaAsset:playableStreams"; | ||
| } | ||
|
|
||
| projection += ")"; | ||
|
|
||
| const response = await this.getProfilePictureFields({ | ||
| $, | ||
| params: { | ||
| projection: `(${projection})`, | ||
| }, | ||
| }); | ||
|
|
||
| if (response.profilePicture) { | ||
| $.export("$summary", "Successfully retrieved profile picture fields"); | ||
| } else { | ||
| $.export("$summary", "Profile retrieved, but no profile picture found for this account"); | ||
| } | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.