When an Apex trigger is configured as the subscriber of a Platform Event in Salesforce, the trigger executes as the 'Automated Process' user rather than the user who published the event (the causing user).
Example scenario: A notification Platform Event is created to log actions that require downstream notifications — such as sending an email or calling an external system. The event records the reason, message, notification type, object ID, and record name. A trigger on this event checks the notification type and, for special orders, fires a workflow rule on a custom object that sends an email template. However, when the event is published via the REST API, the email is not sent and debug logs show an error. This occurs because the trigger runs as 'Automated Process', not as the user who made the API call.
Other affected use cases: SOQL queries executed in the Automated Process user context may not return expected results, particularly when record visibility or sharing rules are user-dependent.
Apex triggers that subscribe to Platform Events execute as the 'Automated Process' system user by design in the Salesforce Platform Event architecture. This user does not have the same profile, role, or permissions as the publishing user.
Recommended Workaround — Use a Flow-Based Subscriber:
Replace the Apex trigger subscriber with an Autolaunched Flow triggered by the Platform Event. Flow-based subscribers execute as the causing user (the user who published the event), preserving the correct user context for downstream operations such as workflow rule emails, API calls, and sharing-dependent SOQL queries.
To configure a Flow-based Platform Event subscriber: In Setup, navigate to Flows, create a new Autolaunched Flow, and set the trigger to the Platform Event you want to subscribe to. Map the event fields to the flow variables and build your logic in the flow.
Note: Process Builder also executes as the causing user and can be used as an alternative; however, Process Builder is scheduled for retirement. New implementations should use Flow.
000383103

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.