Add User by automation or formula

Is there a way to add a user to a doc via automation or formula? For instance, when a person submits a form, I’d like to add them as a user and associate that row with them.

Hello @Craig_PaxsonTN

If I understand correctly, you want to give access to the doc to everyone who submits the form—is that right? If so, you can use the Doc Explorer Pack and set up an automation to press the Share Doc button whenever a form is submitted.

If your goal is just to identify who submitted the form, you can enable “Require Login” and “Include People” in the form settings. This will add a People column to store the user who submitted the form. If the form is published and the person doesn’t yet have access to the doc, Coda will (as far as I know) still capture their email in the People column, even without sharing access automatically.

Cheers,
Arnhold

2 Likes

Thank you, Arnhold.

I have one other problem - what settings do I use when sharing/embedding the doc? I can’t seem to find the right combination so that visitors can submit on the form, and then get access to the doc.

I’m not sure if I fully understood your issue, but here’s a breakdown that may help clarify things.

First, it’s important to distinguish between sharing, embedding, and publishing a doc in Coda:

  • The Embed tab in the sharing options simply provides an iframe code to embed your doc into other websites (like here in the community). It doesn’t control or change access permissions.
  • The Share tab is where you configure actual access permissions—for example, setting it so that anyone with the link can view, comment, or edit. So, if you want to embed your doc somewhere and make it accessible to everyone, you need to:
    1. Use the embed code
    2. Set sharing permissions to “anyone with the link can view/comment/edit”
  • The Publish tab allows you to publicly publish your doc. Publishing includes additional options like play mode, a custom domain, and nav bar configuration. For more details, see:
    Publish your docs to the world | Coda Help Center

Now, regarding forms:
Coda offers two primary ways to use forms, and these are independent of the doc’s sharing settings:

  1. In-doc form – The form is part of the doc and can only be accessed by people who already have access to the doc.
  2. Published form – The form is hosted at a public URL, and anyone with the link can submit responses, without needing access to the underlying doc.

If your goal is to grant access to a user based on form submission, here’s what you can do:

  • Enable “Require login” and “Include People” in the form options. This way, the form will capture the user’s email (even if they don’t have access to the doc).
  • Then, set up an automation using the Doc Explorer Pack to grant access using the captured email address.

Important caution:
Automatically giving access to everyone who submits a form might not be safe. It means anyone could gain access to your doc by just submitting a form. A better approach would be for an admin to review form responses and manually trigger a button to grant access when appropriate.

Hope this helps clarify the concepts!

Cheers,
Arnhold

3 Likes