> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.linkedinPages.core.CreatePost

- Component: `appmixer.linkedinPages.core.CreatePost`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.linkedinPages 1.0.0](https://connectors.appmixer.com/connector/appmixer.linkedinPages/1.0.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.linkedinPages/1.0.0/component/appmixer.linkedinPages.core.CreatePost>

Publish a post on behalf of a LinkedIn company page you manage, optionally with a shared link or an image.

## Properties

_No properties defined._

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Organization (`organizationId`) | text | Select the company page to post as, or type its numeric organization ID (e.g. 12345) or URN (urn:li:organization:12345). The ID is shown in the page admin URL: linkedin.com/company/{id}/admin/. The list shows pages where you are an administrator or content administrator. |
| Visibility (`visibility`) | select | Select who can see this post. Note: 'Connections Only' is not available for company page posts. |
| Text (`text`) | textarea | Text of the post. Characters that LinkedIn reserves for formatting are escaped automatically unless Allow mentions is on. |
| Allow mentions (`allowMentions`) | toggle | Send the text in LinkedIn "little text" format to mention pages or people, e.g. `@[Acme](urn:li:organization:12345)`. Reserved characters `\| { } @ [ ] ( ) < > # \ * _ ~` that are not part of a mention must then be escaped with a backslash. |
| Share specific link (`specificLink`) | toggle | Enable to attach a URL article link to the post. |
| URL (`url`) | text | A fully qualified URL for the content being shared. |
| Title (`title`) | text | The title of the content being shared. |
| Description (`description`) | textarea | The description of the content being shared. |
| Image (`imageFileId`) | filepicker | Optional image to attach to the post: a JPG, PNG or GIF file. To post an image from a web address, download it first with the Download File utility. A post can have either a shared link or an image. |
| Image Alt Text (`altText`) | text | Text that describes the image for screen readers. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Status (`status`) | integer | - |
| Post ID (`postId`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.linkedinPages.core.CreatePost",
  "description": "Publish a post on behalf of a LinkedIn company page you manage, optionally with a shared link or an image.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "private": false,
  "auth": {
    "service": "appmixer:linkedinPages",
    "scope": [
      "w_organization_social"
    ]
  },
  "quota": {
    "manager": "appmixer:linkedinPages",
    "resources": "shares",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "allowMentions": {
            "type": "boolean"
          },
          "specificLink": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageFileId": {
            "type": "string"
          },
          "altText": {
            "type": "string"
          }
        },
        "required": [
          "organizationId",
          "text"
        ]
      },
      "inspector": {
        "inputs": {
          "organizationId": {
            "type": "text",
            "label": "Organization",
            "index": 1,
            "tooltip": "Select the company page to post as, or type its numeric organization ID (e.g. 12345) or URN (urn:li:organization:12345). The ID is shown in the page admin URL: linkedin.com/company/{id}/admin/. The list shows pages where you are an administrator or content administrator.",
            "source": {
              "url": "/component/appmixer/linkedinPages/core/ListOrganizations?outPort=out",
              "data": {
                "transform": "./ListOrganizations#organizationsToSelectArray",
                "properties": {
                  "isSource": true
                }
              }
            }
          },
          "visibility": {
            "type": "select",
            "label": "Visibility",
            "options": [
              {
                "label": "Public",
                "value": "PUBLIC"
              },
              {
                "label": "Logged In Members Only",
                "value": "LOGGED_IN"
              }
            ],
            "defaultValue": "PUBLIC",
            "index": 2,
            "tooltip": "Select who can see this post. Note: 'Connections Only' is not available for company page posts."
          },
          "text": {
            "type": "textarea",
            "tooltip": "Text of the post. Characters that LinkedIn reserves for formatting are escaped automatically unless Allow mentions is on.",
            "label": "Text",
            "index": 3
          },
          "allowMentions": {
            "type": "toggle",
            "label": "Allow mentions",
            "defaultValue": false,
            "index": 4,
            "tooltip": "Send the text in LinkedIn \"little text\" format to mention pages or people, e.g. <code>@[Acme](urn:li:organization:12345)</code>. Reserved characters <code>| { } @ [ ] ( ) &lt; &gt; # \\ * _ ~</code> that are not part of a mention must then be escaped with a backslash."
          },
          "specificLink": {
            "type": "toggle",
            "tooltip": "Enable to attach a URL article link to the post.",
            "label": "Share specific link",
            "defaultValue": false,
            "index": 5
          },
          "url": {
            "type": "text",
            "tooltip": "A fully qualified URL for the content being shared.",
            "label": "URL",
            "index": 6,
            "when": {
              "eq": {
                "specificLink": true
              }
            }
          },
          "title": {
            "type": "text",
            "tooltip": "The title of the content being shared.",
            "label": "Title",
            "index": 7,
            "when": {
              "eq": {
                "specificLink": true
              }
            }
          },
          "description": {
            "type": "textarea",
            "tooltip": "The description of the content being shared.",
            "label": "Description",
            "index": 8,
            "when": {
              "eq": {
                "specificLink": true
              }
            }
          },
          "imageFileId": {
            "type": "filepicker",
            "label": "Image",
            "index": 9,
            "tooltip": "Optional image to attach to the post: a JPG, PNG or GIF file. To post an image from a web address, download it first with the Download File utility. A post can have either a shared link or an image.",
            "when": {
              "eq": {
                "specificLink": false
              }
            }
          },
          "altText": {
            "type": "text",
            "label": "Image Alt Text",
            "index": 10,
            "tooltip": "Text that describes the image for screen readers.",
            "when": {
              "eq": {
                "specificLink": false
              }
            }
          }
        }
      }
    }
  ],
  "properties": {},
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status",
            "example": 201
          },
          "postId": {
            "type": "string",
            "title": "Post ID",
            "example": "urn:li:share:7241234567890123456"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
