web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Scheduled Call to External API for Create/UPdate Records in D365

(0) ShareShare
ReportReport
Posted on by 170

Hi,

My Requirement is to call External API..[Scheduled one] (say 3 times a day). Based upon the response, I`ll loop through the D365 Records to Create/ Update Accounts or Contacts . Can anyone please suggest me the steps to achieve this without using Microsoft Flow(Power Automate).

Using Flow would work, but no. of API Calls will be more I guess, Also data coming from API would be huge.

Thanks in advance!

I have the same question (0)
  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    There is no out-of-the-box scheduling functionality available in Dynamics 365.

    As a workaround, I would suggest following:

    • Create a custom action, call external API and create CRM records in a loop.
    • Then, call this custom action using a scheduled Flow. Please note, it will be one call per schedule (3 flow calls in your scenario), because actual API call and record creation is done within custom action (not flow). Here is a blogpost to give you an idea on custom actions and calling it through WebAPI (or Flow):

    https://carldesouza.com/creating-a-custom-action-and-calling-it-from-web-api-in-dynamics-365-power-apps/

    • If you do not want to use flow at all, you can write a console app which calls this action using WebAPI, then schedule this app in Window Task Scheduler (not an elegant solution but works).
    • Last, which I do not prefer, but there are ways to schedule workflows, look at the following post:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/225758/how-to-schedule-job-or-workflow

  • Bhagyashree Shahade Profile Picture
    170 on at

    Thanks Wahaj for the solutions listed,

    As per Solution 1 - can you please brief me where to call External API?

    In custom Action or Plugin?

    Calling API n Create/Update logic will that all go into Custom Actions?

  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Yes that's correct.

    You need to call the API and do your CRUD logic within Action.

    You can call External APIs within custom code activity or a plugin (same way):

    https://msdynamicscrmblog.wordpress.com/2017/11/06/call-external-cross-domain-rest-apisoap-service-from-crm-pluginscustom-workflows/

  • Bhagyashree Shahade Profile Picture
    170 on at

    Thanks Wahaj,

    I'll try this out

  • Wahaj Rashid Profile Picture
    11,321 on at

    You are welcome.

    Feel free to discuss if you face any issue.

  • Pete QD Profile Picture
    10 on at

    Hi Wahaj, I have not understanded how to create the scheduled Flow for option 1. The provide link only use JS code to call custom action, not scheduled.

    Many Thanks.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 93

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans