Workflows
Blocks
Integrations
Dynamics 365

Dynamics 365 Action Block

What it does: Manage accounts in Microsoft Dynamics 365 CRM directly from your workflow automation.

🏢

In simple terms: Automate CRM operations -- create, retrieve, update, and delete customer accounts in Dynamics 365 as part of your workflows.

When to Use This

Use the Dynamics 365 action when you need to:

  • ✅ Create new customer accounts from lead conversion workflows
  • ✅ Retrieve account details for use in downstream workflow steps
  • ✅ Update account information when changes occur in external systems
  • ✅ Synchronize account data between Dynamics 365 and other platforms
  • ✅ Clean up or archive accounts based on business rules

Example: When a lead converts to a customer in your marketing platform, automatically create a corresponding account in Dynamics 365 with the company details.

Features

  • OAuth2 Authentication: Secure Microsoft identity platform connection
  • Account CRUD: Full create, read, update, and delete operations on accounts
  • Bulk Retrieval: Get all accounts with optional filtering
  • Dynamics Subdomain: Connect to your specific Dynamics 365 instance
  • Variable Support: Use workflow variables for dynamic account data

Setup

1. Connect Your Microsoft Account

  1. Click Connect Microsoft Account in the block settings
  2. Sign in with your Microsoft 365 account that has Dynamics 365 access
  3. Grant the requested CRM permissions
  4. Your account will be linked securely via OAuth2

2. Configure Your Dynamics 365 Subdomain

After connecting, specify your Dynamics 365 instance subdomain:

Subdomain: yourorg

This corresponds to https://yourorg.crm.dynamics.com. The block uses this to route API requests to the correct Dynamics 365 environment.

⚠️

Your Dynamics 365 instance must be accessible via the Microsoft Dataverse Web API. Ensure that your account has a valid Dynamics 365 license and the appropriate security role (e.g., Salesperson, Sales Manager) for account operations. The Indite environment must have MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET configured.

3. Select Action and Configure

  1. Choose the Action from the dropdown (e.g., Create Account, Get All Accounts)
  2. Fill in the required account fields
  3. Map response values to workflow variables

Supported Actions

ActionDescription
Create AccountCreate a new account record with name, industry, contact info, and custom fields
Get AccountRetrieve a single account by its ID
Get All AccountsList all accounts with optional OData filters and field selection
Update AccountModify an existing account's fields
Delete AccountPermanently remove an account record

Using Variables

You can use workflow variables in any Dynamics 365 field:

Create Account:

Account Name: {{lead.companyName}}
Phone: {{lead.phone}}
Website: {{lead.website}}
Industry: {{lead.industry}}
Address Street: {{lead.address.street}}
Address City: {{lead.address.city}}
Address State: {{lead.address.state}}
Address Zip: {{lead.address.zip}}

Get All Accounts (OData Filter):

name eq '{{search.companyName}}'

Update Account:

Account ID: {{dynamics.accountId}}
Revenue: {{finance.annualRevenue}}
Number of Employees: {{company.headcount}}

Response Mapping

Map results from Dynamics 365 actions to workflow variables:

Available Values (Account):

  • Account ID: Unique Dynamics 365 record GUID
  • Account Name: Company or organization name
  • Account Number: Internal account number
  • Phone: Primary phone number
  • Website: Company website URL
  • Industry: Industry classification
  • Revenue: Annual revenue
  • Number of Employees: Employee count
  • Address: Full address fields (street, city, state, zip, country)
  • Created On: Record creation timestamp
  • Modified On: Last modification timestamp
  • Owner: The user who owns the account record

Example Mapping:

Account ID → {{dynamics.accountId}}
Account Name → {{dynamics.accountName}}
Revenue → {{dynamics.revenue}}

Common Use Cases

1. Lead-to-Account Conversion

Trigger: Lead qualified in marketing platform Dynamics Action: Create Account

Account Name: {{lead.companyName}}
Phone: {{lead.companyPhone}}
Website: {{lead.companyWebsite}}
Industry: {{lead.industry}}
Description: Converted from lead {{lead.id}} on {{date.now}}

2. Account Data Enrichment

Trigger: Third-party data enrichment webhook Dynamics Action: Get Account, then Update Account

Step 1 - Get Account:
  Filter: name eq '{{enrichment.companyName}}'

Step 2 - Update Account:
  Account ID: {{dynamics.accountId}}
  Revenue: {{enrichment.estimatedRevenue}}
  Number of Employees: {{enrichment.headcount}}
  Industry: {{enrichment.industry}}

3. Customer Churn Alert

Trigger: Subscription cancellation event Dynamics Action: Update Account

Account ID: {{subscription.dynamicsAccountId}}
Description: Subscription cancelled on {{date.now}}. Reason: {{cancellation.reason}}
Status: At Risk

4. Nightly Account Sync

Trigger: Schedule (Daily at 2 AM) Dynamics Action: Get All Accounts

Filter: modifiedon ge {{date.yesterday}}

Then loop through modified accounts and sync to the external data warehouse.

Best Practices

Data Quality

  • ✅ Validate required fields before creating accounts (at minimum, account name)
  • ✅ Check for duplicate accounts using Get All with a name filter before creating
  • ✅ Use consistent naming conventions for account names
  • ✅ Populate as many fields as possible during initial creation

Performance

  • ✅ Use OData filters in Get All Accounts to limit result sets
  • ✅ Select only the fields you need rather than retrieving all columns
  • ✅ Avoid querying the entire account table in time-sensitive workflows
  • ✅ Cache account IDs when you need to reference the same account multiple times

Security

  • ✅ Use service accounts with the minimum required Dynamics 365 security role
  • ✅ Audit account creation and deletion through workflow logs
  • ✅ Be careful with Delete Account -- consider deactivating instead
  • ✅ Never expose Dynamics 365 GUIDs to end users unnecessarily

Troubleshooting

Account Creation Fails

Check:

  • The Microsoft account is connected and has a valid Dynamics 365 license
  • The Dynamics subdomain is correctly configured
  • Required fields (account name) are provided
  • Your security role allows account creation

Cannot Find Account

Solutions:

  • Verify the account ID (GUID) is correct
  • Use Get All Accounts with a filter to search by name instead of ID
  • Confirm the account has not been deleted or deactivated
  • Check that your security role grants read access to the account entity

OData Filter Returns Error

Check:

  • Filter syntax follows OData conventions (e.g., name eq 'Contoso')
  • String values are wrapped in single quotes
  • Field names match the Dynamics 365 logical names (not display names)
  • Date values are in ISO 8601 format

Limitations

  • Entity Support: This block currently supports Account operations only; contacts, opportunities, and other entities are not yet available
  • Custom Fields: Custom fields can be set but must be referenced by their logical schema name
  • Bulk Operations: No native batch/bulk operation support -- use a loop for multiple records
  • Attachments: File attachments on account records are not supported
  • API Rate Limits: Dynamics 365 Web API has per-user and per-tenant rate limits
💡

Tip: Use the OData $select parameter in Get All Accounts to retrieve only the fields you need -- this significantly improves response time for large datasets.

Related Blocks

  • HubSpot: Alternative CRM integration
  • Entra ID: Manage user accounts associated with CRM users
  • Excel 365: Export account data to spreadsheets
  • Condition: Add logic based on account data
  • Set Variable: Prepare account data before CRM operations
Indite Documentation v1.6.0
PrivacyTermsSupport