Error: Guest users are not permitted to perform this operation: Caused by Flow action – “Post to Chatter”

Introduction

You may get this error when a flow has action – Post to Chatter and record is being created using Guest user.

This is as expected as Guest User can not create Chatter Feed in the system.

Workaround

No, you cant access Chatter with Guest User Content. No matter what you do, if you are in Guest user content you will never be able to post to chatter

There are following workarounds we have:

  1. Apex Trigger: As it runs in system mode, we can move the piece of automation in trigger.
  2. Using Platform Event : Guest user can publish platform events. YAY. So you just have to Write a trigge on platform Event that will insert a FeedItem(Chatter)
  3. Using Rest API: Store a system user’s Username and password in CUstom Settings / Custom Metadata and then Use that to get Access Token using username-password oauth flow. Once you got access token you can directly call chatter rest endpoint to post messages.