Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Best way to have a workflow(field change) trigger an AWS Lambda function?

Posted on by

We want to move data that is modified data in CRM 2016 into a database we have living in an AWS RDS instance. CRM is of course backed by SQL server. Our RDS instance in question is a Postgres database.

My thought is to have a CRM workflow kick off when certain fields are changed, then to send a notification to AWS SNS, which would then tell a lambda function to grab 3 fields direct from the SQL server or from one of our REST interfaces to the data, and insert it into the Postgres database. Keying off of the contact ID we created and not the GUID.

I'm not a programmer (yet... Just starting my journey in python), so I get hung up on how to have the workflow notify SNS or lambda.

Does anyone have insight to how to deliver a notification to AWS with workflow?

*This post is locked for comments

  • Ben T Profile Picture
    Ben T 777 on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    Bpr Admin,

    Did you end up finding a solution to this? What worked for you? We are trying to send data from CRM to and AWS database. Basically, we just need to pass a string from one field in CRM and have that string saved in AWS database.

  • bpr_admin Profile Picture
    bpr_admin on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    We are running on-premises D365 in our own network, and we use AWS for all of our public stuff.

    Due to a highly locked down RDS database, only AWS systems (ec2 and lambda) have access to it, so that is why I want to have lambda doing the heavy lifting in this case.

  • Suggested answer
    M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    No, it's not possible out of the box.

    With CRM Online you could look at flow, that does enable that. But from your opening post I read that you are running an onpremises versions in the AWS cloud.

  • bpr_admin Profile Picture
    bpr_admin on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    So, it looks like with your solution, it is not possible with "out of the box" workflow to be able to send data to a REST API. Am I correct in that?

  • bpr_admin Profile Picture
    bpr_admin on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    Thanks, I'm looking into this.

    I'm primarily learning to program for machine automation, infrastructure deployment, and automating/scripting the datacenter, and AWS. For that my main tools are Powershell and python.

  • Suggested answer
    M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: Best way to have a workflow(field change) trigger an AWS Lambda function?

    Assuming you can call a AWS lambda function with a http (post) message, I would create a custom workflow activity that sends a http post request to the lambda with a json string.

    For such a workflow activity I have a sample on my blog: www.oak3.org/.../creating-sharepoint-site-dynamics-crm-azure-functions under CRM Plugin.

    By the way, if you start programming and want to do work with CRM, I would recommend using C#. Microsoft has a lot of Libraries to make your life a lot easier. Not saying it can't be done with other languages, but it might not be te best starting point.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans