# Campaign templates and import/export

**URL:** <https://forum.mautic.org/t/campaign-templates-and-import-export/10734>\
**Category:** Ideas and Feature Requests\
**Tags:** completed\
**Created:** [September 1, 2018, 7:48am UTC](https://forum.mautic.org/t/campaign-templates-and-import-export/10734 "2018-09-01T07:48:14Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![marcoh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marcoh/32/14574_2.png) [@marcoh](https://forum.mautic.org/u/marcoh)\
**Post date:** [May 19, 2025, 2:37pm UTC](https://forum.mautic.org/t/campaign-templates-and-import-export/10734/41 "2025-05-19T14:37:54Z")

</div>

Would love to be one of the testers

---

<div class="post-metadata">

**Author:** ![dcjarvis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dcjarvis/32/13357_2.png) [@dcjarvis](https://forum.mautic.org/u/dcjarvis)\
**Post date:** [May 20, 2025, 11:27am UTC](https://forum.mautic.org/t/campaign-templates-and-import-export/10734/42 "2025-05-20T11:27:20Z")

</div>

Hi there marcoh, thanks for your response, I’ll send you a PM with the details  
Thanks, David

---

<div class="post-metadata">

**Author:** ![dcjarvis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dcjarvis/32/13357_2.png) [@dcjarvis](https://forum.mautic.org/u/dcjarvis)\
**Post date:** [June 5, 2025, 8:55am UTC](https://forum.mautic.org/t/campaign-templates-and-import-export/10734/43 "2025-06-05T08:55:06Z")

</div>

Hi all, quick update for everyone. We are very close to completing the campaign import and export features now. All the bug fixes have now been completed and we are awaiting final reviews and the code to be merged into version 7 of Mautic. If you’d like to keep track of what we are doing on the project please have a look at my weekly updates here: [https://community.mautic.org/assemblies/campaign-library/f/96/posts](https://community.mautic.org/assemblies/campaign-library/f/96/posts)  
As always I’m happy to answer questions here or via PM.  
Thanks  
David

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [June 27, 2025, 5:16pm UTC](https://forum.mautic.org/t/campaign-templates-and-import-export/10734/44 "2025-06-27T17:16:04Z")

</div>

Hi everyone!

The PR for this feature is in the final stages of review, we’d love a couple of reviews if you have time.

> <https://github.com/mautic/mautic/pull/14504>
>
> | Q | A
> | --------------------------------…------ | ---
> | Bug fix? (use the a.b branch) | 🔴
> | New feature/enhancement? (use the a.x branch) | 🟢
> | Deprecations? | 🔴
> | BC breaks? (use the c.x branch) | 🔴
> | Automated tests included? | 🔴
> | User documentation | https://github.com/mautic/user-documentation/pull/361
> | Developer documentation | https://github.com/mautic/developer-documentation-new/pull/242
> 
> \## Description
> 
> This proof of concept (PoC) implements the Campaign Library feature, focusing on the export and import of a single campaign entity without involving the UI. The goal is to demonstrate the core functionality of exporting and importing campaign data in a streamlined manner.
> 
> \---
> \### 📋 Steps to test this PR:
> 
> \#### 1. \*\*Exporting Campaigns\*\*
> Use the following commands to export campaigns:
> 
> \- Export campaign data in JSON format only:
> \`\`\`bash
> ddev exec bin/console mautic:entity:export --entity=campaign --id=1,2,3 --json-only
> \`\`\`
> 
> \- Export campaign data as a ZIP file:
> \`\`\`bash
> ddev exec bin/console mautic:entity:export --entity=campaign --id=1,2,3 --zip-file
> \`\`\`
> 
> \- Export campaign data as a JSON file:
> \`\`\`bash
> ddev exec bin/console mautic:entity:export --entity=campaign --id=1,2,3 --json-file
> \`\`\`
> \- File name: campaign\_data.zip, campaign\_data.json
> 
> The output files will be stored in the Docker container's temporary directory (\`/tmp\`). To access these files on your system, use the following commands to copy them to a local directory:
> 
> \`\`\`bash
> docker cp ddev-mautic-web:/tmp/campaign\_data.zip ../mautic/campaign\_data.zip
> docker cp ddev-mautic-web:/tmp/campaign\_data.json ../mautic/campaign\_data.json
> \`\`\`
> 
> \#### 2. \*\*Importing Campaigns\*\*
> To import the exported campaign data, use the following command:
> 
> \`\`\`bash
> ddev exec bin/console mautic:entity:import --entity=campaign --file=campaign\_data.zip --user=1
> \`\`\`
> 
> \*\*Note:\*\* Before running the import command, the required files must be copied to the Docker container's temporary directory. Use the following commands to copy the files into the container:
> 
> \`\`\`bash
> docker cp ./campaign\_data.zip ddev-mautic-web:/tmp/campaign\_data.zip
> docker cp ./campaign\_data.json ddev-mautic-web:/tmp/campaign\_data.json
> \`\`\`
> 
> \#### 3. \*\*Verification\*\*
> \- Verify that the campaign data is correctly exported by inspecting the JSON and ZIP files in the system directory.
> \- Ensure that the imported campaign data is successfully reflected in Mautic.
> 
> \### 🚀 Expected Results:
> \- Export commands generate the appropriate files in the Docker container's temporary directory.
> \- Import commands successfully import the exported campaign data into the system.
> \- No errors are encountered during the export or import process.
> 
> \### 🚀 Jira Ticket:
> https://mautic.atlassian.net/browse/CL-34

Thanks!

[Previous page](https://forum.mautic.org/t/campaign-templates-and-import-export/10734.md?page=2)
