Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

Writing scripting languages in AJO

Avatar

Level 2

Hi,

 

We have the following python script code which we need to execute in AJO

 

from flask import Flask, request, jsonify

app = Flask(__name__)
@app.route('/receive_email_copy', methods=['POST'])def receive_email_copy():
    try:
        # Extract data from the incoming request        data = request.json
        # Process the data as needed        email_content = data.get('email_content')
        recipient = data.get('recipient')
        timestamp = data.get('timestamp')

        # Here you can implement logic to store or utilize the email data# For demonstration purposes, we'll simply print the received dataprint("Received email content:", email_content)
        print("Recipient:", recipient)
        print("Timestamp:", timestamp)

        # Respond with a success messagereturn jsonify({"message": "Email copy received successfully"}), 200except Exception as e:
        # Handle any exceptionsreturn jsonify({"error": str(e)}), 500if __name__ == '__main__':
    app.run(debug=True)

 

Can we write and execute this inside AJO somewhere?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@NeeharikaSh You can't run this in AJO rather take a look at Adobe I/O Runtime if that's helpful.

Thanks, Sathees

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@NeeharikaSh You can't run this in AJO rather take a look at Adobe I/O Runtime if that's helpful.

Thanks, Sathees