Creates a new FeedAttachment record, which is a file attachment to a feed item. The attachment is a link between a FeedItem and a ContentVersion record - these records may be specified to this commands through its attributes or through command hierarchy. If this command is placed as the child of a postFeedItem command, the file is attached to that item. If this command has a createContentVersion child, the file to attach will be what that command creates.

Note that posting attachments to feed items requires the user's Salesforce profile to have the Administrative permission "Edit My Own Posts". This permission is not automatically enabled for custom profiles, so do make sure that the Flow's intended users have this permission enabled in their profiles.

Parent commands

  • postFeedItem
    Optional. The file will become attached to the post created by this parent command if the feedItemID attribute is undefined.

Child commands

  • createContentVersion
    Optional. The attached file will be the product of this child command if the contentRecordID attribute is undefined.

Attributes

contentRecordID


Required
Value type
EL-evaluated
No String Yes
Defines the file to attach to the feed item. The resolved value of this attribute should the record ID of a ContentVersion object. This record ID may also be defined through a createContentVersion child command. In this case this attribute's value should be left undefined.

Leaving this attribute undefined without a createContentVersion child command is considered an error.
feedItemID

Required
Value type
EL-evaluated
No String Yes
Defines the feed item the file is attached to. The resolved value of this attribute should the record ID of a FeedItem object. This record ID may also be defined through a postFeedItem parent command. In this case this attribute's value should be left undefined.

Leaving this attribute undefined without a postFeedItem parent command is considered an error.
title

Required
Value type
EL-evaluated
No String Yes
Defines a title for the attachment.

Examples

See the examples of postFeedItem.