Send Saved State by email

After the user has completed configuring the model in Appbuilder, how can we send
that state of the model by email, similar to how that works in
Shopify?
I tried to use direct text input with name context and slug,
but didn’t get any results.

Is it correct to assume that you want to send the email using an email export component?

Correct, using email export

Ok, we released App Builder 1.6 today, which contains beta functionality that should already support this. However, it’s not documented yet. We will work on an example model in the coming week.

Great, let me know when this information will be accessible.

We added a new tutorial for this feature: “Loop the value of a model state back to Grasshopper and include it in an export email” on this page. This is still a beta feature, we are looking forward to your feedback.

It is sending a link with the saved state, but I can’t open it, getting this error, and redirecting to the login page.
I sent you a link; please check it from your side.

Are you logged in the browser where you are opening the link? It is working on my side, you just need to make sure you are logged in with an account that can access the model.

So it only works for the “admin” as a private link and is not available for sharing as AppBuilder link sharing.

Is it possible to make the action (export) button visible only when logged in?

The link depends on where you are using the app from. If you start the app from the platform, the link refers back to the in-platform app URL, which requires a user to be authenticated (in this case, the link looks like shapediver.com/app/builder/v1/main/latest/…). If you are embedding your app, the app‘s url is different (as described here it’s appbuilder.shapediver.com/v1/main/latest/…).

I think there is a misunderstanding. I assume you are creating an app that will be used by anonymous end users, is that correct? If so, you are probably going to embed the app as an iframe?

Yes, the app will be used by anonymous end users and will be embedded using iframe. The idea is that the user sends the configuration from an iframe with saved state using email, and the admin opens that configuration and can get drawings for fabrication from there, but we don’t want to allow the user to send those drawings to anybody else, so we’d like to have an export button, but only for admins not for anonymous end users.

You can achieve this using the `context` query parameter described here. However, please note that this does not protect you from anybody else using that parameter and enabling the downloads.

Can you send an example?
I was trying to do that, but without success.

Please add a Direct Text Input component to your model and name it `context`. When you open the app, append `&context=MYCONTEXT` to the end of the URL. This will set the value of the direct text input to `MYCONTEXT`.