Trying to create a simple custom token to add on my email campaign. After following this documentation from Sitecore, again I encountered an error.


In marketing automation, Im trying to select an email campaign and encountered this error:

{"Message":"An error has occurred.","ExceptionMessage":"Multiple actions were found that match the request: \r\nGet on type Sitecore.EmailCampaign.Server.Controllers.DataSource.EmailCampaignsController\r\nGet on type Sitecore.EmailCampaign.Server.Controllers.DataSource.EmailCampaignsController","ExceptionType":"System.InvalidOperationException","StackTrace":"   at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)\r\n   at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"}

Thanks in advance!

  • The exception doesn't seem to be related to the custom tokens. What is says is that the application can't decide which action of EmailCampaignsController to call. Could you please check in the browser, how many requests are going to https://{yoursite}/sitecore/api/exm/campaigns/automated?cultureName=en&sc_site=shell? Also, if you open this URL in your browser, do you see a JSON array with email campaigns? Oct 19 '20 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.