Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 6th edition is out.

Writing scripting languages in AJO


Level 2



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():
        # 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__':


Can we write and execute this inside AJO somewhere?

1 Reply


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