Relay Pull PDF Action
  • 05 Sep 2025
  • 2 Minutes to read
  • Dark
    Light

Relay Pull PDF Action

  • Dark
    Light

Article summary

The RelayPullPDFAction is used to pull a PDF document generated from a Relay Power-up form submission. Once downloaded, a ContentDocument link to the specified linkedEntityId will be created.

This flow action is always executed in a background job. If an error occurs during the PDF download, a record will be created in the RelayLog__c custom object.

WARNING
This action makes an external callout to Relay Network. Please be aware of any impacts this has against your Salesforce API limits. Salesforce Callout Limits

Action Dialog

sfdc-flow-action-pull-pdf

Action Input Values

Field

Description

Client Id

Optional. This value is only required when your org is configured to support multiple Relay Client IDs. See: Custom Metadata

Description

A description for the ContentDocument

Document Link Share Type

The permission granted to the user of the shared file in a library. This is determined by the permission the user already has in the library. If this field is not provided, then the value of V will be used.

Valid values are:

  • V — Viewer permission. The user can explicitly view but not edit the shared file.

  • C — Collaborator permission. The user can explicitly view and edit the shared file. You can retrieve the ShareType for ContentDocumentLink, but you can't create a ContentDocumentLink with a ShareType of C from an Apex trigger.

  • I — Inferred permission. The user’s permission is determined by the related record. For shares with a library, this is defined by the permissions the user has in that library. Inferred permission on shares with libraries and file owners is available in API versions 21.0 and later. Inferred permission on shares with standard objects is available in API versions 36.0 and later.

See Salesforce docs: ContentDocumentLink

Document Link Visibility

Specifies whether this file is available to all users, internal users, or shared users. If this field is not provided, then the default value of AllUsers will be used.

Valid values are:

  • AllUsers — The file is available to all users who have permission to see the file.

  • InternalUsers — The file is available only to internal users who have permission to see the file.

  • SharedUsers — The file is available to all users who can see the feed to which the file is posted. SharedUsers is used only for files shared with users, and is available only when an org has private org-wide sharing on by default. The SharedUsers value is available in API version 32.0 and later.

See Salesforce docs: ContentDocumentLink

Linked Entity Id

Optional. If the Should Create Document field is set to {!$GlobalConstant.True}, then this field must also be provided. This field identifies the Salesforce entity (record) that should be liked to the ContentDocument. For example, this could be the Id field of a Person Account object.

See Salesforce docs: ContentDocumentLink

Should Create Document

Specifies if the action should create a ContentDocument and ContentDocumentLink to the entity identified by the value in the Linked Entity Id field. If this field value is not provided then a default value of {!$GlobalConstant.False} will be used.

Valid values are:

  • {!$GlobalConstant.False} — Run the action in the current flow process.

  • {!$GlobalConstant.True} — Run the action in a future.

Submission ID

Required. The Relay Power-up form submission ID. This identifies the PDF that should be downloaded.

Title

A title for the ContentDocument.

Action Response Variable

The action returns a custom Relay object  RelayPullPDFAction.PullPDFResponse.

Field

Description

statusCode

A numeric value.

  • 400: There was an error with one or more of the request parameters. Review the statusMessage field for the specific error.

  • 202: The request was accepted and will be processed (e.g. the PDF will be downloaded) in a background job. If any errors occur in the background job, a record will be created in the RelayLog__c object.

statusMessage

A human readable message describing the result of the action.


Was this article helpful?