Hide API response after email confirmation

I have a button in a email confirmation, so when user hit it makes a action to my app and then the server send a response in JSON with all my information. I don´t really want to show that to the approver user or even anyone. Is there a way to hide the JSON API response or maybe close the tab automatically after that?

I spent the last two day looking for a solution and researching but it doesn´t work.
Hope you understand.
Best regards:

I’m really not sure what you’re talking about, and since you haven’t got any other response, I bet other people are confused too.

Can you elaborate on your setup, preferably with screenshots?

2 Likes

Bingo!

Sorry about that,

I’m sending this email in order to trigger an action.

then, when I hit the approve button and this tab shows.

Captura2

I would like to hide that JSON on the tab because it has information I dont want to show.
If you have any suggestions would be great.

hope now its better explained.

1 Like

How are you sending that email?

With a bot, it waits for a specific change on the app and trigger a task.

I meant how are these buttons getting in your email? How is your email template constructed?

It looks like you’re opening an Appsheet API URL inside a web browser. I wasn’t aware you could do that. The return values from Appsheet API is not something that you can change. You may have to trigger the API call from another service.

Here is a screenshot to show you

image

and a part of the html code

I’m not sure how I can get this done in other way.

That’s a very interesting solution. I don’t think I can help you with it though.

In the past I’ve created a web-deployed Google Apps Script. Its doGet() function accepted a row key in the URL parameters, then executed a POST to Appsheet API with that row key, and it displayed a simple “you have approved this record” or whatever in the browser page. The email from Appsheet included a link to the script’s URL, along with the appropriate row key in the URL params, that the user could click on, much like yours, to execute the approval.

2 Likes

Thanks a lot! @Marc_Dillon

Could you please show or even send me some of the code for that?

I think it would help me a bunch

I’m sorry, that’s a complex task that I don’t have time to do for free. I’ll PM you some details if you wish to hire me to help with it. You could also potentially wait for the new “AMP” feature to come out (search this community for more info on that).

3 Likes

What you’re trying to do isn’t supported by AppSheet.

1 Like

You can maybe adapt this to your needs - https://www.benlcollins.com/apps-script/google-sheets-button/

2 Likes

Hi @Cesar_Fontalvo!

You can try out our new Dynamic Emails (also known as AMP emails) feature which is now in the Preview Program. You can check out the announcement thread for more information on the feature and its usage.

Once you opt-in to the Preview Program, you should see a new dropdown under the email task “Use Dynamic Email”:

Selecting a view here embeds that view into the email and recipients can interact with your app without leaving their inbox.

For your use case, you could select a view in which the user can see a few details and approve or reject (either by configuring quick edit fields in a Detail View or using a Form View). You can check out the GIF in the announcement thread which is a demo of a similar approval flow!

Let me know if you have any questions :smiley:

3 Likes

Thanks :raised_hands:t2:

This is all I was lokkking for. Could you provide more information in order to try it out? Maybe how to configure the buttons and forms.

1 Like

Glad to hear that is what you were looking for!

Our help center article Sending dynamic email from a bot is a great resource to get started with Dynamic Emails.

Also, here is a sample app that uses Dynamic Emails which you can copy and customize for your use case.

Let me know if you have any specific questions!

2 Likes

@Sarmad_Hashmi thank you!

If the user resend the email to someone else, that other user could interact with the App too ? Could we set some validations for prevent that?

Make sure you read the announcement post about this feature that was linked.

3 Likes

Thank you @Marc_Dillon for that context!

Furthermore, if you forward a dynamic email, the dynamic portion of the email will no longer render (e.g: the app view will no longer be accessible) and users will instead see a link to the app instead.

We’ve added this to the help center article as well.

3 Likes