title: Azure Function for Bot Framework C#
body: <p>I've made a bot using BotFramework, and  I want to have an azure function triggered every 5 minutes (for example). And when it's triggered my bot must be notified. </p>
  
  <p>But I have no idea how to do this, I read this <a href="https://docs.botframework.com/en-us/azure-bot-service/templates/proactive/" rel="nofollow noreferrer">https://docs.botframework.com/en-us/azure-bot-service/templates/proactive/</a> but the thing is he didn't use a Timmer Trigger Azure Function but a Queue Trigger. </p>
  
  <p>I tryed to do something like that :</p>
  
  <pre><code>using System;
  using System.Net;
  using System.Net.Http;
  using Microsoft.Azure.WebJobs.Host;
  
  public class BotMessage
  {
      public string Source { get; set; } 
      public string Message { get; set; }
  }
  
  
  public static HttpResponseMessage  Run(TimerInfo myTimer,out BotMessage message ,TraceWriter log)
  {
      message = new BotMessage()
      {
          Source = "AzureFunction",
          Message = "Testing"
      };
      return new HttpResponseMessage(HttpStatusCode.OK);   
  
  }
  </code></pre>
  
  <p>but i have this error : </p>
  
  <p>2017-03-02T14:49:40.460 Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.TimerTriggerCSharp1'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'message' to type BotMessage&amp;. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).</p>
  
  <p>Plus, to indicate which bot has to be notified where the event is triggered is added a output with the direct line key :</p>
  
  <p><a href="https://i.stack.imgur.com/HIzyz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HIzyz.png" alt="enter image description here"></a></p>
  
  <p>but as u can see there is the same error than above ...</p>
  
  <p>Does someone have some docs or example for that.</p>
  
  <p>Thank you for reading me.</p>