title: Sending Dynamic file path from Azure Databricks Code to Azure Logic apps for email attachments
body: <p>Hi I am new to logic apps. I have a python code for sending mail with attachments using Azure Logic Apps. When I provide a static file path in Get Blob Content the mail is working fine with the attachment. But when I am trying to the send the file path dynamically from azure databricks it is not receiving at the get blob content in logic app. I have also tried few examples using initialise variables but it is not working.</p>
  <pre><code>import requests
  
  def send_email(_to, _subject, _body, file):
    
    email_body = &quot;{0} &lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;h6&gt; Hi Hello World &lt;/h6&gt;&quot;.format(_body)
    
    task = { &quot;body_data_1&quot;: email_body , &quot;subject_name_1&quot;: _subject , &quot;email_to_list_1&quot;: _to, &quot;attach&quot; : file }
    logic_app_post_url = 'https://prod-27.centralindia.logic.azure.com:443/workflows/*****'
    resp = requests.post(logic_app_post_url, json=task)
    print(resp.status_code)
    if resp.status_code == 202:
      print('Email Sent!')
  
  email_to = &quot;abc@outlook.com&quot;
  email_subject = &quot;Testing Logic App Send Mail with Dynamic File&quot;
  email_body = &quot;Hi This is a test mail Dynamic&quot;
  file_path = &quot;/super-store/output/orders/_SUCCESS&quot;
  send_email(email_to, email_subject, email_body, file_path)
  
  </code></pre>
  <p><strong>Logic App Design</strong></p>
  <p><a href="https://i.stack.imgur.com/N5M1C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N5M1C.png" alt="enter image description here" /></a></p>
  <p><strong>Logic App Run Error Details</strong></p>
  <p><a href="https://i.stack.imgur.com/3sGyP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3sGyP.png" alt="enter image description here" /></a></p>
  <p><strong>HTTP Input</strong>
  <a href="https://i.stack.imgur.com/Ntfft.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ntfft.png" alt="enter image description here" /></a></p>
  <p><strong>HTTP Output</strong>
  <a href="https://i.stack.imgur.com/IAQI6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IAQI6.png" alt="enter image description here" /></a></p>
  <p><strong>Get Blob Content Input</strong>
  <a href="https://i.stack.imgur.com/pfEWG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfEWG.png" alt="enter image description here" /></a></p>
  <p><strong>Get Blob Content Output</strong>
  <a href="https://i.stack.imgur.com/jKDUp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jKDUp.png" alt="enter image description here" /></a></p>